1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
denoland-deno/core/lib.rs

45 lines
970 B
Rust
Raw Normal View History

// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
#[macro_use]
extern crate log;
extern crate futures;
extern crate libc;
2019-10-23 12:32:28 -04:00
#[macro_use]
extern crate downcast_rs;
mod any_error;
mod flags;
mod isolate;
mod js_errors;
mod libdeno;
2019-06-12 19:55:59 -04:00
mod module_specifier;
mod modules;
2019-09-30 14:59:44 -04:00
mod ops;
mod plugins;
2019-10-23 12:32:28 -04:00
mod resources;
mod shared_queue;
pub use crate::any_error::*;
pub use crate::flags::v8_set_flags;
pub use crate::isolate::*;
pub use crate::js_errors::*;
pub use crate::libdeno::deno_mod;
pub use crate::libdeno::OpId;
pub use crate::libdeno::PinnedBuf;
pub use crate::module_specifier::*;
pub use crate::modules::*;
2019-09-30 14:59:44 -04:00
pub use crate::ops::*;
pub use crate::plugins::*;
2019-10-23 12:32:28 -04:00
pub use crate::resources::*;
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);
}