85 releases (32 breaking)
0.32.1 | Oct 27, 2021 |
---|---|
0.31.0 | Oct 4, 2021 |
0.25.3 | Jul 12, 2021 |
0.21.0 | Mar 9, 2021 |
0.0.6 | Nov 30, 2019 |
#2 in #releases
791 downloads per month
Used in 22 crates
(7 directly)
46MB
1M
SLoC
Contains (autotools obfuscated code, 275KB) third_party/icu/source/configure, (ELF exe/lib, 115KB) eu-strip, (obscure autoconf code, 48KB) third_party/icu/source/configure.ac
Rusty V8
The Rusty V8 crate is now being published under the v8
crate name:
https://crates.io/crates/v8
There will be no more releases published to https://crates.io/crates/rusty_v8
Please update your Cargo.toml files!
lib.rs
:
Example
use rusty_v8 as v8;
let platform = v8::new_default_platform(0, false).make_shared();
v8::V8::initialize_platform(platform);
v8::V8::initialize();
let isolate = &mut v8::Isolate::new(Default::default());
let scope = &mut v8::HandleScope::new(isolate);
let context = v8::Context::new(scope);
let scope = &mut v8::ContextScope::new(scope, context);
let code = v8::String::new(scope, "'Hello' + ' World!'").unwrap();
println!("javascript code: {}", code.to_rust_string_lossy(scope));
let script = v8::Script::compile(scope, code, None).unwrap();
let result = script.run(scope).unwrap();
let result = result.to_string(scope).unwrap();
println!("result: {}", result.to_rust_string_lossy(scope));