2018-08-17 16:34:30 -04:00
|
|
|
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
2018-09-04 18:56:12 -04:00
|
|
|
use libdeno;
|
2018-08-17 16:34:30 -04:00
|
|
|
use std::ffi::CStr;
|
|
|
|
|
|
|
|
// This is the source of truth for the Deno version. Ignore the value in Cargo.toml.
|
2018-10-12 13:19:54 -04:00
|
|
|
const DENO_VERSION: &str = "0.1.8";
|
2018-08-17 16:34:30 -04:00
|
|
|
|
|
|
|
pub fn print_version() {
|
2018-09-04 18:56:12 -04:00
|
|
|
let v = unsafe { libdeno::deno_v8_version() };
|
2018-08-17 16:34:30 -04:00
|
|
|
let c_str = unsafe { CStr::from_ptr(v) };
|
|
|
|
let version = c_str.to_str().unwrap();
|
|
|
|
println!("deno: {}", DENO_VERSION);
|
|
|
|
println!("v8: {}", version);
|
|
|
|
}
|