A webassembly package written in Rust that exports the GS1 crate and adds some convenience features.
|
%!s(int64=5) %!d(string=hai) anos | |
---|---|---|
pkg | %!s(int64=5) %!d(string=hai) anos | |
src | %!s(int64=5) %!d(string=hai) anos | |
tests | %!s(int64=5) %!d(string=hai) anos | |
.cargo-ok | %!s(int64=5) %!d(string=hai) anos | |
.gitignore | %!s(int64=5) %!d(string=hai) anos | |
.travis.yml | %!s(int64=5) %!d(string=hai) anos | |
Cargo.toml | %!s(int64=5) %!d(string=hai) anos | |
README.md | %!s(int64=5) %!d(string=hai) anos |
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.
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 */
})
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
.