mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-07-31 12:01:55 +00:00
Fix web-sys build on some Windows builds
The official pathname separator on Windows is `\` instead of `/`, but we've been unconditionally using `/`. This typically works on Windows because Cargo's default `OUT_DIR` listing is a normal `C:\...` path which works with either `/` or `\`. If, however, a user sets `CARGO_TARGET_DIR` to a UNC-style path like `\\?\C:\...` then `/` is *not* the same as `\`, but rather `/` is interpreted as part of the file name (to allow file names with `/` in the name). Let's bypass all this and just use a build script output env var. Closes #943
This commit is contained in:
@@ -27,4 +27,4 @@ pub fn window() -> Option<Window> {
|
||||
js_sys::global().dyn_into::<Window>().ok()
|
||||
}
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
||||
include!(env!("BINDINGS"));
|
||||
|
Reference in New Issue
Block a user