- Language:
- Dynamically typed
- Verification:
- Functions specify arguments and return invariants similar to contracts.
- All contracts are property-checked at build time.
- Targets:
- Interpreter
- JavaScript
- functions
- i32
- variables
- conditionals & loops
- online playground
- other stack types
- structs
- arrays
- validation w/property-based testing
- validation w/fuzzing
- standard library
- io
- Phases:
- parser: Source code to
parsed
- renamer:
parsed
toplain
- Desugars some syntactic sugar.
- Top-level values explicitly declare the non-local values they depend on.
- binder:
plain
tobound
- Resolves all references to their definitions.
- simplifier:
plan
tosimple
- Simple is an untyped TAC-like language.
- codegen:
simple
tofragment
- Takes simple and generates an output.
- interpret:
simple
toValue
- Takes simple and interprets it. Useful for testing.
- parser: Source code to
# Watch the output of a phase
cargo watch -x 'run compile ./compiler/example/id.kedi --out - --out-parsed -' --clear
# Run the tests
cargo xtask test
# Build the compiler-web project and put it to appropriate location on `website` project
cargo xtask build-compiler-web-artifacts
# Given a wasm file, optimise with wasm-opt to compare
wasm2wat out.wasm > out.wat && wasm-opt out.wasm -o opt.wasm -O && wasm2wat opt.wasm > opt.wat