Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One cool thing about parcel is that you can use es import syntax to "import" stuff from rust modules. It will then automagically do all the wasm interfacing for you during the bundling process. Wow!

You can also import stuff from wasm modules too of course, but I like the magic of "importing rust into JavaScript". It seems like a great way for someone like me, who wants to learn, to use rust into a simple web project without worrying too hard about wasm.

https://parceljs.org/rust.html



You can do that with webpack, that feature is not specific to parcel https://github.com/rustwasm/wasm-pack


Sure. With Webpack you can find a Medium article that tells you how to install and configure a plugin, run into places where things changed because of major webpack versions and plugin ecosystem evolution, and after enough digging you might get it working.

In Parcel you include the rs file. Seriously.


This sums up my experience with webpack quite nicely. It doesn't help that boilerplates like CRA are so ergonomic in terms of saving startup time in other places as well, because this means I really need to have a good reason to manually fuck with webpack. This combined means every time I finally end up looking at webpack, my knowledge of it is super rusty. I've definitely been side-eyeing parcel for a while




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: