diff options
Diffstat (limited to 'ext/node/build.rs')
-rw-r--r-- | ext/node/build.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/node/build.rs b/ext/node/build.rs new file mode 100644 index 000000000..e9b960cab --- /dev/null +++ b/ext/node/build.rs @@ -0,0 +1,10 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +fn main() { + // we use a changing variable name to make it harder to depend on this + let crate_version = env!("CARGO_PKG_VERSION"); + println!( + "cargo:rustc-env=NODE_GLOBAL_THIS_NAME=__DENO_NODE_GLOBAL_THIS_{}__", + crate_version.replace('.', "_") + ); +} |