A webassembly package written in Rust that exports the GS1 crate and adds some convenience features.

koehr ffd1dbe91c initial version 4 years ago
pkg ffd1dbe91c initial version 4 years ago
src ffd1dbe91c initial version 4 years ago
tests ffd1dbe91c initial version 4 years ago
.cargo-ok ffd1dbe91c initial version 4 years ago
.gitignore ffd1dbe91c initial version 4 years ago
.travis.yml ffd1dbe91c initial version 4 years ago
Cargo.toml ffd1dbe91c initial version 4 years ago
README.md ffd1dbe91c initial version 4 years ago

README.md

gs1-wasm

A webassembly package written in Rust that exports the GS1 crate and adds some convenience features for batch processing. It uses wasm-pack for building.

Usage

Because WebAssembly is meant to be loaded asynchronous, an extra step is necessary to use this library. Assuming a webpack environment that supports import():

// loading the package returns a promise
const loadGS1 = import('gs1-wasm')
loadGS1.then(gs1 => {
  /* use library */
})

Building

To build the package, wasm-pack is used. You also need to make sure that you have the wasm32-unknown-unknown target installed:

rustup target add wasm32-unknown-unknown
cargo install wasm-pack

Now the package can be build with wasm-pack build.