summaryrefslogtreecommitdiff
path: root/op_crates
diff options
context:
space:
mode:
Diffstat (limited to 'op_crates')
-rw-r--r--op_crates/console/Cargo.toml4
-rw-r--r--op_crates/crypto/Cargo.toml4
-rw-r--r--op_crates/fetch/Cargo.toml6
-rw-r--r--op_crates/file/Cargo.toml4
-rw-r--r--op_crates/timers/Cargo.toml4
-rw-r--r--op_crates/url/Cargo.toml6
-rw-r--r--op_crates/url/benches/url_ops.rs53
-rw-r--r--op_crates/web/Cargo.toml4
-rw-r--r--op_crates/webgpu/Cargo.toml4
-rw-r--r--op_crates/webidl/Cargo.toml4
-rw-r--r--op_crates/websocket/Cargo.toml4
11 files changed, 63 insertions, 34 deletions
diff --git a/op_crates/console/Cargo.toml b/op_crates/console/Cargo.toml
index 4ab7099e6..9b42a2309 100644
--- a/op_crates/console/Cargo.toml
+++ b/op_crates/console/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_console"
-version = "0.3.0"
+version = "0.4.0"
edition = "2018"
description = "Implementation of Console API for Deno"
authors = ["the Deno authors"]
@@ -14,4 +14,4 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"
[dependencies]
-deno_core = { version = "0.84.0", path = "../../core" }
+deno_core = { version = "0.85.0", path = "../../core" }
diff --git a/op_crates/crypto/Cargo.toml b/op_crates/crypto/Cargo.toml
index 91caecc57..3ad60ca3d 100644
--- a/op_crates/crypto/Cargo.toml
+++ b/op_crates/crypto/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_crypto"
-version = "0.17.0"
+version = "0.18.0"
edition = "2018"
description = "Web Cryptography API implementation for Deno"
authors = ["the Deno authors"]
@@ -14,6 +14,6 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"
[dependencies]
-deno_core = { version = "0.84.0", path = "../../core" }
+deno_core = { version = "0.85.0", path = "../../core" }
rand = "0.8.3"
diff --git a/op_crates/fetch/Cargo.toml b/op_crates/fetch/Cargo.toml
index 81e6e03a4..4b29b3a88 100644
--- a/op_crates/fetch/Cargo.toml
+++ b/op_crates/fetch/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_fetch"
-version = "0.25.0"
+version = "0.26.0"
edition = "2018"
description = "Fetch API implementation for Deno"
authors = ["the Deno authors"]
@@ -16,8 +16,8 @@ path = "lib.rs"
[dependencies]
bytes = "1.0.1"
data-url = "0.1.0"
-deno_core = { version = "0.84.0", path = "../../core" }
-deno_file = { version = "0.2.0", path = "../file" }
+deno_core = { version = "0.85.0", path = "../../core" }
+deno_file = { version = "0.3.0", path = "../file" }
http = "0.2.3"
reqwest = { version = "0.11.2", default-features = false, features = ["rustls-tls", "stream", "gzip", "brotli"] }
serde = { version = "1.0.125", features = ["derive"] }
diff --git a/op_crates/file/Cargo.toml b/op_crates/file/Cargo.toml
index 100e71e05..ff1a49f52 100644
--- a/op_crates/file/Cargo.toml
+++ b/op_crates/file/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_file"
-version = "0.2.0"
+version = "0.3.0"
edition = "2018"
description = "File API implementation for Deno"
authors = ["the Deno authors"]
@@ -14,5 +14,5 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"
[dependencies]
-deno_core = { version = "0.84.0", path = "../../core" }
+deno_core = { version = "0.85.0", path = "../../core" }
uuid = { version = "0.8.2", features = ["v4"] }
diff --git a/op_crates/timers/Cargo.toml b/op_crates/timers/Cargo.toml
index 31d5645f2..dcbe90548 100644
--- a/op_crates/timers/Cargo.toml
+++ b/op_crates/timers/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_timers"
-version = "0.1.0"
+version = "0.2.0"
edition = "2018"
description = "Timers API implementation for Deno"
authors = ["the Deno authors"]
@@ -14,5 +14,5 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"
[dependencies]
-deno_core = { version = "0.84.0", path = "../../core" }
+deno_core = { version = "0.85.0", path = "../../core" }
tokio = { version = "1.4.0", features = ["full"] }
diff --git a/op_crates/url/Cargo.toml b/op_crates/url/Cargo.toml
index a67b59d7f..44394f6a5 100644
--- a/op_crates/url/Cargo.toml
+++ b/op_crates/url/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_url"
-version = "0.3.0"
+version = "0.4.0"
edition = "2018"
description = "URL API implementation for Deno"
authors = ["the Deno authors"]
@@ -14,13 +14,13 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"
[dependencies]
-deno_core = { version = "0.84.0", path = "../../core" }
+deno_core = { version = "0.85.0", path = "../../core" }
idna = "0.2.2"
percent-encoding = "2.1.0"
serde = { version = "1.0.125", features = ["derive"] }
[dev-dependencies]
-bench_util = { version = "0.0.0", path = "../../bench_util" }
+bencher = "0.1"
[[bench]]
name = "url_ops"
diff --git a/op_crates/url/benches/url_ops.rs b/op_crates/url/benches/url_ops.rs
index fc2742fbd..17029b9c6 100644
--- a/op_crates/url/benches/url_ops.rs
+++ b/op_crates/url/benches/url_ops.rs
@@ -1,29 +1,58 @@
+use bencher::{benchmark_group, benchmark_main, Bencher};
+
use deno_core::op_sync;
+use deno_core::v8;
use deno_core::JsRuntime;
-use bench_util::bench_js_sync;
-use bench_util::bench_or_profile;
-use bench_util::bencher::{benchmark_group, Bencher};
-
-fn setup(rt: &mut JsRuntime) {
- rt.register_op("op_url_parse", op_sync(deno_url::op_url_parse));
- rt.register_op(
+fn create_js_runtime() -> JsRuntime {
+ let mut runtime = JsRuntime::new(Default::default());
+ runtime.register_op("op_url_parse", op_sync(deno_url::op_url_parse));
+ runtime.register_op(
"op_url_parse_search_params",
op_sync(deno_url::op_url_parse_search_params),
);
- rt.register_op(
+ runtime.register_op(
"op_url_stringify_search_params",
op_sync(deno_url::op_url_stringify_search_params),
);
- deno_url::init(rt);
- rt.execute("setup", "const { URL } = globalThis.__bootstrap.url;")
+ runtime
+ .execute(
+ "bootstrap",
+ "globalThis.__bootstrap = (globalThis.__bootstrap || {});",
+ )
+ .unwrap();
+ deno_url::init(&mut runtime);
+ runtime
+ .execute(
+ "init",
+ r#"
+ Deno.core.ops();
+ Deno.core.registerErrorClass('Error', Error);
+ "#,
+ )
+ .unwrap();
+ runtime
+ .execute("setup", "const { URL } = globalThis.__bootstrap.url;")
.unwrap();
+
+ runtime
+}
+
+pub fn bench_runtime_js(b: &mut Bencher, src: &str) {
+ let mut runtime = create_js_runtime();
+ let context = runtime.global_context();
+ let scope = &mut v8::HandleScope::with_context(runtime.v8_isolate(), context);
+ let code = v8::String::new(scope, src).unwrap();
+ let script = v8::Script::compile(scope, code, None).unwrap();
+ b.iter(|| {
+ script.run(scope).unwrap();
+ });
}
fn bench_url_parse(b: &mut Bencher) {
- bench_js_sync(b, r#"new URL(`http://www.google.com/${i}`);"#, setup);
+ bench_runtime_js(b, r#"new URL(`http://www.google.com/`);"#);
}
benchmark_group!(benches, bench_url_parse,);
-bench_or_profile!(benches);
+benchmark_main!(benches);
diff --git a/op_crates/web/Cargo.toml b/op_crates/web/Cargo.toml
index a82a99b09..81906b7ea 100644
--- a/op_crates/web/Cargo.toml
+++ b/op_crates/web/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_web"
-version = "0.33.0"
+version = "0.34.0"
edition = "2018"
description = "Collection of Web APIs"
authors = ["the Deno authors"]
@@ -14,7 +14,7 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"
[dependencies]
-deno_core = { version = "0.84.0", path = "../../core" }
+deno_core = { version = "0.85.0", path = "../../core" }
[dev-dependencies]
futures = "0.3.13"
diff --git a/op_crates/webgpu/Cargo.toml b/op_crates/webgpu/Cargo.toml
index a9abcf528..025780263 100644
--- a/op_crates/webgpu/Cargo.toml
+++ b/op_crates/webgpu/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_webgpu"
-version = "0.4.0"
+version = "0.5.0"
edition = "2018"
description = "WebGPU implementation for Deno"
authors = ["the Deno authors"]
@@ -14,7 +14,7 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"
[dependencies]
-deno_core = { version = "0.84.0", path = "../../core" }
+deno_core = { version = "0.85.0", path = "../../core" }
tokio = { version = "1.4.0", features = ["full"] }
serde = { version = "1.0.125", features = ["derive"] }
wgpu-core = { version = "0.7.0", features = ["trace"] }
diff --git a/op_crates/webidl/Cargo.toml b/op_crates/webidl/Cargo.toml
index ef7999f36..cab02042c 100644
--- a/op_crates/webidl/Cargo.toml
+++ b/op_crates/webidl/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_webidl"
-version = "0.3.0"
+version = "0.4.0"
edition = "2018"
description = "WebIDL implementation for Deno"
authors = ["the Deno authors"]
@@ -14,4 +14,4 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"
[dependencies]
-deno_core = { version = "0.84.0", path = "../../core" }
+deno_core = { version = "0.85.0", path = "../../core" }
diff --git a/op_crates/websocket/Cargo.toml b/op_crates/websocket/Cargo.toml
index 5c250dd57..dd3dd3b81 100644
--- a/op_crates/websocket/Cargo.toml
+++ b/op_crates/websocket/Cargo.toml
@@ -2,7 +2,7 @@
[package]
name = "deno_websocket"
-version = "0.8.0"
+version = "0.9.0"
edition = "2018"
description = "Implementation of WebSocket API for Deno"
authors = ["the Deno authors"]
@@ -14,7 +14,7 @@ repository = "https://github.com/denoland/deno"
path = "lib.rs"
[dependencies]
-deno_core = { version = "0.84.0", path = "../../core" }
+deno_core = { version = "0.85.0", path = "../../core" }
http = "0.2.3"
serde = { version = "1.0.125", features = ["derive"] }
tokio = { version = "1.4.0", features = ["full"] }