Skip to main content

Crate grift_std

Crate grift_std 

Source
Expand description

§Grift Standard Library

Standard library features for the Grift R7RS-compliant Scheme implementation that require Rust’s std (I/O, filesystem, etc.).

This crate implements the IoProvider trait from grift_core using Rust’s standard I/O, giving the no_std evaluator access to real input/output when running on a hosted platform.

§Quick Start

use grift_std::StdIoProvider;
use grift_core::IoProvider;

// Create a standard I/O provider
let mut io = StdIoProvider::new();

// Check port types
use grift_core::PortId;
assert!(io.is_input_port(PortId::STDIN));
assert!(io.is_output_port(PortId::STDOUT));

§Crate Boundary

Crate#![no_std]Purpose
grift_coreDefines IoProvider trait
grift_stdImplements IoProvider with std::io
grift_evalPure evaluator, no I/O
grift_replInteractive REPL

Structs§

DisplayPort
Write a Value through an IoProvider port.
NullIoProvider
A no-op I/O provider that silently discards all output and returns IoErrorKind::Unsupported for reads.
PortId
Identifies an I/O port.
StdIoProvider
An IoProvider implementation backed by Rust’s standard I/O.

Enums§

IoErrorKind
Error kinds for I/O operations in no_std environments.

Traits§

IoProvider
Trait for providing I/O operations to the evaluator.

Type Aliases§

IoResult
Result type for I/O operations.