1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! brep-render — the Rust rendering engine that replaced the retired viewer.
//!
//! Slice 1 (requirements doc §11 R40(1)/R41): engine core + solid/face/edge
//! display fed by the kernel feature pipeline, with native headless artifact
//! rendering for the test suite.
//!
//! Layering (the dual-target requirement — web AND desktop from one codebase):
//!
//! - [`scene`]: the renderer-agnostic scene store ([`scene::RenderScene`]),
//! keyed by kernel names. No GPU, no window, no renderer assumptions.
//! - [`pipeline`]: history request JSON → `execute_history` (in-process kernel
//! call) → scene population via the kernel's native display accessors.
//! - [`camera`]: pure-math cameras (orthographic artifact framing, orbit).
//! - [`render`]: the wgpu core — `SceneRenderer::render_to_view(scene, camera,
//! view, size)` draws into ANY `wgpu::TextureView`. It never owns a window or
//! canvas; presentation shells are thin:
//! * headless: render-to-texture → readback → PNG (`render_to_png`),
//! used by the `brep-render-artifact` binary and the test suite;
//! * desktop: `brep-render-desktop` (feature `desktop`) wraps a winit window
//! + surface around the same core;
//! * web (later slice): a wasm canvas surface around the same core.
//! - [`color`]: the name-hashed stable solid colors (byte-compatible with the
//! previous artifact renderer's `solidColor`) + sRGB helpers.
// Re-export the kernel crate so downstream shells (e.g. `brep-app`'s wasm
// `WorkerRunner`) can name the run-boundary types the `runner::HistoryRunner`
// trait exposes (`brep_kernel::HistoryRequest`, …) WITHOUT taking their own
// direct path dependency — which would have to mirror this crate's kernel
// feature split (`default-features = false` / native `parallel`) or feature
// unification bites. One canonical instance, reached as `brep_render::brep_kernel`.
pub use brep_kernel;
// The wasm-bindgen browser API (attach/resize/events/camera/pick/scene-feed/
// settings/world→screen) — the R3 seam the host UI programs against. wasm only;
// its GPU wrapper needs a canvas/WebGPU context.