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

#3 in #v8

Download history 540/week @ 2022-06-11 711/week @ 2022-06-18 551/week @ 2022-06-25 466/week @ 2022-07-02 720/week @ 2022-07-09 701/week @ 2022-07-16 656/week @ 2022-07-23 480/week @ 2022-07-30 744/week @ 2022-08-06 781/week @ 2022-08-13 465/week @ 2022-08-20 432/week @ 2022-08-27 563/week @ 2022-09-03 680/week @ 2022-09-10 448/week @ 2022-09-17 339/week @ 2022-09-24

2,127 downloads per month
Used in fewer than 8 crates

MIT license

46MB
1M SLoC

C++ 1M SLoC // 0.1% comments Python 23K SLoC // 0.3% comments C 16K SLoC // 0.2% comments Rust 12K SLoC // 0.0% comments Shell 3.5K SLoC // 0.2% comments Perl 471 SLoC // 0.3% comments GNU Style Assembly 126 SLoC WebAssembly 109 SLoC TypeScript 82 SLoC // 0.1% comments Batch 34 SLoC // 0.3% comments Objective-C++ 6 SLoC // 0.6% comments

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));

Dependencies