summaryrefslogtreecommitdiff
path: root/core/lib.rs
diff options
context:
space:
mode:
authorRy Dahl <ry@tinyclouds.org>2020-01-05 09:19:29 -0500
committerGitHub <noreply@github.com>2020-01-05 09:19:29 -0500
commit5f1df038fb1462607af3555fa7431c05ca484dce (patch)
tree0e819c1e1ec422b9573abc379c79fcbcc1cbd88c /core/lib.rs
parentc41280a057c9ca300afe43f2cb4f576e050f8cde (diff)
Replace libdeno with rusty_v8 (#3556)
Diffstat (limited to 'core/lib.rs')
-rw-r--r--core/lib.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/lib.rs b/core/lib.rs
index 5d37fe0ae..b6e94c7d5 100644
--- a/core/lib.rs
+++ b/core/lib.rs
@@ -5,6 +5,9 @@ extern crate futures;
extern crate libc;
#[macro_use]
extern crate downcast_rs;
+extern crate rusty_v8;
+#[macro_use]
+extern crate lazy_static;
mod any_error;
mod flags;
@@ -18,6 +21,8 @@ mod plugins;
mod resources;
mod shared_queue;
+use rusty_v8 as v8;
+
pub use crate::any_error::*;
pub use crate::flags::v8_set_flags;
pub use crate::isolate::*;
@@ -32,10 +37,7 @@ pub use crate::plugins::*;
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()
+ v8::V8::get_version()
}
#[test]