Skip to content

Commit

Permalink
add wasmer instructions to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iliabylich committed Feb 2, 2024
1 parent 87a1ee7 commit 986975f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,19 @@ assert_eq!(template, "data foo");
```

You can also check more complicated filter (like [`render_comment`](https://github.com/lib-ruby-parser/nodes/blob/master/src/filters/render_comment.rs)) to understand how parameters can be passed.

## Publishing codegen script to wasmer.io

1. bump version in `wasmer.toml`
2. `cargo build --example codegen --release --target wasm32-wasi`
3. `wasmer publish`

Once published can be executed with

```sh
$ wasmer run \
--mapdir /pwd:. \
iliabylich/lib-ruby-parser-nodes -- \
--template /pwd/template.liquid \
--write-to /pwd/output.ext
```

0 comments on commit 986975f

Please sign in to comment.