summaryrefslogtreecommitdiff
path: root/runtime/build.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-30 03:20:31 +0200
committerGitHub <noreply@github.com>2023-03-30 03:20:31 +0200
commit913e2875c1c31d5ffbc9c0c9ed0e8c63f6143024 (patch)
tree439fa7eef067893fde75dfe386d801a090e6c057 /runtime/build.rs
parent89bbbd102c6050763105be39a49494a5ffdce35b (diff)
refactor(ext/node): add NodeEnv::Fs associated type (#18484)
This commit adds associated type to "NodeEnv" trait, called "Fs". The "Fs" type has a trait bound on "NodeFs", which specifies APIs required for all ops and resolution APIs to function. A "RealFs" implementation of "NodeFs" is exported from the "deno_node" crate, that provides a default implementation for the trait. All code in "deno_node" extension was changed to use the "NodeFs" trait to handle file system operations, instead of relying on APIs from the standard library.
Diffstat (limited to 'runtime/build.rs')
-rw-r--r--runtime/build.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/build.rs b/runtime/build.rs
index dac6dee88..abdd0e584 100644
--- a/runtime/build.rs
+++ b/runtime/build.rs
@@ -222,6 +222,7 @@ mod startup_snapshot {
impl deno_node::NodeEnv for SnapshotNodeEnv {
type P = Permissions;
+ type Fs = deno_node::RealFs;
}
deno_core::extension!(runtime,