This Month in Mun - December 2019

January 01, 2020, The Mun Team

December is often perceived as a month that emphasizes family and togetherness. The Mun community for one really did pull together, allowing the core contributors to focus on making data structures a reality. This month, we’ve implemented:

  • Parsing of tuple data structures
      struct Baz(float, int);
  • Parsing and type inferencing of data structure literals
      struct Foo;
      struct Bar {
          a: float,
      struct Baz(float, int);
      fn main() {
          let a: Foo = Foo;
          let b: Bar = Bar { a: 1.23, };
          let c = Baz(1.23, 1);
  • Indexing of data structure fields
      fn main() {
          let foo = Foo { a: 1.23, };
          let bar = Bar(1.23, 4);
  • Generation of LLVM IR for data structure declarations, literals, and field indexing
  • Add data structure information to the Mun ABI
      typedef struct
          /// Struct name
          const char *name;
          /// Struct fields' information
          const MunTypeInfo *field_types;
          /// Number of fields
          const uint16_t num_fields;
      } MunStructInfo;
  • Loading data structure information into the Mun Runtime

We also made some minor fixes for the latest version of Rust and added type checking of binary operations:

fn foo() {
    let b = false;
    let n = 1;
    let _ = b + n; // error: invalid binary operation

Meanwhile, the Mun community has not been standing by idly:

  • We welcomed our first community contributions (PRs #66 & #67) for two of our good first issues. This is a great way for community members to gain an understanding of our codebase and workflow, while helping us implement important fixes and improvements.

  • A community member who works on Veloren, created a proof of concept for Mun-powered hot reloading inside the game:

    Mun hot reloading in Veloren

Are you interested in contributing to Mun or do you just want to receive the latest updates? Then join us on Discord, follow us on Twitter, or watch us on Github.