Source code for the Mun language and runtime.

Overview

Mun

Build Status Crates.io docs master docs v0.2 MIT/Apache Join us on Discord codecov Lines of Code

Mun is a programming language empowering creation through iteration.

Features

  • Ahead of time compilation - Mun is compiled ahead of time (AOT), as opposed to being interpreted or compiled just in time (JIT). By detecting errors in the code during AOT compilation, an entire class of runtime errors is eliminated. This allows developers to stay within the comfort of their IDE instead of having to switch between the IDE and target application to debug runtime errors.

  • Statically typed - Mun resolves types at compilation time instead of at runtime, resulting in immediate feedback when writing code and opening the door for powerful refactoring tools.

  • First class hot-reloading - Every aspect of Mun is designed with hot reloading in mind. Hot reloading is the process of changing code and resources of a live application, removing the need to start, stop and recompile an application whenever a function or value is changed.

  • Performance - AOT compilation combined with static typing ensure that Mun is compiled to machine code that can be natively executed on any target platform. LLVM is used for compilation and optimization, guaranteeing the best possible performance. Hot reloading does introduce a slight runtime overhead, but it can be disabled for production builds to ensure the best possible runtime performance.

  • Cross compilation - The Mun compiler is able to compile to all supported target platforms from any supported compiler platform.

  • Powerful IDE integration - The Mun language and compiler framework are designed to support source code queries, allowing for powerful IDE integrations such as code completion and refactoring tools.

Example

fn fibonacci(n: i32) -> i32 {
    if n <= 1 {
        n
    } else {
        fibonacci(n - 1) + fibonacci(n - 2)
    }
}

// Comments: functions marked as `pub` can be called outside the module
pub fn main() {
    // Native support for bool, f32, f64, i8, u8, u128, i128, usize, isize, etc
    let is_true = true;
    let var = 0.5;

    // Type annotations are not required when a variable's type can be deduced
    let n = 3;

    let result = fibonacci(n);

    // Adding a suffix to a literal restricts its type
    let lit = 15u128;

    let foo = record();
    let bar = tuple();
    let baz = on_heap();
}

// Both record structs and tuple structs are supported
struct Record {
    n: i32,
}

// Struct definitions include whether they are allocated by a garbage collector
// (`gc`) and passed by reference, or passed by `value`. By default, a struct
// is garbage collected.
struct(value) Tuple(f32, f32);

struct(gc) GC(i32);

// The order of function definitions doesn't matter
fn record() -> Record {
    // Mun allows implicit returns
    Record { n: 7 }
}

fn tuple() -> Tuple {
    // Mun allows explicit returns
    return Tuple(3.14, -6.28);
}

fn on_heap() -> GC {
    GC(0)
}

Documentation

The Mun Programming Language Book is hosted on netlify.

Pre-Built Binaries

[NOTE] We do not provide support for milestone releases

[NOTE] None of the binaries are currently signed

Download pre-built binaries of milestone releases for macOS, Linux, and Windows (64-bit only).

Building from Source

Make sure you have the following dependencies installed on you machine:

Clone the source code, including all submodules:

git clone https://github.com/mun-lang/mun.git
git submodule update --init --recursive

Use cargo to build a release version

cargo build --release

Language server

Mun contains initial support for the lsp protocol, start the executable using:

mun language-server

Currently, only diagnostics are supported.

VS code

To run in Visual Studio Code. Use the following extension: VS code extension.

Vim/Neovim

Use a language server plugin (or built-in lsp support of neovim), for example using coc.nvim.

Paste the following config into your :CocConfig, replace the command, with the correct path to the mun executable.

  "languageserver": {
      "mun": {
          "command": "<path_to_mun>",
          "rootPatterns": ["mun.toml"],
          "trace.server": "verbose",
          "args": ["language-server"],
          "filetypes": ["mun"]
      }
  }

Note that, "trace.server": "verbose" is optional and helps with language server debugging.

Building Documentation

Building the book requires mdBook, ideally version 0.3.x. To install it, run:

$ cargo install mdbook --vers [version-num]

The Mun book uses a custom version of Highlight.js to enable highlighting of Mun code. The build version of Highlight.js is required by mdbook in the theme/ folder but it is not distributed with the source. Instead, it can be build by invoking the build script:

cd book
./ci/build-highlight-js

Every time you change something in the custom version of highlight.js you have to call the above script to ensure you locally use the latest version.

After generating the custom minified Highlight.js, to build the book, type:

$ mdbook build 

The output will be in the book subdirectory. To view the book, open it in your web browser.

For local development use mdbook serve instead of mdbook build. This will start a local webserver on port 3000 that serves the book and rebuilds the content when changes are detected.

All of the above is also combined in a single shell script that can be invoked by simply running:

./ci/build

To test the rust source code in the book, run:

mdbook test -L path/to/target/debug/deps

For this to work, there can only be one libmun_runtime-{HASH}.rlib file in the provided library path.

License

The Mun Runtime is licensed under either of

at your option.

Comments
  • feat: type alias

    feat: type alias

    This PR adds the ability to use type alias in Mun. (maybe close #110 )

    The following code should work properly.

    type Foo = u32;
    fn main() {
        let a: Foo = 1;
    }
    

    And the following code should raise a type mismatch.

    type Foo = u32;
    fn main() {
        let a: Foo = 1.0;
    }
    
    error: mismatched type
     --> main.mun:3:17
      |
    3 |     let a: Foo = 1.0;
      |                  ^^^ expected `u32`, found `{float}`
      |
    

    NOTE: The following code does not work properly yet.

    fn main() {
       type Foo = u32;
       let a: Foo = 10;
    }
    
    • [x] lexer: add the type keyword
    • [x] parsing: add parsing of type TypeName = OtherTypeName
    • [x] hir: add type aliases as type definition
    • [x] tests: add test for all of the above stages
      • lexer: crates/mun_syntax/src/tests/snapshots/mun_syntax__tests__lexer__keywords.snap
      • parser: crates/mun_syntax/src/tests/snapshots/mun_syntax__tests__parser__type_alias_def.snap
      • HIR: crates/mun_hir/src/ty/snapshots/mun_hir__ty__tests__infer_type_alias.snap
    type: feat 
    opened by sinato 16
  • Support for iOS

    Support for iOS

    I would like to build a munlib for iOS. I have tinkered with the code in mun_target and added an ios target, and call mun with --target x86_64-apple-ios. Still, the generated lib file is for macOS. Any help with the parts that I need to change?

    opened by aghoneim92 13
  • Project Management v0.1

    Project Management v0.1

    To support multi-file Mun libraries, we need to come up with a project management system that allows users to easily setup, build, and tweak packages.

    A Mun project will look as follows: image

    The main directory contains a src directory and mun.toml configuration file. All files in the src directory are automatically added to the build tree. This is different from Rust in that you cannot/do not have to write mod a in your source code.

    A sub-module can be created by either:

    • adding a directory a with a mod.mun file; or
    • adding a a.mun file in the parent directory.

    The above screenshot shows both of these examples for illustrative purposes.

    To use a struct Foo, defined in src/a/b.mun, you can access it in the current file by writing: use a::b::Foo;.

    By default, a type or function defined in a module is not accessible outside of its file and sub-modules. You can expand accessibility in three ways:

    • pub: accessible within the package and externally (incl. marshalling to the host language)
    • pub(package): accessible within the package
    • pub(super): accessible within parent module and its sub-modules

    A mun.toml contains information about the package, similar to a Cargo.toml:

    [package]
    name="test"
    version="0.2.0"
    authors = ["Mun Team"]
    

    Depends on

    • [x] #248
    • [x] #249

    Improved by

    • [x] #145
    • [x] #168

    Remaining issues moved to later milestones

    • #425
    tracking 
    opened by Wodann 13
  • Logo?

    Logo?

    We currently don't really have a logo other than a cutout of the text on the website. It would be really awesome if we could design a proper logo for Mun that we could use all over the place.

    status: help wanted 
    opened by baszalmstra 13
  • Mun 0.3 depends on VS 2019 redist on Windows

    Mun 0.3 depends on VS 2019 redist on Windows

    Hi,

    Mun newbie here. I wanted to test the 0.3 on Windows but it seems there is a bug with it. Here What I did:

    1. I downloaded mun 0.3 for Windows using Github releases
    2. Unzipped mun.exe into a new directory on my desktop
    3. Opened a terminal into this directory and typed mun new mun-test
    4. Program ran but no file nor directory were created
    5. Run mun --help. Nothing happened

    Then I downloaded the 0.2.1 version and the mun --help command printed something in the console. So my guess is that something is broken on 0.3. Let me know if I can help fix this.

    type: fix good first issue pri: intermediate exp: low 
    opened by codec-abc 10
  • docs(readme): add logo

    docs(readme): add logo

    Adds the potential new logo of Mun to the README. This also makes it easier to discuss #198 (i.e. any adjustment that need to be made).

    Points that require further thought:

    • Is the logo/shape OK?
    • What color should the logo be? What is Mun's branding color?
    • Should there be a logotype variant of the logo (one that includes the name Mun)?
    • Where should the reference logo be stored?
    opened by jonatcln 8
  • bump: update libloading requirement from 0.6 to 0.7

    bump: update libloading requirement from 0.6 to 0.7

    Updates the requirements on libloading to permit the latest version.

    Commits
    • 00c21d8 Replace docsrs cfg with libloading_docs
    • b706286 Build wasm32-unknown-unknown in CI
    • 4b77b7b Fix documentation building on Windows
    • ec04e8d Fix broken rustdoc links
    • 840ca50 Changelog for 0.7.2
    • 4ece71d Library & Symbol exist on supported platforms only
    • e38bb29 Annotate the MSRV in Cargo.toml
    • e0ebb7b Small typo
    • c82a500 Bump 0.7.1
    • 2173d71 Removed unclear sentence
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 7
  • feat(cli): Implement `mun new` and `mun init`

    feat(cli): Implement `mun new` and `mun init`

    closes #237

    The cargo implementation was used as a reference.

    Note

    I did not do anything to fetch information about the project author.

    Cargo uses the function https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_new.rs#L773.

    I could copy it over almost line for line but that feels a little weird. Maybe I should create a small crate for it. Do you think that would be a good idea?

    opened by eopb 7
  • Replace return type annotation `:` with `->`

    Replace return type annotation `:` with `->`

    We would benefit from staying close to Rust syntax, however, currently return type annotations are written like:

    fn foo(): int {
    }
    

    we would like to replace this syntax with this:

    fn foo() -> int {
    }
    

    to be closer to Rust.

    Good first issue process:

    • [x] read our contributing guidelines
    • [x] claim this issue (assign yourself or comment below)
    • [x] implement the feature and start a Pull Request with in the description: closes #105.

    If this is your first PR, welcome 🎉 😄

    good first issue 
    opened by baszalmstra 7
  • Arch Linux build info out of date

    Arch Linux build info out of date

    With #254 the build instructions for ArchLinux are out of date (Since we require LLVM8 now). We should update these, but it also requires that we create and upload a package for lld8.

    type: fix status: help wanted good first issue exp: low 
    opened by baszalmstra 6
  • Book: Broken anchor-links because of HTML base-tag

    Book: Broken anchor-links because of HTML base-tag

    All the anchor links in the book are broken because of the base tag that is inserted on every page.

    When a base tag is present the anchor link will be relative to the base address instead of the current page so, for example, clicking on a heading on this page redirects to the index page.

    I'm not sure why there even is a base tag in the first place but it seems to be added by this CI script according to the value from here.

    The easiest fix would be to remove the base tag. I don't think there is a reason for it. Other rust books also don't use one and since mdBook pages are all on the root level stuff like CSS will still be loaded from the correct path.

    opened by benediktwerner 6
  • Alternative codegen backend to make embedding possible

    Alternative codegen backend to make embedding possible

    As I understand it, Mun requires LLVM for compilation. That means it is not a good option for embedding in programs - in the same way that you can embed Rhai or Gluon or Lua for example.

    The documentation has a section on embedding Mun programs in Rust or C++ but as far as I can tell that still requires you to have already compiled them externally using LLVM.

    Perhaps it could support Cranelift too?

    opened by Timmmm 1
  • "while"'s "break" could return value

    There is solution to "a break in a while loop cannot return a value" inspired by Python:

    • Python's while (and for) loop can have else: branch that is executed if loop exited with condition and not with break: https://docs.python.org/3.10/reference/compound_stmts.html#the-while-statement This construction is unusual, rare language has else for loops (I don't remember one except Python). Therefore almost nobody uses it.
    • But it could naturally complement "break may return value from loop" feature (which Python has not). It could sound like: "if while's loop body has break with value, then it has to have else block which results with value of same type".
    opened by funny-falcon 1
  • Make the `layout` specific to primitives and structs

    Make the `layout` specific to primitives and structs

    Currently, all types store a layout which describes the size and alignment of storing a specific Type. For primitives and structs this is a dynamic value but for arrays and pointers this value is always the same (the layout of a *const c_void).

    We should remove this from the TypeData struct and instead store the layout only in the TypeDataKind of structs and primitives.

    good first issue type: improvement 
    opened by baszalmstra 0
  • Replace `*const` and `*mut` with `&` and `&mut` in mun_abi

    Replace `*const` and `*mut` with `&` and `&mut` in mun_abi

    cbindgen supports conversion of references - with a lifetime - into pointers. Currently, we are using raw pointers in our mun_abi, but by converting them to references, we can make our Rust code safer.

    • [ ] claim this issue (assign yourself or comment below)
    • [ ] setup repository on your local machine and make sure all tests pass (cargo test)
    • [ ] read our contributing guidelines
    • [ ] in mun_abi, replace as many instances of *const and *mut to &'a and &'a mut as possible
    • [ ] start a Pull Request. Set description to closes #422. If this is your first PR, welcome :tada: :smile:
    good first issue pri: low exp: low type: refactor 
    opened by Wodann 0
Releases(v0.4.0)
  • v0.4.0(Dec 12, 2022)

    The fourth Mun release includes language-support for dynamically-sized arrays, support for Apple's M1 chips and experimental support for iOS, major refactors of our back-end to support indirect types and recursion - as seen with arrays and pointers - transitions to a monorepo, and solves a range of bugs.

    Added

    • Clone trait implementation to RootedStruct #323
    • Private function leak validation #338
    • Dynamically-sized arrays #341
    • Private struct type leak validation #344
    • Mun logo #355
    • Send trait implementation to Mun Runtime #370
    • Use static-crt on Windows #376
    • Link type information when loading Mun library #377
    • Indirect types to Mun ABI #415
    • Type API to mitigate cyclic type references #427
    • Mac M1 Support #444
    • Bevy example #475

    Changed

    • Bump Rust from 1.50.0 to 1.65.0 #325 #327 #334 #346 #350 #357 #360 #369 #378 #406 #432 #474 #477
    • Simplified invoke syntax #347
    • Bump LLVM from 11 to 13 #351 #491
    • Move Mun runtime FFI submodule to monorepo #352
    • Bump Rust to 2021 edition #367
    • Move Mun ABI submodule to monorepo #404
    • Performance optimisations #405
    • Reduce workspace target folder size from 10.9 GB to 10.6 GB #457
    • Reduce workspace build dependencies from 296 to 270 #457
    • Reduce workspace dev dependencies from 502 to 496 #457
    • Move Rust examples submodule to monorepo #475
    • Switch to LLVM code coverage instead of using Tarpaulin #478

    Removed

    • Move lld-rs to separate repository #373
    • Unused dependencies #435

    Fixed

    • Typos in documentation #340 #348
    • Type inference problem for resolved types #358
    • Mac OS Big Sur sdkroot #362
    • Missing closing brace of error_block #364
    • Missing semicolon in declaration recovery set #365
    • C API link in book #372
    • Multi-threaded cargo test #407
    Source code(tar.gz)
    Source code(zip)
    mun-linux-x86_64-0.4.0.tar.xz(23.77 MB)
    mun-macos-x86_64-0.4.0.tar.xz(20.42 MB)
    mun-windows-x86_64-0.4.0.zip(28.69 MB)
    mun_runtime-linux-x86_64-0.4.0.tar.xz(977.01 KB)
    mun_runtime-macos-x86_64-0.4.0.tar.xz(331.96 KB)
    mun_runtime-windows-x86_64-0.4.0.zip(393.16 KB)
  • v0.3.0(Apr 11, 2021)

    The third Mun release includes big usability improvements; multi-file projects, a language server with diagnostics and autocompletion, and improvements to robustness and developer workflow to name a few.

    :link: feature

    • initial LSP support

    :link: improvement

    • add benchmarks for and optimise struct field marshalling

    :link: improvement

    • shared diagnostics between compiler and language server

    :link: misc

    • build binaries for release branches

    :link: improvement

    • explicitly specify latest Ubuntu LTS

    :link: improvement

    • bump bindgen dependency to 0.54

    :link: fix

    • parsing of unmatched right curly braces ('}')

    :link: refactor

    • upgrade to salsa 0.15

    :link: fix

    • removed outdated comments

    :link: feat

    • Implement mun new and mun init

    :link: feat

    • type alias

    :link: refactor

    • move library loading logic to separate crate

    :link: refactor

    • move test utility functions to separate crate

    :link: refactor

    • upgrade to official inkwell

    :link: refactor

    • generate C ABI from Rust code

    :link: refactor

    • emit and link bitcode files instead of object files

    :link: refactor

    • use custom prebuild llvm distribution on ubuntu

    :link: fix

    • emit and link bitcode files instead of obj does not work on MacOS

    :link: feat

    • add mdbook plugin for testing mun code in book

    :link: fix

    • never return type in let initializer

    :link: refactor

    • use Idx instead of macro in arena

    :link: misc

    • split database and added docs

    :link: bump

    • pin rust version to 1.46.0

    :link: bump

    • smol_str dependency to 0.1.17

    :link: feature

    • refactored RawItems into ItemTree

    :link: feature

    • adds fixtures to support multiple files from string

    :link: bump

    • actions/core from 1.2.4 to 1.2.6 in /.github/actions/install-llvm

    :link: fix

    • dont run mun tests on CI

    :link: bump

    • rust 1.47

    :link: fix

    • 7zip issues

    :link: feature

    • adds modules and visibility

    :link: docs

    • fix broken book link and CoC link

    :link: fix

    • alignment of struct fields

    :link: feat

    • add AsValue macro support for enums

    :link: refactor

    • make type-specific data (such as StructInfo) part of TypeInfo

    :link: bump

    • rust 1.48

    :link: feature

    • use statements language support

    :link: bump

    • rust 1.49

    :link: fix

    • shorten commit hash with environment file

    :link: feat

    • adds lsp document symbol provider

    :link: feat

    • integrated new vfs

    :link: feat

    • removed async code and switched to lsp_server

    :link: feat

    • add option to emit IR

    :link: feature

    • adds document symbol provider

    :link: feature

    • implements incremental file updates

    :link: feat

    • runtime linking

    :link: misc

    • adds logging to windows llvm install

    :link: fix

    • manually extract llvm release to get more output

    :link: bump

    • Inkwell beta.2 and LLVM11

    :link: feat

    • describe how to install/build LLVM

    :link: feat

    • add mut keyword

    :link: feat

    • support for completions

    :link: fix

    • parser performance issues

    :link: bump

    • bumps Rust to 1.50

    :link: refactor

    • generate rust tests for code snippets in book

    :link: misc

    • update runtime FFI

    :link: feat

    • updated book for 0.3 changes

    Special thanks to @emi2k01, @tdejager, @ethanboxx, @sinato, @dependabot, @legendiguess, and @sburris0 for their contributions to this release.

    Source code(tar.gz)
    Source code(zip)
    mun-linux64-v0.3.0.tar.gz(27.73 MB)
    mun-osx64-v0.3.0.tar.gz(23.33 MB)
    mun-win64-v0.3.0.zip(21.61 MB)
  • v0.2.1(Jul 8, 2020)

    This patch release for Mun v0.2.0 includes a variety of bug fixes:

    :link: fix

    • Remove return-blocking semicolon from ch01 listing 01 of the book

    :link: fix

    • Code blocks in ch02-02-functions of the book

    :link: fix

    • Replace overly complicated redirection rules with a simple hack

    :link: fix

    • Missing argument for fibonacci function in the book

    :link: refactor

    • Type-safe inkwell types

    :link: fix

    • Replace float with f32 in the book

    :link: fix

    • Windows libclang issues

    :link: fix

    • Rust v1.44 cargo fmt and clippy errors

    :link: fix

    • Crash on missing nested private function

    :link: fix

    • Panic when using mun build

    :link: fix

    • clippy::many_single_char_names in macro

    :link: fix

    • Compiler panics when accessing a field of a temporary

    :link: fix

    • LLVM assertions

    :link: fix

    • Proper tarpaulin skip attribute

    Special thanks to @RadicalZephyr, @benediktwerner, and @fominok for their contributions to this release; and to @jDomantas and @sigmaSd for the initial discovery and reporting of fixed issues.

    Source code(tar.gz)
    Source code(zip)
    mun-linux64-v0.2.1.tar.gz(23.35 MB)
    mun-osx64-v0.2.1.tar.gz(16.28 MB)
    mun-win64-v0.2.1.zip(16.02 MB)
  • v0.2.0(May 16, 2020)

    The second Mun release includes big new features such as hot reloading support for data structures, garbage collection, and full operator and literal support for fundamental types.

    :link: feature

    • Incremental compilation when hot reloading

    :link: docs

    • Install instructions in README

    :link: refactor

    • Use codecov.io instead of coveralls

    :link: feature

    • loop expression

    :link: misc

    • Changed crate authors

    :link: feature

    • break expression

    :link: feature

    • while expression

    :link: feature

    • struct declarations
    • struct literals
    • ABI support for struct types

    :link: docs

    • LLVM install instructions for Arch Linux in README

    :link: refactor

    • Optimised CStr::from_ptr(ptr).to_str() to from_utf8_unchecked in ABI

    :link: test

    • Test UTF-8 validity of compiler-generated CStr

    :link: feature

    • Tools for manual generation of ABI & runtime CAPI bindings

    :link: feature

    • Simple binary operation type checking

    :link: docs

    • License, homepage, and repository information in README

    :link: feature

    • Compiled libraries use munlib extension

    :link: feature

    • Improved error messages for missing function signatures

    :link: feature

    • Marshalling of struct types

    :link: refactor

    • MunStructInfo is appended to MunTypeInfo for struct types

    :link: test

    • Unit test for LineIndex::line_str function

    :link: feature

    • Marshalling of fields with the struct type

    :link: feature

    • Updated Runtime CAPI
    • Unit tests for Runtime CAPI

    :link: feature

    • Support for extern functions in the dispatch table

    :link: feature

    :link: feature

    • Restrict symbol generation to pub functions

    :link: feature

    • Marshalling of struct(value) types

    :link: feature

    • extern functions

    :link: feature

    • Heap-allocated object management using pointer indirection

    :link: feature

    • Size and alignment of types in ABI

    :link: feature

    • Garbage collection using mark & sweep

    :link: misc

    • Code coverage using tarpaulin instead of grcov

    :link: test

    • Test for incremental compilation

    :link: misc

    :link: feature

    • Performance benchmarks

    :link: improvement

    :link: refactor

    • Retrieve TypeInfo and StructInfo during calls in a StructRef

    :link: misc

    :link: docs

    • Updated Arch Linux install instructions in README

    :link: refactor

    • struct memory mapping

    :link: improvement

    • Typed literals
    • Hex, binary, and octal literals
    • Allow underscores in numeric literals

    :link: refactor

    • Use -> instead of : for function return types

    :link: feature

    • i128 and u128 integer types

    :link: misc

    :link: feature

    • Runtime support for extern functions without return type

    :link: misc

    • Merged file_ir and group_ir snapshots

    :link: style

    • Missing space in invoke_fn15 function

    :link: feature

    • % and %= operators

    :link: feature

    • Unary ! and - operators

    :link: feature

    • Cast fundamental types during struct memory mapping

    :link: chore

    • Split artifact generation and CI tests

    :link: refactor

    • Simplified MemoryMapper API
    • Clarified usage of unsafe code

    :link: feature

    • StructRef can be cloned

    :link: feature

    • bool assignment (=) operator
    • struct assignment (=) operator
    • bool and (&&), or (||) operators
    • bitwise and (& and &=), or (| and |=), xor (^ and ^=) operators
    • left-shift (<< and <<=), right-shift (>> and >>=) operators

    :link: improvement

    • Return Rc<RefCell<Runtime>> from RuntimeBuilder

    :link: feature

    • Number type inferencing

    :link: misc

    • Removed float, uint, and int types

    :link: misc

    • Updated code sample in README

    :link: misc

    • Updated badges in README

    :link: feature

    • Garbage collection methods in Runtime CAPI

    :link: test

    • Test for type conversion during memory mapping

    :link: refactor

    • Split FunctionInfo into signature, prototype, and definition

    :link: feature

    • Support for adding extern functions in Runtime CAPI

    :link: misc

    • Removed old snapshots

    :link: feature

    • Map fields with different struct memory kinds during memory mapping
    • Zero initialise fields with different struct types during memory mapping

    :link: misc

    • Buoyancy example

    :link: misc

    • Log upon assembly reload

    :link: misc

    • Cloning instructions in README

    :link: misc

    • Updated code sample in README

    :link: feature

    • Mun book in main repository

    :link: misc

    • crates.io publishing metadata

    :link: misc

    • Updated binaries for Runtime C API

    In addition, there were a lot of bug fixes.

    Special thanks to @legendiguess and @jakbyte for their contributions to this release.

    Source code(tar.gz)
    Source code(zip)
    mun-linux64-v0.2.0.tar.gz(23.27 MB)
    mun-osx64-v0.2.0.tar.gz(16.24 MB)
    mun-win64-v0.2.0.zip(16.00 MB)
  • v0.1.0(Nov 11, 2019)

    First Mun release with hot reloading support for fundamental types and functions.

    :link: feature

    • Auto-generation of Mun ABI for Rust

    :link: feature

    • Rust macros for runtime function invocation

    :link: feature

    • badges
    • licenses

    :link: feature

    • Detection of duplicate definition names

    :link: feature

    • Runtime builder
    • Compiler daemon that detects changed files and recompiles them
    • Command-line interface for Mun Compiler and Mun Runtime

    :link: feature

    • Function call inferencing
    • Generation of function call IR
    • Dispatch table

    :link: feature

    • Integrate dispatch table in Mun runtime

    :link: feature

    • Trait extension of Result type that allows retrying and waiting for a correct result

    :link: feature

    • Automatic generation of C bindings for the runtime

    :link: feature

    • Comparison operators

    :link: feature

    • Parsing of if statements
    • Testing of type inferencing
    • Add cargo husky to enable automatic git hooks
    • never type
    • if statement type checking
    • if expressions code generation
    • Diagnostics for mismatching or missing else
    • Run clippy on CI and pre-commit

    :link: feature

    • C++ bindings for the Mun Runtime
    • Error reporting
    • Example of hot reloading in the Mun Runtime

    :link: feature

    • Update operators and diagnostics

    :link: feature

    • Github actions continuous integration

    :link: feature

    • Generation and upload of artifacts

    :link: feature

    • Statically link against liblld instead of spawning as process

    :link: feature

    • return expressions

    :link: feature

    • Support all fundamental types as return types when starting a Mun library from the CLI
    Source code(tar.gz)
    Source code(zip)
    mun-linux64-v0.1.0.tar.gz(22.79 MB)
    mun-osx64-v0.1.0.tar.gz(15.84 MB)
    mun-win64-v0.1.0.zip(15.72 MB)
Owner
The Mun Programming Language
The Mun Programming Language
Lisp dialect scripting and extension language for Rust programs

Ketos Ketos is a Lisp dialect functional programming language. The primary goal of Ketos is to serve as a scripting and extension language for program

Murarth 721 Dec 12, 2022
A rusty dynamically typed scripting language

dyon A rusty dynamically typed scripting language Tutorial Dyon-Interactive Dyon Snippets /r/dyon Dyon script files end with .dyon. To run Dyon script

PistonDevelopers 1.5k Dec 27, 2022
Rhai - An embedded scripting language for Rust.

Rhai - Embedded Scripting for Rust Rhai is an embedded scripting language and evaluation engine for Rust that gives a safe and easy way to add scripti

Rhai - Embedded scripting language and engine for Rust 2.4k Dec 29, 2022
Implementation of Immix Mark-Region Garbage collector written in Rust Programming Language.

libimmixcons Implementation of Immix Mark-Region Garbage collector written in Rust Programming Language. Status This is mostly usable library. You can

playX 34 Dec 7, 2022
A computer programming language interpreter written in Rust

Ella lang Welcome to Ella lang! Ella lang is a computer programming language implemented in Rust.

Luke Chu 64 May 27, 2022
Oxide Programming Language

Oxide Programming Language Interpreted C-like language with a Rust influenced syntax. Latest release Example programs /// recursive function calls to

Arthur Kurbidaev 113 Nov 21, 2022
The hash programming language compiler

The Hash Programming language Run Using the command cargo run hash. This will compile, build and run the program in the current terminal/shell. Submit

Hash 13 Nov 3, 2022
Interpreted language developed in Rust

Xelis VM Xelis is an interpreted language developed in Rust. It supports constants, functions, while/for loops, arrays and structures. The syntax is s

null 8 Jun 21, 2022
Interactive interpreter for a statement-based proof-of-concept language.

nhotyp-lang Nhotyp is a conceptual language designed for ease of implementation during my tutoring in an introductive algorithmic course at Harbin Ins

Geoffrey Tang 5 Jun 26, 2022
🍖 ham, general purpose programming language

?? ham, a programming language made in rust status: alpha Goals Speed Security Comfort Example fn calc(value){ if value == 5 { return 0

Marc Espín 19 Nov 10, 2022
A small programming language created in an hour

Building a programming language in an hour This is the project I made while doing the Building a programming language in an hour video. You can run it

JT 40 Nov 24, 2022
The Loop programming language

Loop Language Documentation | Website A dynamic type-safe general purpose programming language Note: currently Loop is being re-written into Rust. Mea

LoopLanguage 20 Oct 21, 2022
Scripting language focused on processing tabular data.

ogma Welcome to the ogma project! ogma is a scripting language focused on ergonomically and efficiently processing tabular data, with batteries includ

kdr-aus 146 Dec 26, 2022
Stackbased programming language

Rack is a stackbased programming language inspired by Forth, every operation push or pop on the stack. Because the language is stackbased and for a ve

Xavier Hamel 1 Oct 28, 2021
REPL for the Rust programming language

Rusti A REPL for the Rust programming language. The rusti project is deprecated. It is not recommended for regular use. Dependencies On Unix systems,

Murarth 1.3k Dec 20, 2022
Diplo is a script runner and dependency manager made in rust mainly for Deno.

Diplo is a script runner and dependency manager made in rust mainly for Deno. Documentation Tricked.pro/diplo Installing - windows installer Features

Tricked 23 May 9, 2022
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
Spine runtime for Rust (and wasm!) transpiled from the official C Runtime.

rusty_spine Spine runtime for Rust (and wasm!) transpiled from the official C Runtime. Supports Spine 4.1. [dependencies] rusty_spine = "0.4.0" Onlin

jabu 12 Dec 17, 2022
Nyah is a programming language runtime built for high performance and comes with a scripting language.

?? Nyah ( Unfinished ) Nyah is a programming language runtime built for high performance and comes with a scripting language. ??️ Status Nyah is not c

Stacker 3 Mar 6, 2022
Code-shape is a tool for extracting definitions from source code files

Code-shape Code-shape is a tool that uses Tree-sitter to extract a shape of code definitions from a source code file. The tool uses the same language

Andrew Hlynskyi 3 Apr 21, 2023