Skip to content

Commit

Permalink
BREAKING(unstable): remove WebGPU (#18094)
Browse files Browse the repository at this point in the history
This PR _**temporarily**_ removes WebGPU (which has behind the
`--unstable` flag in Deno), due to performance complications due to its
presence.

It will be brought back in the future; as a point of reference, Chrome
will ship WebGPU to stable on 26/04/2023.

---------

Co-authored-by: Bartek Iwańczuk <[email protected]>
  • Loading branch information
crowlKats and bartlomieju authored Mar 16, 2023
1 parent 3f031ad commit 35196ea
Show file tree
Hide file tree
Showing 45 changed files with 145 additions and 15,304 deletions.
648 changes: 144 additions & 504 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ members = [
"ext/node",
"ext/url",
"ext/web",
"ext/webgpu",
"ext/webidl",
"ext/websocket",
"ext/webstorage",
Expand Down Expand Up @@ -71,7 +70,6 @@ deno_node = { version = "0.30.0", path = "./ext/node" }
deno_tls = { version = "0.80.0", path = "./ext/tls" }
deno_url = { version = "0.93.0", path = "./ext/url" }
deno_web = { version = "0.124.0", path = "./ext/web" }
deno_webgpu = { version = "0.94.0", path = "./ext/webgpu" }
deno_webidl = { version = "0.93.0", path = "./ext/webidl" }
deno_websocket = { version = "0.98.0", path = "./ext/websocket" }
deno_webstorage = { version = "0.88.0", path = "./ext/webstorage" }
Expand Down Expand Up @@ -136,11 +134,6 @@ zstd = "=0.11.2"
# crypto
rsa = { version = "0.7.0", default-features = false, features = ["std", "pem"] }

# webgpu
raw-window-handle = "0.5.0"
wgpu-core = "0.15"
wgpu-types = "0.15"

# macros
proc-macro2 = "1"
quote = "1"
Expand Down
1 change: 0 additions & 1 deletion cli/args/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ static ENV_VARIABLES_HELP: &str = r#"ENVIRONMENT VARIABLES:
DENO_NO_UPDATE_CHECK Set to disable checking if a newer Deno version is
available
DENO_V8_FLAGS Set V8 command line options
DENO_WEBGPU_TRACE Directory to use for wgpu traces
DENO_JOBS Number of parallel workers used for the --parallel
flag with the test subcommand. Defaults to number
of available CPUs.
Expand Down
12 changes: 0 additions & 12 deletions cli/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.

use std::env;
use std::path::Path;
use std::path::PathBuf;

use deno_core::include_js_files;
Expand All @@ -15,7 +14,6 @@ use deno_runtime::*;

mod ts {
use super::*;
use crate::deno_webgpu_get_declaration;
use deno_core::error::custom_error;
use deno_core::error::AnyError;
use deno_core::op;
Expand Down Expand Up @@ -43,7 +41,6 @@ mod ts {
op_crate_libs.insert("deno.url", deno_url::get_declaration());
op_crate_libs.insert("deno.web", deno_web::get_declaration());
op_crate_libs.insert("deno.fetch", deno_fetch::get_declaration());
op_crate_libs.insert("deno.webgpu", deno_webgpu_get_declaration());
op_crate_libs.insert("deno.websocket", deno_websocket::get_declaration());
op_crate_libs.insert("deno.webstorage", deno_webstorage::get_declaration());
op_crate_libs.insert("deno.crypto", deno_crypto::get_declaration());
Expand Down Expand Up @@ -323,7 +320,6 @@ fn create_cli_snapshot(snapshot_path: PathBuf) {
deno_websocket::init_ops::<PermissionsContainer>("".to_owned(), None, None),
deno_webstorage::init_ops(None),
deno_crypto::init_ops(None),
deno_webgpu::init_ops(false),
deno_broadcast_channel::init_ops(
deno_broadcast_channel::InMemoryBroadcastChannel::default(),
false, // No --unstable.
Expand Down Expand Up @@ -489,11 +485,3 @@ fn main() {
res.compile().unwrap();
}
}

fn deno_webgpu_get_declaration() -> PathBuf {
let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR"));
manifest_dir
.join("tsc")
.join("dts")
.join("lib.deno_webgpu.d.ts")
}
3 changes: 0 additions & 3 deletions cli/js/40_testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ const OP_DETAILS = {
"op_tls_start": ["start a TLS connection", "awaiting a `Deno.startTls` call"],
"op_truncate_async": ["truncate a file", "awaiting the result of a `Deno.truncate` call"],
"op_utime_async": ["change file timestamps", "awaiting the result of a `Deno.utime` call"],
"op_webgpu_buffer_get_map_async": ["map a WebGPU buffer", "awaiting the result of a `GPUBuffer#mapAsync` call"],
"op_webgpu_request_adapter": ["request a WebGPU adapter", "awaiting the result of a `navigator.gpu.requestAdapter` call"],
"op_webgpu_request_device": ["request a WebGPU device", "awaiting the result of a `GPUAdapter#requestDevice` call"],
"op_worker_recv_message": ["receive a message from a web worker", "terminating a `Worker`"],
"op_ws_close": ["close a WebSocket", "awaiting until the `close` event is emitted on a `WebSocket`, or the `WebSocketStream#closed` promise resolves"],
"op_ws_create": ["create a WebSocket", "awaiting until the `open` event is emitted on a `WebSocket`, or the result of a `WebSocketStream#connection` promise"],
Expand Down
38 changes: 0 additions & 38 deletions cli/tests/testdata/webgpu/computepass_shader.wgsl

This file was deleted.

Binary file removed cli/tests/testdata/webgpu/hellotriangle.out
Binary file not shown.
11 changes: 0 additions & 11 deletions cli/tests/testdata/webgpu/hellotriangle_shader.wgsl

This file was deleted.

242 changes: 0 additions & 242 deletions cli/tests/unit/webgpu_test.ts

This file was deleted.

2 changes: 0 additions & 2 deletions cli/tsc/dts/lib.deno.window.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
/// <reference no-default-lib="true" />
/// <reference lib="deno.ns" />
/// <reference lib="deno.shared_globals" />
/// <reference lib="deno.webgpu" />
/// <reference lib="deno.webstorage" />
/// <reference lib="esnext" />
/// <reference lib="deno.cache" />
Expand Down Expand Up @@ -94,7 +93,6 @@ declare var caches: CacheStorage;
/** @category Web APIs */
declare class Navigator {
constructor();
readonly gpu: GPU;
readonly hardwareConcurrency: number;
readonly userAgent: string;
readonly language: string;
Expand Down
Loading

0 comments on commit 35196ea

Please sign in to comment.