Open anp opened 4 years ago
I haven't investigate this at all yet. insta
really could benefit from a few utilities provided by either rusttest or the language itself so I wouldn't be surprised we run into more of those. For instance another thing is that we're using the thread name to find the test name which is known to be an issue (https://github.com/rust-lang/rust/issues/70492). Likewise we don't have a reliable way to get the cargo workspace root (https://github.com/rust-lang/cargo/issues/3946).
Both of those things are likely what you will encounter in a more painful form in your wasm environment.
AFAICT the main obstacles to supporting code running in a wasm-bindgen-test context relate to loading information about the project workspace and the snapshot files themselves. Anything else?
The main approaches to loading that data that come to mind for me right now:
include_str!
-- this would be more tedious to set up but understandable given environment constraintsI'm curious if it's something the authors have thought about, and if so what other directions seem promising.