Scm2wasm: A Scheme to WASM compiler in 600 lines of C, making use of WASM GC
8 months ago
- #scheme
- #wasm
- #compiler
- scm2wasm被描述为'一个非常糟糕的最小Scheme编译器'
- 构建该编译器需使用命令`make`
- 运行编译器使用命令`./scm2wasm < input.scm > output.wasm`
- 可通过`wasm-tools validate output.wasm`验证输出结果
- 使用`wasm-tools print output.wasm -o output.wat`可将输出转为可读格式
- 编译后的结果可通过`wasmtime -Wgc --invoke start output.wasm`执行