Skip to content

Commit

Permalink
Merge pull request #944 from alexcrichton/windows-slash
Browse files Browse the repository at this point in the history
Fix web-sys build on some Windows builds
  • Loading branch information
alexcrichton authored Oct 8, 2018
2 parents 6a9ad2e + 18deb5e commit 1410b52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/web-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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_file_path = path::Path::new(&out_dir).join("bindings.rs");
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
println!("cargo:rerun-if-env-changed=WEBIDL_RUSTFMT_BINDINGS");
Expand Down
2 changes: 1 addition & 1 deletion crates/web-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));

0 comments on commit 1410b52

Please sign in to comment.