Skip to main content

Crate indicatrix_worker

Crate indicatrix_worker 

Source
Expand description

indicatrix-worker: a library server for a indicatrix-backed gemstone design catalogue, with optional render capacity on top.

Default role: library server. Running serve with no extra features accepts indicatrix-net’s read-only design-library protocol (see serve::library) over mutual TLS – listing/searching designs, fetching one in full, fetching an attachment’s bytes. This is the default, not an add-on: a future Slint mobile client talks to exactly this protocol and never has a renderer compiled in.

worker feature (off by default): render capacity. Gates RenderRequest handling, stream_emit, render_core, render_cmd, the render subcommand, and Backend advertisement in WELCOME – see Cargo.toml for exactly what that turns on, and serve’s module docs for how one connection dispatches between the library and render protocols once both are compiled in.

  • render (only meaningful with worker on): trace a scene straight to a PNG, no networking. See [render_cmd::run].
  • serve: the coordinator. Serves the library protocol to viewers (always); under worker also accepts joining workers on a separate worker port ([coordinator]) and, with --render, renders RenderRequests with its own CPU/GPU. serve no longer renders by default. See serve::run.
  • join (worker): dial a coordinator’s worker port and serve its render requests over that outbound connection. See [join::run].

§GPU

An optional gpu feature (off by default, implies worker) routes tracing through indicatrix’s GPU megakernel instead of optics::raytracer::trace_spectral_ray. Verified end to end against a real adapter – see crates/indicatrix/examples/gpu_equivalence_harness.rs.

[indicatrix::renderer::gpu_backend::GpuBackend] is the decline/fallback wrapper both this crate and apps/indicatrix-cut drive. It lives in indicatrix, not here, since a duplicated copy of a correctness policy (the HDR-environment decline) can drift into silently rendering the wrong image.

Modules§

cli
Hand-rolled argument parsing – no external CLI-parsing crate.
enroll
Token-based enrollment.
enroll_client
The two CLI-facing halves of token-based enrollment that run OUTSIDE the serve process.
pki
cert init / cert issue-server / cert issue-client: an in-process private CA for indicatrix-worker’s mutual TLS, with two client roles (viewer and joining worker – see role).
serve
The serve subcommand – the coordinator (renders itself only with --render; viewers and joining workers on separate ports).