summaryrefslogtreecommitdiff
path: root/src/version.rs
blob: 85238749e1ce266c9f552042c2ecbf7d1f8412a2 (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.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()
}