1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-16 19:04:02 -05:00
denoland-deno/src/version.rs

13 lines
353 B
Rust
Raw Normal View History

// Copyright 2018 the Deno authors. All rights reserved. MIT license.
use libdeno;
use std::ffi::CStr;
// TODO Extract this version string from Cargo.toml.
pub const DENO: &str = "0.2.2";
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()
}