2019-03-11 17:57:36 -04:00
|
|
|
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2019-02-26 17:36:05 -05:00
|
|
|
#[macro_use]
|
|
|
|
extern crate log;
|
|
|
|
extern crate futures;
|
|
|
|
extern crate libc;
|
|
|
|
|
2019-07-10 18:53:48 -04:00
|
|
|
mod any_error;
|
2019-03-11 17:57:36 -04:00
|
|
|
mod flags;
|
|
|
|
mod isolate;
|
2019-02-26 17:36:05 -05:00
|
|
|
mod js_errors;
|
|
|
|
mod libdeno;
|
2019-06-12 19:55:59 -04:00
|
|
|
mod module_specifier;
|
2019-03-26 11:56:34 -04:00
|
|
|
mod modules;
|
2019-03-14 19:17:52 -04:00
|
|
|
mod shared_queue;
|
2019-02-26 17:36:05 -05:00
|
|
|
|
2019-07-10 18:53:48 -04:00
|
|
|
pub use crate::any_error::*;
|
2019-03-11 17:57:36 -04:00
|
|
|
pub use crate::flags::v8_set_flags;
|
|
|
|
pub use crate::isolate::*;
|
2019-02-28 16:19:04 -05:00
|
|
|
pub use crate::js_errors::*;
|
2019-03-11 17:57:36 -04:00
|
|
|
pub use crate::libdeno::deno_mod;
|
2019-04-28 15:31:10 -04:00
|
|
|
pub use crate::libdeno::PinnedBuf;
|
2019-06-30 13:45:59 -04:00
|
|
|
pub use crate::module_specifier::*;
|
2019-03-26 11:56:34 -04:00
|
|
|
pub use crate::modules::*;
|
2019-02-26 17:36:05 -05:00
|
|
|
|
2019-03-11 17:57:36 -04: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 17:36:05 -05:00
|
|
|
}
|
|
|
|
|
2019-03-11 17:57:36 -04:00
|
|
|
#[test]
|
|
|
|
fn test_v8_version() {
|
|
|
|
assert!(v8_version().len() > 3);
|
2019-02-26 17:36:05 -05:00
|
|
|
}
|