0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-31 11:49:31 -05:00
denoland-deno/src/version.rs

12 lines
323 B
Rust
Raw Normal View History

2019-01-01 19:58:40 -05:00
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
use libdeno;
use std::ffi::CStr;
2018-12-13 22:16:58 +01:00
pub const DENO: &str = env!("CARGO_PKG_VERSION");
pub fn v8() -> &'static str {
let version = unsafe { libdeno::deno_v8_version() };
let c_str = unsafe { CStr::from_ptr(version) };
c_str.to_str().unwrap()
}