summaryrefslogtreecommitdiff
path: root/runtime/build.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-05-04 14:28:42 -0400
committerGitHub <noreply@github.com>2023-05-04 14:28:42 -0400
commit5270c43e412cc636cd9923182169d166d181f78a (patch)
tree640c90a70f7dd7bc91f5e942e1eaa5a7914ae46b /runtime/build.rs
parent4b645676d62fd595ecac47e24be1b83a3ba636c6 (diff)
refactor(ext/fs): boxed deno_fs::FileSystem (#18945)
1. Boxed `File` and `FileSystem` to allow more easily passing this through the CLI code (as shown within this pr). 2. `StdFileResource` is now `FileResource`. `FileResource` now contains an `Rc<dyn File>`.
Diffstat (limited to 'runtime/build.rs')
-rw-r--r--runtime/build.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/build.rs b/runtime/build.rs
index bba2eae55..d096df7db 100644
--- a/runtime/build.rs
+++ b/runtime/build.rs
@@ -18,7 +18,6 @@ mod startup_snapshot {
use deno_core::Extension;
use deno_core::ExtensionFileSource;
use deno_core::ModuleCode;
- use deno_fs::StdFs;
use std::path::Path;
fn transpile_ts_for_snapshotting(
@@ -310,7 +309,10 @@ mod startup_snapshot {
deno_napi::deno_napi::init_ops_and_esm::<Permissions>(),
deno_http::deno_http::init_ops_and_esm(),
deno_io::deno_io::init_ops_and_esm(Default::default()),
- deno_fs::deno_fs::init_ops_and_esm::<_, Permissions>(false, StdFs),
+ deno_fs::deno_fs::init_ops_and_esm::<Permissions>(
+ false,
+ std::sync::Arc::new(deno_fs::RealFs),
+ ),
runtime::init_ops_and_esm(),
// FIXME(bartlomieju): these extensions are specified last, because they
// depend on `runtime`, even though it should be other way around