forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Fr13dr1ch99 edited this page Feb 28, 2024
·
1 revision
Patch to build for android
diff --git a/ext/webgpu/byow.rs b/ext/webgpu/byow.rs
index 984eaae1b..aa855c45b 100644
--- a/ext/webgpu/byow.rs
+++ b/ext/webgpu/byow.rs
@@ -125,3 +125,12 @@ fn raw_window(
Ok((win_handle, display_handle))
}
+
+#[cfg(target_os = "android")]
+fn raw_window(
+ system: &str,
+ window: *const c_void,
+ display: *const c_void,
+) -> Result<RawHandles, AnyError> {
+ return Err(type_error("Cannot run webgpu on android!"));
+}
diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml
index 6bf0cce08..b3515caf4 100644
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -50,7 +50,7 @@ deno_core.workspace = true
deno_cron.workspace = true
deno_crypto.workspace = true
deno_fetch.workspace = true
-deno_ffi.workspace = true
+#deno_ffi.workspace = true
deno_fs = { workspace = true, features = ["sync_fs"] }
deno_http.workspace = true
deno_io.workspace = true
@@ -82,7 +82,7 @@ deno_core.workspace = true
deno_cron.workspace = true
deno_crypto.workspace = true
deno_fetch.workspace = true
-deno_ffi.workspace = true
+#deno_ffi.workspace = true
deno_fs = { workspace = true, features = ["sync_fs"] }
deno_http.workspace = true
deno_io.workspace = true
diff --git a/runtime/lib.rs b/runtime/lib.rs
index b63fd4134..075fc37cf 100644
--- a/runtime/lib.rs
+++ b/runtime/lib.rs
@@ -8,7 +8,7 @@ pub use deno_core;
pub use deno_cron;
pub use deno_crypto;
pub use deno_fetch;
-pub use deno_ffi;
+//pub use deno_ffi;
pub use deno_fs;
pub use deno_http;
pub use deno_io;
@@ -62,11 +62,11 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[(
"Enable unstable Deno.cron API",
2,
),
- (
+ /*(
deno_ffi::UNSTABLE_FEATURE_NAME,
"Enable unstable FFI APIs",
3,
- ),
+ ),*/
(
deno_fs::UNSTABLE_FEATURE_NAME,
"Enable unstable file system APIs",
diff --git a/runtime/permissions/mod.rs b/runtime/permissions/mod.rs
index 2cdbc6014..11b5e04c6 100644
--- a/runtime/permissions/mod.rs
+++ b/runtime/permissions/mod.rs
@@ -1526,12 +1526,12 @@ impl deno_napi::NapiPermissions for PermissionsContainer {
}
}
-impl deno_ffi::FfiPermissions for PermissionsContainer {
+/*impl deno_ffi::FfiPermissions for PermissionsContainer {
#[inline(always)]
fn check_partial(&mut self, path: Option<&Path>) -> Result<(), AnyError> {
self.0.lock().ffi.check_partial(path)
}
-}
+}*/
impl deno_kv::sqlite::SqliteDbHandlerPermissions for PermissionsContainer {
#[inline(always)]
diff --git a/runtime/shared.rs b/runtime/shared.rs
index 04fcdcfdb..0c32a8220 100644
--- a/runtime/shared.rs
+++ b/runtime/shared.rs
@@ -25,7 +25,7 @@ extension!(runtime,
deno_crypto,
deno_broadcast_channel,
deno_node,
- deno_ffi,
+ //deno_ffi,
deno_net,
deno_napi,
deno_http,
diff --git a/runtime/snapshot.rs b/runtime/snapshot.rs
index f7342ce14..53d1a6410 100644
--- a/runtime/snapshot.rs
+++ b/runtime/snapshot.rs
@@ -51,14 +51,14 @@ impl deno_web::TimersPermission for Permissions {
}
}
-impl deno_ffi::FfiPermissions for Permissions {
+/*impl deno_ffi::FfiPermissions for Permissions {
fn check_partial(
&mut self,
_path: Option<&Path>,
) -> Result<(), deno_core::error::AnyError> {
unreachable!("snapshotting!")
}
-}
+}*/
impl deno_napi::NapiPermissions for Permissions {
fn check(
@@ -225,7 +225,7 @@ pub fn create_runtime_snapshot(
deno_broadcast_channel::deno_broadcast_channel::init_ops_and_esm(
deno_broadcast_channel::InMemoryBroadcastChannel::default(),
),
- deno_ffi::deno_ffi::init_ops_and_esm::<Permissions>(),
+ //deno_ffi::deno_ffi::init_ops_and_esm::<Permissions>(),
deno_net::deno_net::init_ops_and_esm::<Permissions>(None, None),
deno_tls::deno_tls::init_ops_and_esm(),
deno_kv::deno_kv::init_ops_and_esm(deno_kv::sqlite::SqliteDbHandler::<
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index a69c384ab..747a527c0 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -436,7 +436,7 @@ impl WebWorker {
deno_broadcast_channel::deno_broadcast_channel::init_ops_and_esm(
options.broadcast_channel.clone(),
),
- deno_ffi::deno_ffi::init_ops_and_esm::<PermissionsContainer>(),
+ //deno_ffi::deno_ffi::init_ops_and_esm::<PermissionsContainer>(),
deno_net::deno_net::init_ops_and_esm::<PermissionsContainer>(
options.root_cert_store_provider.clone(),
options.unsafely_ignore_certificate_errors.clone(),
diff --git a/runtime/worker.rs b/runtime/worker.rs
index b6aff3c15..7e4dbdae4 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -373,7 +373,7 @@ impl MainWorker {
deno_broadcast_channel::deno_broadcast_channel::init_ops_and_esm(
options.broadcast_channel.clone(),
),
- deno_ffi::deno_ffi::init_ops_and_esm::<PermissionsContainer>(),
+ //deno_ffi::deno_ffi::init_ops_and_esm::<PermissionsContainer>(),
deno_net::deno_net::init_ops_and_esm::<PermissionsContainer>(
options.root_cert_store_provider.clone(),
options.unsafely_ignore_certificate_errors.clone(),