Skip to content

0.6.0 – Big restructuring

Compare
Choose a tag to compare
@liquidev liquidev released this 27 Oct 21:30

This release does not add any new features to the language or the API, but rather aims to refine the existing implementation a bit.

  • Breaking: mica-language, mica-hl, and mica-std are now consolidated into the singular mica crate.
    • mica-language is available under mica::ll, with ll standing for low-level.
    • mica-hl is reexported at the root of the crate.
    • The standard library mica-std has been renamed to the core library and is available under mica::corelib.
      • Following the rename, mica::StandardLibrary was renamed to mica::CoreLibrary.
      • The std-io feature was removed because it was largely unimplemented.
  • Breaking: Engine initialization has been simplified to just Engine::new(). This loads the default core library mica::corelib::Lib.
  • Thanks to the changes above, the documentation now features lots of examples, because you don't need mica-std to initialize an engine anymore!
  • Breaking: It is now impossible to create varargs methods inside of custom types. This was intended to be a feature initially but never got implemented; it can be implemented in a backwards-compatible way so restricting methods to fixed argument counts is only breaking one-way.
    • As part of this change, the TypeBuilder::add_raw_* family of functions now accepts a u16 parameter count rather than impl Into<Option<u16>>. This is still not ideal because methods can only ever accept up to 255 arguments, but it will do for the time being.
    • Also as part of this change, mica::ffvariants::Bare was split into BareMaybeVarargs and BareExactArgs to let us specify non-varargs functions explicitly.
  • Internal change: the giant macro in mica::hl for generating ForeignFunction implementations was removed in favor of offline code generation.
    • For users, this does not introduce a build.rs that would further extend compilation times - the generated code is checked into the repository.
    • In fact, our current build.rs was deemed unnecessary and has been removed. It only ever checked for NaN boxing support, which can be done just as well using existing #[cfg] directives.
  • Style change: Code is now indented with 4 spaces instead of 3. Yes, this includes Mica code.
    • The rustfmt.toml is definitely not final and may change in the future, perhaps to remove the unstable feature requirement, or wrap certain things (like struct initialization) more aggressively.