You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to request the addition of Node.js support for this Rust library. This can be achieved by creating an npm package that allows Node.js developers to easily install and use the Rust library in their JavaScript/TypeScript projects.
The text was updated successfully, but these errors were encountered:
As the existing wasm implementation can't be ported directly to a public wasm library, I'll check what can be done at this point to port the library to a wasm version nicely.
I couldn't write it because it was not simple to convert data types between Rust and JS (except for some hacky ways), but it seems possible now.
I'm working on this, but it looks like the "optimal (minimal-sized)" version of wasm library (for JS/TS) is currently not available yet. 1
But if you don't mind occupying your disk a little bit more (about +100KB 2), you can use the eth-blockies@0.0.1-dev.2 package (temporary dev version) in your Node.js projects for now. 3
This dev version 0.0.1-dev.2 will remain forever, even after optimized versions are published.
Footnotes
The current Rust implementation only supports const size for identicon outputs, so an output size to use must be specified before compiling a Rust code.
This isn't much of a problem when using the library directly on Rust since library users can specify their size before compiling.
However, a wasm file is a compiled output, so wasm codes for all size candidates must be generated and compiled into a single wasm file so that library users can choose a size they want.
I'm thinking of adding support for runtime-sized blockies to Rust implementation first, then replacing constant functions in the JS/TS wrapper library with the new runtime ones to make the wasm file smaller. ↩
Estimated file size to be decreased after optimization ↩
It's marked as temporary version but it should make the same outputs with ones from the Rust version. "Temporary" here is mainly for JS/TS wrapper function signature (e.g. arguments or returned data type of wrapper functions can be changed dramatically on later versions), not for implementation of generator Rust functions itself. ↩
I would like to request the addition of Node.js support for this Rust library. This can be achieved by creating an npm package that allows Node.js developers to easily install and use the Rust library in their JavaScript/TypeScript projects.
The text was updated successfully, but these errors were encountered: