rust-wasm-loader icon indicating copy to clipboard operation
rust-wasm-loader copied to clipboard

make runtime respect `options.path`

Open jcppman opened this issue 6 years ago • 3 comments

This fixes https://github.com/ianjsikes/rust-wasm-webpack-tutorial/issues/7

when using cargo-web's built-in backend, the generated standalone runtime hardcoded file path as 'xxx.wasm'. It causes error when the .wasm file is at that location. Thus we use a custom runtime instead to get the .wasm from the correct location.

jcppman avatar Jun 19 '19 08:06 jcppman

Thank you for this patch Chriest, will review!

On Wed., Jun. 19, 2019, 4:45 a.m. Chriest Yu, [email protected] wrote:

This fixes ianjsikes/rust-wasm-webpack-tutorial#7 https://github.com/ianjsikes/rust-wasm-webpack-tutorial/issues/7

when using cargo-web's built-in backend, the generated standalone runtime hardcoded file path as 'xxx.wasm'. It causes error when the .wasm file is at that location. Thus we use a custom runtime instead to get the .wasm from the correct location.

You can view, comment on, or merge this pull request online at:

https://github.com/ianjsikes/rust-wasm-loader/pull/13 Commit Summary

  • make runtime respect options.path

File Changes

Patch Links:

  • https://github.com/ianjsikes/rust-wasm-loader/pull/13.patch
  • https://github.com/ianjsikes/rust-wasm-loader/pull/13.diff

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ianjsikes/rust-wasm-loader/pull/13?email_source=notifications&email_token=AAAGM5YKP4Z3AWET545WOCLP3HWZVA5CNFSM4HZHIRV2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2KX3IQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAGM545ZNII6RFUSJMQTR3P3HWZVANCNFSM4HZHIRVQ .

germania avatar Jun 19 '19 11:06 germania

This adds an eval call, is it possible to avoid that?

germania avatar Jun 19 '19 16:06 germania

I just realized that since it's in a string, we can just put it there directly.

Fixed!

jcppman avatar Jun 20 '19 02:06 jcppman