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
-
Replying to @yoshuawuyts
assuming publishing to crates.io, then to npm: npm already has prepublish – running a bunch of cargo commands there should be same as running a bunch of npm commands in a cargo postpublish, right?
1 reply 0 retweets 1 like -
Replying to @killercup
True! - but if it's an actively developed Rust project, it would probably feel odd to use npm commands to do all the Rust things haha. I'm thinking like a _full_ auto deploy for Rust - just multiple output targets, and perhaps an epiphemeral package.json file :D
2 replies 0 retweets 1 like -
Replying to @yoshuawuyts
That makes sense! a `cargo npm` that builds a package.json from stuff you have in your cargo.toml doesn't sound far fetched, afaik https://crates.io/crates/cargo-deb … works like that (cargo subcommands are just binaries in
$PATH that are named cargo-NAME)1 reply 0 retweets 3 likes
yosh Retweeted yosh
Ohhh, yeah that'd be really cool! - should make prototyping a workflow super easy. Also with: https://twitter.com/yoshuawuyts/status/955118247921246209 … it should be customizable enough! :D
yosh added,
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.