mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
72f9a2e20d
Move v8_set_flags and v8_version to core. (The idea is that src/ should not depend on libdeno.rs anymore. This is a step towards that.)
28 lines
624 B
Rust
28 lines
624 B
Rust
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
|
#[macro_use]
|
|
extern crate log;
|
|
extern crate futures;
|
|
extern crate libc;
|
|
|
|
mod flags;
|
|
mod isolate;
|
|
mod js_errors;
|
|
mod libdeno;
|
|
|
|
pub use crate::flags::v8_set_flags;
|
|
pub use crate::isolate::*;
|
|
pub use crate::js_errors::*;
|
|
pub use crate::libdeno::deno_buf;
|
|
pub use crate::libdeno::deno_mod;
|
|
|
|
pub fn v8_version() -> &'static str {
|
|
use std::ffi::CStr;
|
|
let version = unsafe { libdeno::deno_v8_version() };
|
|
let c_str = unsafe { CStr::from_ptr(version) };
|
|
c_str.to_str().unwrap()
|
|
}
|
|
|
|
#[test]
|
|
fn test_v8_version() {
|
|
assert!(v8_version().len() > 3);
|
|
}
|