Skip to content

Commit

Permalink
chore(deno_webgpu): bump deno crates (#2405)
Browse files Browse the repository at this point in the history
* chore(deno_webgpu): bump deno_core to 0.114.0

denoland/deno@ca75752 dates back to Aug 30 2021, so is nearly 5 months old.

There are no breaking changes updating `deno_core` to `0.114.0` (released 6 days ago)

Also by using the crate directly from cargo we avoid cloning https://github.com/denoland/deno and https://github.com/denoland/deno_third_party which can be quite large so crate DL/install is much faster

* bump cts_runner's deno crates

* minor cts_runner fixes
  • Loading branch information
AaronO authored and kvark committed Jan 21, 2022
1 parent 55571c8 commit f791eda
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
14 changes: 7 additions & 7 deletions cts_runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ publish = false
resolver = "2"

[dependencies]
deno_console = { git = "https://github.com/denoland/deno", rev = "ca75752e5a9499a0a997809f02b18c2ba1ecd58d" }
deno_core = { git = "https://github.com/denoland/deno", rev = "ca75752e5a9499a0a997809f02b18c2ba1ecd58d" }
deno_timers = { git = "https://github.com/denoland/deno", rev = "ca75752e5a9499a0a997809f02b18c2ba1ecd58d" }
deno_url = { git = "https://github.com/denoland/deno", rev = "ca75752e5a9499a0a997809f02b18c2ba1ecd58d" }
deno_web = { git = "https://github.com/denoland/deno", rev = "ca75752e5a9499a0a997809f02b18c2ba1ecd58d" }
deno_webidl = { git = "https://github.com/denoland/deno", rev = "ca75752e5a9499a0a997809f02b18c2ba1ecd58d" }
deno_console = "0.32.0"
deno_core = "0.114.0"
deno_timers = "0.30.0"
deno_url = "0.32.0"
deno_web = "0.63.0"
deno_webidl = "0.32.0"
deno_webgpu = { path = "../deno_webgpu" }
tokio = { version = "1.10.0", features = ["full"] }
tokio = { version = "1.15.0", features = ["full"] }
termcolor = "1.1.2"
19 changes: 15 additions & 4 deletions cts_runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
rc::Rc,
};

use deno_core::error::anyhow;
use deno_core::anyhow::anyhow;
use deno_core::error::AnyError;
use deno_core::located_script_name;
use deno_core::resolve_url_or_path;
Expand Down Expand Up @@ -41,7 +41,7 @@ async fn run() -> Result<(), AnyError> {
deno_console::init(),
deno_url::init(),
deno_web::init(BlobStore::default(), None),
deno_timers::init::<deno_timers::NoTimersPermission>(),
deno_timers::init::<Permissions>(),
deno_webgpu::init(true),
extension(),
],
Expand All @@ -56,9 +56,9 @@ async fn run() -> Result<(), AnyError> {
isolate
.op_state()
.borrow_mut()
.put(deno_timers::NoTimersPermission);
.put(Permissions{});

let mod_id = isolate.load_module(&specifier, None).await?;
let mod_id = isolate.load_main_module(&specifier, None).await?;
let mod_rx = isolate.mod_evaluate(mod_id);

let rx = tokio::spawn(async move {
Expand Down Expand Up @@ -149,3 +149,14 @@ fn red_bold<S: AsRef<str>>(s: S) -> impl fmt::Display {
style_spec.set_fg(Some(Red)).set_bold(true);
style(s, style_spec)
}

// NOP permissions
struct Permissions;

impl deno_timers::TimersPermission for Permissions {
fn allow_hrtime(&mut self) -> bool {
false
}

fn check_unstable(&self, _state: &deno_core::OpState, _api_name: &'static str) {}
}
2 changes: 1 addition & 1 deletion deno_webgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/gfx-rs/wgpu"
description = "WebGPU implementation for Deno"

[dependencies]
deno_core = { git = "https://github.com/denoland/deno", rev = "ca75752e5a9499a0a997809f02b18c2ba1ecd58d" }
deno_core = "0.114.0"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.10", features = ["full"] }
wgpu-core = { path = "../wgpu-core", features = ["trace", "replay", "serde"] }
Expand Down

0 comments on commit f791eda

Please sign in to comment.