mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-30 08:51:05 +00:00
This commit refactors WebIDL code generation to walk over the fields of `FirstPassRecord` instead of walking the AST again. This helps remove redundancies like checking `is_chrome_only` as well as revisiting partial interfaces and such. This should make it more clear that the first pass's job is to walk the AST and collect all relevant information, while the codegen pass is purely about appending items to a `Program`. Additionally this refactoring will also soon be used to prepare different data structures for operation overloadings, avoiding the need to walk those ASTs twice.
Julia Set
This is an example of more complex computations needed to generate a fractal (Julia Set).
It's also an example of direct interaction with CanvasRenderingContext2D's API via #[wasm_bindgen]
macro.
You can build the example with:
$ ./build.sh
(or running the commands on Windows manually)