- Rust toolchain (for building the runtime)
- C toolchain (for linking with libc)
just
(for running examples and tests)- Technically optional but recommended, for convenience.
- GHC (for building MHS)
GHC
is technically optional but recommended, since self-hosted MHS is quite slow compared to GHC-hosted MHS.
Install dependencies (see links).
Several convenience targets are defined by the justfile
.
You can list them by running just
without arguments.
Working with examples:
$ just eg Example # Build and run a basic example
Compiling Example to Example.comb... OK
Some factorials
[1,2,6,3628800]
$ just trace StrictData # Build and run an example with verbose logging
Compiling StrictData to StrictData.comb... OK
### OMITTED LOGGING VERBIAGE ###
Working with MicroHs regression tests (which are vendored):
$ just compile-test Arith # Build MicroHs regression test
Compiling Arith to Arith.comb... OK
$ just test Arith # Run MicroHs regression test
Arith ... [PASS]
What is left to achieve language feature-parity with MHS's eval.c
:
- Garbage collection (we never run
gc_arena
'scollect()
function lol) - Arrays
StrEqual
andCompare
- Node casting
- RNF
- Most FFI stubs (famous last words: this should be straightforward)
- Dynamic FFI symbol resolution
- Serialization/deserialization
And optimizations to address some known deficiencies (though it would be interesting to benchmark without these optimizations):
- Packed memory layout
- String memory layout
- Array memory layout
- Be less safe about error-handling (many are unnecessary)