emk / heroku-buildpack-rust

A buildpack for Rust applications on Heroku, with full support for Rustup, cargo and build caching.
522 stars 186 forks source link

How to compile WASM? #46

Closed David-OConnor closed 4 years ago

David-OConnor commented 4 years ago

Can we use this to comiple WASM, eg with cargo make? Stated another way, can we have it run cargo make build (etc) on launch, where the corresponding Makefile knows how to build the wasm modules?

emk commented 4 years ago

Hmm, interesting idea! I would recommend using Heroku's multi-buildpack support for this, or possibly considering using wasm-pack or a similar tool to manage WASM builds as part of your front end.

If somebody has a concrete proposal that describes a single good way to do this for typical Rust projects (with no extra configuration), I'd be happy to consider the proposal! But I don't have time to design this myself, unfortunately, so I'm going to close the issue until then.

Thank you again for the suggestion!