Skip to content
beskid The Beskid Book

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

16. Corelib: batteries with opinions

The standard library is injected, opinionated, and documented through api.json, not a grab bag of copy-pasted helpers.

Corelib: batteries with opinions

The corelib package is not “stdlib.zip you found on a forum.” The compiler injects it, the runtime backs part of it, and pckg serves the rest as normal, immutable package artifacts. Each .bpk carries its exact semver and registry dependency pins, while source .bproj files can keep workspace-local paths for development.

If you expected a monolithic System.IO graveyard, adjust expectations now.

SectionTopic
corelib commandMaterialize the embedded template with beskid dev build corelib.
Injection and resolutionHow every project gets the same canonical package.
Terminal and consoleANSI, streams, and why console is not syscall soup.
Doc and api.jsonbeskid dev syntax doc, structured API, and pckg docs UI.
Runtime-backed surfacesWhat must call through the runtime vs pure Beskid.
flowchart LR
accTitle: Corelib delivery
accDescr: The CLI injects corelib sources, doc generation produces api.json for pckg registry docs, and runtime-backed surfaces feed the same sources.
CLI[beskid CLI] --> inj[Corelib injection]
inj --> src[Corelib sources]
src --> doc[beskid dev syntax doc / api.json]
doc --> pckg[pckg registry docs]
runtime[Runtime-backed surfaces] --> src

The sources under compiler/corelib/packages are split into these packages.

architecture-beta
accTitle: Corelib packages
accDescr: The corelib sources are split into foundation, runtime, concurrency, console, network, http, interop, glue, compiler-sdk and pest-gen-schema packages.
group packages(server)[compiler/corelib/packages]
service foundation(server)[foundation] in packages
service runtime(server)[runtime] in packages
service concurrency(server)[concurrency] in packages
service console(server)[console] in packages
service network(server)[network] in packages
service http(server)[http] in packages
service interop(server)[interop] in packages
service glue(server)[glue] in packages
service compiler_sdk(server)[compiler-sdk] in packages
service pest_gen_schema(server)[pest-gen-schema] in packages
foundation:R --> L:network
network:R --> L:http

Text equivalent: The packages are foundation, runtime, concurrency, console, network, http, interop, glue and compiler-sdk. Arrows point from a package to the package that depends on it: network depends on foundation, and http depends on network.

17. Execution: ABI, host, and runtime