| Crates.io | ergo-lib-wasm |
| lib.rs | ergo-lib-wasm |
| version | 0.28.0 |
| created_at | 2020-10-06 12:36:35.027725+00 |
| updated_at | 2024-08-09 15:03:28.188795+00 |
| description | WASM bindings for ergo-lib |
| homepage | |
| repository | https://github.com/ergoplatform/sigma-rust |
| max_upload_size | |
| id | 296611 |
| size | 353,939 |
WebAssembly library with JS/TS bindings for sigma-rust.
Packages(npm):
On CI build (job JS tests) an alpha build of npm packages is published. The version of the alpha build is comprised of the next minor version with git commit hash suffix (i.e if the current version is 0.12.0 then alpha build will be 0.13.0-alpha-[COMMIT]) and published with alpha tag. See JS tests CI job output for details.
node js tests and browser js tests.browser js tests.ergo-lib-wasm and include the pkg folder as dependency in my app I get "TypeError: TextDecoder is not a constructor".Make sure webpack plugins TextDecoder and TextEncoder are enabled. Check the following lines in webpack config:
new webpack.ProvidePlugin({
TextDecoder: ['text-encoder', 'TextDecoder'],
TextEncoder: ['text-encoder', 'TextEncoder']
})
https://github.com/ergoplatform/sigma-rust/blob/develop/bindings/ergo-lib-wasm/webpack.config.js#L16
create-react-appCRA does not support WASM. But you can workaround it. You need to override webpack config. Check out - https://stackoverflow.com/questions/59319775/how-to-use-webassembly-wasm-with-create-react-app/59720645#59720645