diff options
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/eval/src/io.rs | 2 | ||||
-rw-r--r-- | tvix/eval/src/lib.rs | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tvix/eval/src/io.rs b/tvix/eval/src/io.rs index cf9f6304305f..fd0680f3c2a5 100644 --- a/tvix/eval/src/io.rs +++ b/tvix/eval/src/io.rs @@ -27,8 +27,10 @@ pub trait EvalIO { /// Implementation of [`EvalIO`] that simply uses the equivalent /// standard library functions, i.e. does local file-IO. +#[cfg(feature = "impure")] pub struct StdIO; +#[cfg(feature = "impure")] impl EvalIO for StdIO { fn read_to_string(&self, path: PathBuf) -> Result<String, ErrorKind> { let path: PathBuf = path.into(); diff --git a/tvix/eval/src/lib.rs b/tvix/eval/src/lib.rs index 8cf9fe6e1bba..17dff9420301 100644 --- a/tvix/eval/src/lib.rs +++ b/tvix/eval/src/lib.rs @@ -45,7 +45,7 @@ use std::sync::Arc; pub use crate::builtins::global_builtins; pub use crate::compiler::{compile, prepare_globals}; pub use crate::errors::{Error, ErrorKind, EvalResult}; -pub use crate::io::{DummyIO, EvalIO, StdIO}; +pub use crate::io::{DummyIO, EvalIO}; use crate::observer::{CompilerObserver, RuntimeObserver}; pub use crate::pretty_ast::pretty_print_expr; pub use crate::source::SourceCode; @@ -53,6 +53,9 @@ pub use crate::value::Value; pub use crate::vm::run_lambda; pub use crate::warnings::{EvalWarning, WarningKind}; +#[cfg(feature = "impure")] +pub use crate::io::StdIO; + /// Internal-only parts of `tvix-eval`, exported for use in macros, but not part of the public /// interface of the crate. pub mod internal { |