228 breaking releases

new 0.263.0 Feb 16, 2024
0.261.0 Feb 10, 2024
0.240.0 Dec 28, 2023
0.234.0 Nov 29, 2023
0.0.1 Sep 13, 2019

#495 in Web programming

Download history 22029/week @ 2023-10-31 16924/week @ 2023-11-07 20356/week @ 2023-11-14 18120/week @ 2023-11-21 21608/week @ 2023-11-28 15907/week @ 2023-12-05 15950/week @ 2023-12-12 19096/week @ 2023-12-19 5165/week @ 2023-12-26 12542/week @ 2024-01-02 12854/week @ 2024-01-09 12629/week @ 2024-01-16 16772/week @ 2024-01-23 13917/week @ 2024-01-30 15281/week @ 2024-02-06 14993/week @ 2024-02-13

62,862 downloads per month
Used in 126 crates (105 directly)

MIT license

1MB
31K SLoC

Deno Core Crate

crates docs

The main dependency of this crate is rusty_v8, which provides the V8-Rust bindings.

This Rust crate contains the essential V8 bindings for Deno's command-line interface (Deno CLI). The main abstraction here is the JsRuntime which provides a way to execute JavaScript.

The JsRuntime implements an event loop abstraction for the executed code that keeps track of all pending tasks (async ops, dynamic module loads). It is user's responsibility to drive that loop by using JsRuntime::run_event_loop method - it must be executed in the context of Rust's future executor (eg. tokio, smol).

Rust functions can be registered in JavaScript using deno_core::Extension. A conventional way to write ops is using the deno_ops crate.

Documentation for this crate is thin at the moment. Please see hello_world.rs and http_bench_json_ops/main.rs as examples of usage.

TypeScript support and lots of other functionality are not available at this layer. See the CLI for that.

Dependencies

~89MB
~1.5M SLoC