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

#28 in #v8

Download history 62/week @ 2024-01-01 125/week @ 2024-01-08 107/week @ 2024-01-15 76/week @ 2024-01-22 203/week @ 2024-01-29 178/week @ 2024-02-05 240/week @ 2024-02-12 155/week @ 2024-02-19 591/week @ 2024-02-26 372/week @ 2024-03-04 351/week @ 2024-03-11 425/week @ 2024-03-18 168/week @ 2024-03-25 475/week @ 2024-04-01 261/week @ 2024-04-08 282/week @ 2024-04-15

1,220 downloads per month
Used in 22 crates (7 directly)

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 Bazel 3.5K SLoC // 0.0% comments Perl 471 SLoC // 0.3% comments Bitbake 157 SLoC GNU Style Assembly 126 SLoC WebAssembly 109 SLoC TypeScript 82 SLoC // 0.1% comments Java 44 SLoC // 0.3% comments Batch 34 SLoC // 0.3% comments Forge Config 20 SLoC Objective-C++ 6 SLoC // 0.6% comments

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

Dependencies