Skip to content

tomka/ngpre-wasm

Repository files navigation

NG-Pre Build Status

Browser-compatible WASM bindings to the Rust implementation of the Neuroglancer Precomputed n-dimensional tensor file storage format. This library is based on the n5-wasm and rust-n5 libraries and reused a lot of its infrastructure. Sharded datasets are supported.

NGPre datasets must be available via CORS-compatible HTTP.

Currently only zip and jpeg chunk compression is supported.

Build Instructions

This assumes you have rustup installed.

git clone https://github.com/tomka/ngpre-wasm
cd ngpre-wasm
rustup override set nightly
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack build --target no-modules --release
echo "self.ngpre_wasm = wasm_bindgen;" >> pkg/ngpre_wasm.js

The built npm package will be in pkg/.

Buld and update CATMAID:

wasm-pack build --target no-modules --debug && echo "self.ngpre_wasm = wasm_bindgen;" >> pkg/ngpre_wasm.js && cp pkg/ngpre_wasm_bg.wasm /django/applications/catmaid/static/libs/ngpre-wasm && cp pkg/ngpre_wasm.js /django/applications/catmaid/static/libs/ngpre-wasm

chromium --disable-web-security --user-data-dir=/tmp/google-chrome-user

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •