Skip to main content

interpret_streaming_with_vfs

Function interpret_streaming_with_vfs 

Source
pub async fn interpret_streaming_with_vfs<F>(
    input: &str,
    on_output: Rc<RefCell<F>>,
    vfs: Option<Arc<dyn Vfs>>,
) -> InterpreterResult
where F: FnMut(String) + 'static,
Expand description

Like interpret_streaming, but routes the interpreter’s file I/O (Write/Read/Mount) to vfs. The browser Studio passes its WebVfs here so the standard-library I/O vocabulary works against OPFS/IndexedDB; a None vfs leaves file I/O reporting “VFS not initialized” as before. The clone-per-task model means concurrent tasks inherit the same VFS handle.