mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-31 01:11:06 +00:00
Merge pull request #944 from alexcrichton/windows-slash
Fix web-sys build on some Windows builds
This commit is contained in:
commit
1410b5253d
@ -108,6 +108,7 @@ fn try_main() -> Result<(), failure::Error> {
|
|||||||
let out_dir = env::var("OUT_DIR").context("reading OUT_DIR environment variable")?;
|
let out_dir = env::var("OUT_DIR").context("reading OUT_DIR environment variable")?;
|
||||||
let out_file_path = path::Path::new(&out_dir).join("bindings.rs");
|
let out_file_path = path::Path::new(&out_dir).join("bindings.rs");
|
||||||
fs::write(&out_file_path, bindings).context("writing bindings to output file")?;
|
fs::write(&out_file_path, bindings).context("writing bindings to output file")?;
|
||||||
|
println!("cargo:rustc-env=BINDINGS={}", out_file_path.display());
|
||||||
|
|
||||||
// run rustfmt on the generated file - really handy for debugging
|
// run rustfmt on the generated file - really handy for debugging
|
||||||
println!("cargo:rerun-if-env-changed=WEBIDL_RUSTFMT_BINDINGS");
|
println!("cargo:rerun-if-env-changed=WEBIDL_RUSTFMT_BINDINGS");
|
||||||
|
@ -27,4 +27,4 @@ pub fn window() -> Option<Window> {
|
|||||||
js_sys::global().dyn_into::<Window>().ok()
|
js_sys::global().dyn_into::<Window>().ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
include!(env!("BINDINGS"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user