diff --git a/lib/clif-backend/src/lib.rs b/lib/clif-backend/src/lib.rs index a69cae42b..4efe2e7ac 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 b9fae2ef7..9ffd8676d 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 055015526..5840b40a4 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 03f4ef105..af8311cec 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");