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 /cli | |
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 'cli')
-rw-r--r-- | cli/build.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/build.rs b/cli/build.rs index ddd942593..6d13f9a4d 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -8,6 +8,7 @@ use deno_core::Extension; use deno_core::ExtensionFileSource; use deno_core::ExtensionFileSourceCode; use deno_runtime::deno_cache::SqliteBackedCache; +use deno_runtime::deno_fs::StdFs; use deno_runtime::deno_kv::sqlite::SqliteDbHandler; use deno_runtime::permissions::PermissionsContainer; use deno_runtime::*; @@ -361,7 +362,7 @@ fn create_cli_snapshot(snapshot_path: PathBuf) { deno_napi::deno_napi::init_ops::<PermissionsContainer>(), deno_http::deno_http::init_ops(), deno_io::deno_io::init_ops(Default::default()), - deno_fs::deno_fs::init_ops::<PermissionsContainer>(false), + deno_fs::deno_fs::init_ops::<_, PermissionsContainer>(false, StdFs), deno_node::deno_node::init_ops::<deno_runtime::RuntimeNodeEnv>(None), cli::init_ops_and_esm(), // NOTE: This needs to be init_ops_and_esm! ]; |