summaryrefslogtreecommitdiff
path: root/src/version.rs
blob: 1cf08225765b863b5bb3a4c6d278843036d540af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
use crate::libdeno;

use std::ffi::CStr;

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