Skip to content
beskid The Beskid Book

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

04.4 Corelib layout

Standard library packages, corelib identity, and where Beskid ships the std.

Corelib layout

Application code is yours. Corelib is the shared floor: collections, contracts, options, the stuff you should not rewrite per repo.

Package identity is corelib (legacy standard_library paths may still be accepted by tooling). Sources live in the compiler corelib submodule / beskid_corelib/ tree with beskid_corelib/Project.proj at the separated workspace root (BESKID_CORELIB_ROOT).

Beskid standard library implementation stays Beskid source, not a side Rust crate pretending to be std.

CLI ensures bundled corelib is available on launch; override with BESKID_CORELIB_SOURCE when hacking std. beskid dev build corelib materializes embedded templates for offline/bootstrap scenarios.

Corelib splits into interlinked workspace packages, not one monolithic IO.bd dumping ground:

  • Primitive types and contracts in the foundation package under Core (including Option<T>)
  • Runtime syscall-backed I/O under runtime packages; higher console work in dedicated packages (see platform core library domain)
flowchart TD
  accTitle: Corelib layout
  accDescr: Your application depends on corelib packages, which split into foundation packages, higher-level console packages and syscall-backed runtime packages.
  APP[Your App] --> CL[corelib packages]
  CL --> CT["Foundation: Option, Query"]
  CL --> CO[Higher-level console packages]
  CL --> RT["Runtime packages: syscall-backed I/O"]
  CO --> RT
  RT --> CT

Text equivalent: Your application depends on corelib packages: foundation (such as Option<T>), higher-level console packages, and runtime packages with syscall-backed I/O. The console packages build on the runtime packages, and the runtime packages build on foundation.

Compiler doc emission can place api.json and markdown under .beskid/docs/. Registry and pckg treat structured API JSON as the primary contract. You consume std docs like any package docs, not a separate mythological website.

05. Names nobody agreed on