1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00
denoland-deno/runtime/lib.rs
Bartek Iwańczuk 913e2875c1
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.
2023-03-30 03:20:31 +02:00

44 lines
915 B
Rust

// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
pub use deno_broadcast_channel;
pub use deno_cache;
pub use deno_console;
pub use deno_core;
pub use deno_crypto;
pub use deno_fetch;
pub use deno_ffi;
pub use deno_flash;
pub use deno_fs;
pub use deno_http;
pub use deno_io;
pub use deno_kv;
pub use deno_napi;
pub use deno_net;
pub use deno_node;
pub use deno_tls;
pub use deno_url;
pub use deno_web;
pub use deno_webidl;
pub use deno_websocket;
pub use deno_webstorage;
pub mod colors;
pub mod errors;
pub mod fmt_errors;
pub mod fs_util;
pub mod inspector_server;
pub mod js;
pub mod ops;
pub mod permissions;
pub mod tokio_util;
pub mod web_worker;
pub mod worker;
mod worker_bootstrap;
pub use worker_bootstrap::BootstrapOptions;
pub struct RuntimeNodeEnv;
impl deno_node::NodeEnv for RuntimeNodeEnv {
type P = permissions::PermissionsContainer;
type Fs = deno_node::RealFs;
}