Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Design model

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Host projects (Host, including template output) always receive an implicit dependency on the canonical corelib aggregate (beskid_corelib, package identity corelib). Injection happens during DAG construction in resolve_dependencies, not via optional manifest flags.

flowchart TB
  Host[Host Project.proj]
  Resolver[resolve_dependencies]
  Std[Implicit Std / corelib path]
  Graph[Project DAG]
  Plan[CompilePlan]
  Sem[Semantic + lowering]
  Host --> Resolver
  Resolver --> Std
  Std --> Graph
  Graph --> Plan --> Sem
InputResolution
BESKID_CORELIB_ROOTPoints at workspace or install root containing beskid_corelib/Project.proj
Repo discoveryWalk ancestors for compiler/corelib/beskid_corelib
Explicit Std path depHonored when declared; path fallback uses default_corelib_dependency_path()
Corelib workspace shardscompiler/corelib/packages/* must not get implicit back-edge (cycle guard)

beskid_analysis projects/parser.rs rejects noCorelib and useCorelib: false at parse time. Templates and scaffolds must not emit opt-out keys.

After the graph attaches corelib nodes, semantic resolution treats corelib types and builtins like any other dependency assembly: same CompilationContext, same diagnostic catalog. User-visible names defer to language-meta; this feature covers graph attachment only.

ensure_corelib_ready in beskid_cli materializes bundled corelib before commands run. LSP uses the same resolver paths via CompilationContext::try_for_analysis_path_with_graph_options.

  • compiler/crates/beskid_analysis/src/projects/graph/resolver.rsdefault_corelib_dependency_path, is_corelib_workspace_shard_manifest
  • compiler/crates/beskid_analysis/src/projects/parser.rs — opt-out rejection
  • compiler/crates/beskid_cli/src/corelib_runtime.rs, build.rs
  • Tests: compiler/crates/beskid_tests/src/projects/corelib/compile.rs