Skip to content

Instantly share code, notes, and snippets.

@heyimalex
Created March 13, 2019 07:09
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heyimalex/6e93d2abb2113d6d93e7e28b159d8b02 to your computer and use it in GitHub Desktop.
Save heyimalex/6e93d2abb2113d6d93e7e28b159d8b02 to your computer and use it in GitHub Desktop.
Looking at npm projects that are good candidates for being re-written in rust / webassembly!

rust-js

Looking at projects that are good candidates for being re-written in rust / webassembly!

https://www.npmjs.com/package/moment-timezone

could build off work in rust: https://github.com/chronotope/chrono

see also:

Ok, this is just obvious. Could lean heavily on yaml-rust

It's being worked on here (to some degree)

https://github.com/sunng87/handlebars-rust

Still, a drop in replacement would be cool?

Other templating libs:

postcss and associated plugins

like the babel clone, really hard and the whole ecosystem needs to be rewritten. nah.

querystring parsing. it's maybe a good candidate (parsing library), but it's pretty ugly imo, and I think that

probably not

Like js-yaml, probably a good candidate. Someone else has surely done the work of making a markdown parser in rust already.

Eh, not too keen on this. The biggest benefit is that I get to take advantage of rust's compile time perfect hashing jam to make lookup tables fast.

json schema vaidator, probably one exists in rust

limited utility: native in node 6+ and browsers.

getting this up and running would be fairly easy, but getting it to be the best wasm md5 impl possible would take some work and you'd probably learn a lot.

prettier

would probably be a super cool and very popular project honestly, but the amount of work is huge

my work on syntect_wasm compilation should be the decider! see also:

this could be interesting! and maybe even reasonably faster. However, the chaining api makes it a little hard to imagine.

see also:

time parsing and conversion

css minifier. see also: https://www.npmjs.com/package/cssnano

human readable file sizes

self explanatory see also: https://www.npmjs.com/package/adm-zip

native image processing, 0.5m weekly downloads and would probably see very large perf improvements. May be stuff in the rust ecosystem that's already trying this.

@mrcnski
Copy link

mrcnski commented Mar 13, 2019

glob https://github.com/isaacs/node-glob#readme

There is already a glob crate ;)

@corbinu
Copy link

corbinu commented Mar 13, 2019

I have been working on a rewrite of sax and a axios replacement in rust/wasm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment