Skip to main content

Module libraries

Module libraries 

Source
Expand description

Embedded R7RS standard library source registry.

Each entry maps a library name (e.g. &["scheme", "base"]) to the embedded Scheme source for its define-library form. These are loaded on-demand by the evaluator when a library is first imported.

§Feature-gated library inclusion

Each library is gated behind a corresponding Cargo feature flag. By default, the all-libraries feature enables every library, preserving backward compatibility. For resource-constrained embedded targets, disable default features and select only the libraries you need:

[dependencies.grift_core]
version = "..."
default-features = false
features = ["scheme-base", "scheme-write"]

§Available feature flags

FeatureLibrary
scheme-base(scheme base)
scheme-case-lambda(scheme case-lambda)
scheme-char(scheme char)
scheme-cxr(scheme cxr)
scheme-eval(scheme eval)
scheme-file(scheme file)
scheme-inexact(scheme inexact)
scheme-lazy(scheme lazy)
scheme-load(scheme load)
scheme-process-context(scheme process-context)
scheme-read(scheme read)
scheme-repl(scheme repl)
scheme-time(scheme time)
scheme-write(scheme write)
all-librariesAll of the above

Structs§

LibrarySource
A single entry in the embedded library source registry.

Constants§

LIBRARY_SOURCES
All embedded standard library sources.