0.1.2 • Published 5 years ago

@nvcook42/parser v0.1.2

Weekly downloads
-
License
-
Repository
-
Last release
5 years ago

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