2019-03-11 21:57:36 +00:00
|
|
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2019-02-26 22:36:05 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate log;
|
|
|
|
extern crate futures;
|
|
|
|
extern crate libc;
|
|
|
|
|
2019-03-11 21:57:36 +00:00
|
|
|
mod flags;
|
|
|
|
mod isolate;
|
2019-02-26 22:36:05 +00:00
|
|
|
mod js_errors;
|
|
|
|
mod libdeno;
|
2019-03-26 15:56:34 +00:00
|
|
|
mod modules;
|
2019-03-14 23:17:52 +00:00
|
|
|
mod shared_queue;
|
2019-02-26 22:36:05 +00:00
|
|
|
|
2019-03-11 21:57:36 +00:00
|
|
|
pub use crate::flags::v8_set_flags;
|
|
|
|
pub use crate::isolate::*;
|
2019-02-28 21:19:04 +00:00
|
|
|
pub use crate::js_errors::*;
|
2019-02-26 22:36:05 +00:00
|
|
|
pub use crate::libdeno::deno_buf;
|
2019-03-11 21:57:36 +00:00
|
|
|
pub use crate::libdeno::deno_mod;
|
2019-03-26 15:56:34 +00:00
|
|
|
pub use crate::modules::*;
|
2019-02-26 22:36:05 +00:00
|
|
|
|
2019-03-11 21:57:36 +00:00
|
|
|
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()
|
2019-02-26 22:36:05 +00:00
|
|
|
}
|
|
|
|
|
2019-03-11 21:57:36 +00:00
|
|
|
#[test]
|
|
|
|
fn test_v8_version() {
|
|
|
|
assert!(v8_version().len() > 3);
|
2019-02-26 22:36:05 +00:00
|
|
|
}
|