summaryrefslogtreecommitdiff
path: root/src/version.rs
blob: 48cc581e62c8ea04b70d453d005fa9136719f534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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.1";

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()
}