25 breaking releases

Uses new Rust 2021

new 0.26.0 Jan 12, 2022
0.24.0 Dec 22, 2021
0.21.0 Nov 24, 2021
0.7.0 Jul 26, 2021

#17 in #deno

Download history 33/week @ 2021-09-25 31/week @ 2021-10-02 37/week @ 2021-10-09 45/week @ 2021-10-16 27/week @ 2021-10-23 1/week @ 2021-10-30 54/week @ 2021-11-06 20/week @ 2021-11-13 35/week @ 2021-11-20 36/week @ 2021-11-27 38/week @ 2021-12-04 31/week @ 2021-12-11 20/week @ 2021-12-18 5/week @ 2021-12-25 22/week @ 2022-01-01 30/week @ 2022-01-08

86 downloads per month
Used in 2 crates

MIT license

4.5MB
11K SLoC

Rust 9K SLoC // 0.1% comments TypeScript 1K SLoC // 0.1% comments JavaScript 882 SLoC // 0.1% comments

Benching utility for deno_core op system

Example:

use deno_bench_util::bench_or_profile;
use deno_bench_util::bencher::{benchmark_group, Bencher};
use deno_bench_util::bench_js_sync};

use deno_core::op_sync;
use deno_core::serialize_op_result;
use deno_core::Extension;
use deno_core::JsRuntime;
use deno_core::Op;
use deno_core::OpState;

fn setup() -> Vec<Extension> {
  let custom_ext = Extension::builder()
    .ops(vec![
      ("op_nop", |state, _| {
        Op::Sync(serialize_op_result(Ok(9), state))
      }),
    ])
    .build();
  
  vec![
    // deno_{ext}::init(...),
    custom_ext,
  ]
}

fn bench_op_nop(b: &mut Bencher) {
  bench_js_sync(b, r#"Deno.core.opSync("op_nop", null, null);"#, setup);
}

benchmark_group!(benches, bench_op_nop);
bench_or_profile!(benches);

Dependencies

~54MB
~1M SLoC