summaryrefslogtreecommitdiff
path: root/src/version.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/version.rs')
-rw-r--r--src/version.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/version.rs b/src/version.rs
index bfd47012c..475ab319e 100644
--- a/src/version.rs
+++ b/src/version.rs
@@ -3,12 +3,11 @@ use libdeno;
use std::ffi::CStr;
// This is the source of truth for the Deno version. Ignore the value in Cargo.toml.
-const DENO_VERSION: &str = "0.1.8";
+pub const DENO_VERSION: &str = "0.1.8";
-pub fn print_version() {
+pub fn get_v8_version() -> &'static str {
let v = unsafe { libdeno::deno_v8_version() };
let c_str = unsafe { CStr::from_ptr(v) };
let version = c_str.to_str().unwrap();
- println!("deno: {}", DENO_VERSION);
- println!("v8: {}", version);
+ version
}