Embed compiled wasm into binary?

Hi,

for testing purposes, I want to include the WASM I compile a crate to into another crate. Is there a way to do this elegantly?

So basically I have:

  • Crate A -> compiled to WASM
  • Crate B -> include_bytes!(<WASM of crate A>).

I fail to find a way how to do this in a clean way...

It seems that I need artifact dependencies for this.

FWIW, I found this reddit thread where OP asked the same question... and artifact dependencies seem to be the solution here (although I am not able to use them, as I am running on stable rust).

So I have to find a way to fiddle myself around the issue somehow...

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.