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-27 10:54:44 -04:00
|
|
|
pub const DENO_VERSION: &str = "0.1.10";
|
2018-08-17 16:34:30 -04:00
|
|
|
|
2018-10-16 09:52:33 +09:00
|
|
|
pub fn get_v8_version() -> &'static str {
|
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();
|
2018-10-16 09:52:33 +09:00
|
|
|
version
|
2018-08-17 16:34:30 -04:00
|
|
|
}
|