Expand description
Canonical embedded Harn standard library source catalog.
This crate intentionally contains only static source strings. The compiler,
runtime, and tooling read them through harn-stdlib-catalog and never
depend on this crate, so editing a stdlib module rebuilds only this crate
and the binaries that link it. A host calls install once at startup.
Loading this catalog is pure: modules cannot register ambient
effects, and every effectful stdlib function must receive its typed Harness
capability explicitly from the caller, including callbacks that may perform
effects.
Structs§
- Stdlib
Catalog - Every embedded stdlib source a host provides.
- Stdlib
CliScript - Embedded
.harnscript that backs a CLI subcommand. Looked up by theharn-clidispatch wedge (see harn#2293 epic and harn#2294 G1) so subcommands can ship in Harn instead of Rust. - Stdlib
Entrypoint Module - Stdlib
Prompt Asset - One embedded prompt template, addressed by its path under
std/. - Stdlib
Public Function - Stdlib
Source - One embedded stdlib module, imported as
std/<module>.
Constants§
- CONNECTOR_
EVENT_ SCHEMAS_ SOURCE - Canonical normalized connector event schemas, authored as Harn
typedeclarations. This is the SOURCE OF TRUTH for the Rust event-payload structs incrates/harn-vm/src/triggers/event/schemas_generated.rs, which are generated from these declarations byharn connector-schema-codegen. - STDLIB_
CLI_ SCRIPTS - STDLIB_
PROMPT_ ASSETS - STDLIB_
SOURCES
Statics§
- CATALOG
- This crate’s catalog: every embedded stdlib module, prompt asset, and CLI script.
Functions§
- builtin_
reexports - Builtins a stdlib module re-exports under its own name, so
import { assert_eq } from "std/testing"resolves. - entrypoint_
modules - find_
cli_ script - Find an embedded CLI subcommand script by name. Returns the embedded
source string when present, or
Noneif no script with that name is registered inSTDLIB_CLI_SCRIPTS. - get_
stdlib_ prompt_ asset - get_
stdlib_ source - install
- Install
CATALOGas the process’s standard library. Hosts call this once at startup, before running Harn code; calling it again is a no-op. - public_
functions_ for_ module