rust-embed icon indicating copy to clipboard operation
rust-embed copied to clipboard

A feature analogous to debug-embed, but for WASM?

Open JohnDowson opened this issue 1 year ago • 2 comments
trafficstars

My use case is that I want embed some prefabs in wasm build, but load them(as well as user-defined ones) from fs at runtime everywhere else.

JohnDowson avatar Dec 07 '23 18:12 JohnDowson

What wasm runtime are you using? Does it support he WASI API. It should technically work though if it builds.

pyrossh avatar Dec 08 '23 15:12 pyrossh

I am running in the browser.

Should probably explain my use case better.
I am building a modular synthesizer, and I need some default modules and widget prefabs to serve as examples. For the most part, I can ask the user to select a file to load, but it's bad UX to ask the user to download example for use with a web app.

So I want to bundle those examples on wasm32, but keep loading everything at runtime on native, in case the user made or downloaded some extra modules.

JohnDowson avatar Dec 08 '23 15:12 JohnDowson