Skip to content

zeropoolnetwork/wasm-mt-pool-helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wasm-mt-pool-helpers

Compiling library

wasm-pack build --release --out-dir mylib --out-name mylib --target no-modules . -- -Z build-std=panic_abort,std

Patching the output .js file might be needed to make it work with bundlers. For example, replace

let wasm_bindgen;
//...
wasm_bindgen = /* ... */;

with

if (typeof window !== 'undefined') {
    window.wasm_bindgen = Object.assign(__wbg_init, { initSync }, __exports);
} else if (typeof self !== 'undefined') {
    self.wasm_bindgen = Object.assign(__wbg_init, { initSync }, __exports);
} else if (typeof global !== 'undefined') {
    global.wasm_bindgen = Object.assign(__wbg_init, { initSync }, __exports);
} else {
    throw new Error('wasm-bindgen failed to find the global object');
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages