diff --git a/lib/clif-backend/src/lib.rs b/lib/clif-backend/src/lib.rs index a69cae42b56..4efe2e7acfc 100644 --- a/lib/clif-backend/src/lib.rs +++ b/lib/clif-backend/src/lib.rs @@ -71,3 +71,6 @@ fn validate(bytes: &[u8]) -> CompileResult<()> { } } } + +/// The current version of this crate +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/lib/emscripten/src/lib.rs b/lib/emscripten/src/lib.rs index b9fae2ef732..9ffd8676d62 100644 --- a/lib/emscripten/src/lib.rs +++ b/lib/emscripten/src/lib.rs @@ -1466,3 +1466,6 @@ pub fn generate_emscripten_env(globals: &EmscriptenGlobals) -> ImportObject { imports } + +/// The current version of this crate +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/lib/runtime-core/src/lib.rs b/lib/runtime-core/src/lib.rs index 055015526be..5840b40a4bd 100644 --- a/lib/runtime-core/src/lib.rs +++ b/lib/runtime-core/src/lib.rs @@ -68,3 +68,6 @@ pub fn validate(wasm: &[u8]) -> bool { } } } + +/// The current version of this crate +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs index 03f4ef1057c..af8311cec9c 100644 --- a/lib/runtime/src/lib.rs +++ b/lib/runtime/src/lib.rs @@ -45,3 +45,6 @@ pub fn instantiate( let module = compile(wasm)?; module.instantiate(import_object) } + +/// The current version of this crate +pub const VERSION: &str = env!("CARGO_PKG_VERSION");