Skip to content

Mini 0.7.0

Choose a tag to compare

@github-actions github-actions released this 31 Oct 19:47
f353826

Mini 0.7.0 makes the LLVM API backend the default for installed native builds, adds a persistent native REPL, and speeds up browser compilation by reusing compiled libraries.

Highlights

  • LLVM API by default. Installed mini build, mini run, mini test, minic build, and minic run use the LLVM API backend. LLVM is linked into the compiler; users do not need a separate LLVM installation. Use --backend=c for the C backend. The portable C bootstrap seed remains available.
  • Persistent native REPL. Run mini repl to define val, var, and fun declarations and evaluate expressions in a reusable ORC JIT session. Earlier inputs are compiled once rather than replayed. Compile errors preserve accepted declarations. The REPL itself does not require a system C compiler.
  • Reusable browser libraries. The playground and notebook compile user code live and reuse compatible compiled standard-library, Plot, and Tensor objects. Libraries load lazily and are cached. No precompiled example programs are shipped; recent successful compilations can be cached locally, subject to storage availability and cache limits. Other optimization settings retain the whole-module fallback.
  • Consistent floating-point rounding. Generated C disables fused contraction to preserve rounding after each Kotlin arithmetic operator, matching the LLVM backend. Both Clang and GNU GCC have regression coverage.

Install

curl -fsSL https://raw.githubusercontent.com/HenrySchwerdt/mini/main/install.sh | sh
mini repl

Archives are provided for Linux x64, Linux arm64 and macOS arm64, along with the C bootstrap seed and SHA256SUMS. Native program linking still requires a C compiler and system development libraries. The REPL uses the bundled JIT directly.

Performance

In local warmed Node/YoWASP tests with matching output, reusable library objects reduced Plot compilation from roughly 13–14 seconds to 0.4–0.6 seconds and Tensor compilation from roughly 7 seconds to 0.5–0.8 seconds. These measurements exclude cold toolchain downloads and initialization; results depend on the device and program.

The C backend now disables contraction to preserve per-operator rounding. Outputs matched on the measured Mandelbrot and N-Body workloads; initial measurements showed the LLVM API output about 2% and 6% faster respectively; this is not a guarantee for every program.

Current limits

  • The REPL accepts one complete input per line. Multiline declarations, imports, classes, package declarations, top-level main, and name redefinition are unsupported. Runtime exceptions can terminate the session.
  • With the LLVM API backend, -g selects unoptimized code; use --backend=c -g for native debug symbols.
  • First browser use still downloads and initializes the compiler toolchain. Library reuse primarily reduces compilation after initialization.

All changes since v0.6.0

  • Package the plain compiler as the portable C seed (9fbda08)
  • Preserve exception checks across wasm library objects (9bd3789)
  • Prepare version 0.7.0 release notes (3c43f31)
  • Include zstd license in release archives (c995a7f)
  • Fix API REPL and linker command handling (2442545)
  • Make LLVM API compiler the release default (a5fe58a)
  • Verify strict FP regression with GNU GCC in CI (5af841a)
  • Exclude dependency-owned shared mlib helpers (575c437)
  • Preserve strict floating point rounding in C output (c508471)
  • Keep inherited library dispatch imports external (0429d05)
  • Gate library object fetches on mlib hash (18801d2)
  • Fix WASI calloc ABI and object fetch gating (0d12002)
  • Add reusable wasm objects for preinstalled libraries (405eb0a)
  • Run ORC session API smoke test natively (b49bf11)
  • Split native REPL CI tests into named steps (842ea78)
  • Fix K2 oracle native REPL JVM compatibility (b18faf2)
  • Keep REPL JIT conventions consistent across inputs (8caaa1e)
  • Keep REPL JIT conventions consistent across inputs (3b7f681)
  • Fix native REPL input and cross-module ownership (b23a0e8)
  • Test local compile cache behavior (58b1ab0)
  • Add persistent LLVM ORC native REPL (020d410)
  • Precompile browser standard and bundled libraries (36a30a5)
  • Remove precompiled program artifacts (5ebae8b)