diff options
author | Luca Casonato <hello@lcas.dev> | 2023-04-12 15:13:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 15:13:32 +0200 |
commit | f90caa821c5a4acf28f7dec4071994ecf6f26e57 (patch) | |
tree | fa4af65399a16a9f2d17fa2b249f21be2c00b976 /runtime/web_worker.rs | |
parent | 0e3f62d4446ae7b9a64dacf7befcaecede118222 (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.rs | 3 |
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, ), |