diff options
author | Jinho Bang <zino@chromium.org> | 2018-10-16 09:52:33 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-10-15 22:16:55 -0400 |
commit | 1322f3de9f60f86a9c4421169d84e7c7145c3e3b (patch) | |
tree | f81cf58875e625e8daf932a19a3ecb9989378cfe /src/version.rs | |
parent | fb90c6f52587e58378cb1ec7c97392efd3c42afa (diff) |
`deno -v` should report typescript version
Fixes #993
Diffstat (limited to 'src/version.rs')
-rw-r--r-- | src/version.rs | 7 |
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 } |