@nvcook42/parser

Install Rust https://www.rust-lang.org/tools/install

Usage no npm install needed!

<script type="module">
  import nvcook42Parser from 'https://cdn.skypack.dev/@nvcook42/parser';
</script>

README

Rust implementation of a Flux parser

Installing toolchain

Install Rust https://www.rust-lang.org/tools/install

Install wasm-pack:

$ cargo install wasm-pack

See 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 build

Link 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 parser

Run in Browser

Test

Use cargo

$ cd internal/rust/parser
$ cargo test

Build Go binary