summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2023-04-12 15:13:32 +0200
committerGitHub <noreply@github.com>2023-04-12 15:13:32 +0200
commitf90caa821c5a4acf28f7dec4071994ecf6f26e57 (patch)
treefa4af65399a16a9f2d17fa2b249f21be2c00b976 /runtime/web_worker.rs
parent0e3f62d4446ae7b9a64dacf7befcaecede118222 (diff)
refactor(ext/fs): abstract FS via FileSystem trait (#18599)
This commit abstracts out the specifics of the underlying system calls FS operations behind a new `FileSystem` and `File` trait in the `ext/fs` extension. This allows other embedders to re-use ext/fs, but substituting in a different FS backend. This is likely not the final form of these traits. Eventually they will be entirely `deno_core::Resource` agnostic, and will live in a seperate crate. --------- Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 4be40c9b0..0d743cfc6 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -34,6 +34,7 @@ use deno_core::RuntimeOptions;
use deno_core::SharedArrayBufferStore;
use deno_core::Snapshot;
use deno_core::SourceMapGetter;
+use deno_fs::StdFs;
use deno_io::Stdio;
use deno_kv::sqlite::SqliteDbHandler;
use deno_node::RequireNpmResolver;
@@ -440,7 +441,7 @@ impl WebWorker {
deno_napi::deno_napi::init_ops::<PermissionsContainer>(),
deno_http::deno_http::init_ops(),
deno_io::deno_io::init_ops(Some(options.stdio)),
- deno_fs::deno_fs::init_ops::<PermissionsContainer>(unstable),
+ deno_fs::deno_fs::init_ops::<_, PermissionsContainer>(unstable, StdFs),
deno_node::deno_node::init_ops::<crate::RuntimeNodeEnv>(
options.npm_resolver,
),