Skip to content

Commit

Permalink
chore: fix 404 binaryen.ml URL (#2228)
Browse files Browse the repository at this point in the history
Signed-off-by: zhoufanjin <[email protected]>
  • Loading branch information
zhoufanjin authored Jan 14, 2025
1 parent 4b56c53 commit 3b362a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/contributor/compiler_walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Each Grain source file is compiled to a Grain-specific object file containing th

## Code generation

The code generation (or codegen) step is where we generate the actual WebAssembly code for the program. By this point, we should have reduced the complexity of the original program down enough that there is a straightforward set of WebAssembly instructions for each action that needs to happen. We use a project called [Binaryen](https://github.com/WebAssembly/binaryen) to generate our wasm code, via [Binaryen.ml](https://github.com/grain-lang/binaryen.ml). You can get a general idea of how Binaryen works from the example in the [Binaryen.ml README](https://github.com/grain-lang/binaryen.ml/blob/main/README.md). You can then see how we use it in Grain in [codegen/compcore.re](https://github.com/grain-lang/grain/blob/main/compiler/src/codegen/compcore.re).
The code generation (or codegen) step is where we generate the actual WebAssembly code for the program. By this point, we should have reduced the complexity of the original program down enough that there is a straightforward set of WebAssembly instructions for each action that needs to happen. We use a project called [Binaryen](https://github.com/WebAssembly/binaryen) to generate our wasm code, via [Binaryen.ml](https://github.com/grain-lang/binaryen.ml). You can get a general idea of how Binaryen works from the example in the [Binaryen.ml README](https://github.com/grain-lang/binaryen.ml/blob/master/README.md). You can then see how we use it in Grain in [codegen/compcore.re](https://github.com/grain-lang/grain/blob/main/compiler/src/codegen/compcore.re).

If you're curious about the wasm spec in general, you can check it out [here](https://webassembly.github.io/spec/core/index.html).

Expand Down

0 comments on commit 3b362a2

Please sign in to comment.