Skip to main content

Module RuntimeBuild

Module RuntimeBuild 

Source
Expand description

§RuntimeBuild - Echo scheduler bring-up

Constructs the Echo async scheduler with the right worker count and telemetry knobs for the active build profile.

Layout (one export per file, file name = identity):

  • SchedulerConfig::Struct - tuning knobs with profile-aware Default.
  • CreateBuilder::Fn - SchedulerConfigSchedulerBuilder.
  • Build::Fn - default bring-up; CPU count workers.
  • BuildWithConfig::Fn - bring-up from a custom SchedulerConfig::Struct.
  • BuildDebug::Fn - single-worker scheduler under the Debug feature.

Profile cheat sheet:

  • Debug: 1 worker, verbose logs.
  • Development: CPU count workers, info logs.
  • Release: CPU count workers, warn logs, telemetry.

TODO: zero callers as of 2026-05-02 - Binary::Main currently creates the scheduler inline. Wire through this module when the profile-aware build sites land.

Modules§

Build
Default scheduler bring-up: forward to BuildWithConfig::Fn with SchedulerConfig::Struct::default(). The default adapts to the active build profile (CPU count workers, telemetry under Telemetry, log level by Debug / Development).
BuildDebug
Single-worker scheduler for debugging. Predictable execution order makes step-through and trace inspection tractable. Compile-time gated to the Debug feature.
BuildWithConfig
Construct an Echo scheduler from a custom SchedulerConfig::Struct. Returns an Arc<Scheduler> ready for use; emits lifecycle dev-log lines with feature-gated detail (Telemetry, Debug).
CreateBuilder
Translate a SchedulerConfig::Struct into a configured Echo SchedulerBuilder. Worker counts are clamped to [1, 256] so the caller can’t accidentally request 0 workers or oversaturate.
SchedulerConfig
Echo scheduler tuning knobs. Default adapts to the active build profile: telemetry on under Telemetry, log level scales by Debug / Development, worker count is None (= CPU count).