I think all we need to bridge the boundary for publishing to crates.io & npm is a "post-publish" hook for cargo. Perhaps more hooks too would be grand (test, docs, bench), but this would be the baseline I reckon.
-
Show this thread
-
Ohh, also just found about about "[package.metadata]" in Cargo.toml. Could easily do "[package.metadata.npm]" for npm specific things - and otherwise assume Rust libs should be published as "libname-wasm" on npm. Should make it reallll easy to publish hey.
1 reply 0 retweets 1 likeShow this thread
The "main" target for the package.json could just directly be the WASM binary. Can easily inline it for the browser - but also serve up for streaming. Assuming `.wasm` can't be required yet in Node, doing `var libname = new Buffer(require.resolve('libname-wasm'))` should cut it.
8:43 AM - 21 Jan 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.