0.1.2 • Published 6 years ago
@nvcook42/parser v0.1.2
Rust implementation of a Flux parser
Installing toolchain
Install Rust https://www.rust-lang.org/tools/install
Install wasm-pack:
$ cargo install wasm-packSee this for a hello world example of using Rust with WASM and npm.
Build WASM
Use wasm-pack to build an npm package from the compiled wasm code.
$ cd internal/rust/parser
$ wasm-pack buildLink npm modules
This only needs to be done once to create symlinks that npm can use to consume the wasm npm package without publishing it.
$ cd internal/rust/parser/pkg
$ npm link
$ cd ../../site
$ npm link parserRun in Browser
Test
Use cargo
$ cd internal/rust/parser
$ cargo test