Skip to main content

Content of this directory

The two files in this directory were generated by running

wasm-pack build --target web --release

in the package root of a clone of the git repository containing the vetKD user library (https://github.com/dfinity/ic/tree/master/packages/ic-vetkd-utils). Note that wasm-pack outputs the files into a pkg/ folder.

See also https://github.com/rollup/plugins/tree/master/packages/wasm#using-with-wasm-bindgen-and-wasm-pack.

Notes

Ideally we would simply use the vetKD user library via an npm package (which .tgz can easily be created by first running wasm-pack build --target bundler --release and then running wasm-pack pack; see also https://rustwasm.github.io/docs/wasm-bindgen/reference/deployment.html#bundlers), but unfortunately the rollup bundler doesn't seem to support this kind of package yet (only the webpack bundler seems to work currently) because with the entry

"ic-vetkd": "file:vetkd_user_lib/ic-vetkd-0.1.0.tgz",

in the dependencies section in package.json, we run into the following runtime error

TypeError: wasm.__wbindgen_add_to_stack_pointer is not a function

Maybe in the future rollup will support npm packages, but as of now this doesn't seem to be the case.