Skip to main content

Crate darkly

Crate darkly 

Source

Modules§

action
Every command the editor can run, as data.
actions
brush
Node-graph composable brush engine.
catalog
The one shape every registry of typed variants projects into.
clipboard
Clipboard system: typed internal clipboard with extensible content types.
color
CPU colour math shared by the brush graph’s hsv node and the global per-stroke colour jitter: the twin of shaders/lib/colorspace.wgsl (rgb_to_hsv / hsv_to_rgb) and shaders/lib/hsv_adjust.wgsl (hsv_adjust). A brush graph is evaluated on either path, so the two must stay in numerical parity: same branch structure, same operation order, same epsilon.
config
coord
Typed coordinate spaces.
docs_md
Fills the marked regions of the repository’s own markdown from the registries. Repository tooling that walks a source tree, so it is native-only: a browser has no checkout to sync. Marked regions in the repository’s markdown, filled from the registries.
document
engine
format
.darkly wire-format schema, helpers, and round-trip tests.
gpu
layer
mask
Selection-mask rasterization and contour extraction over flat R8 buffers.
nodegraph
Domain-agnostic node graph infrastructure.
product
What Darkly says it is, loaded from product.yaml. Packaging metadata for the tooling that generates store listings and desktop entries, so it lives behind the same gate as docs_md: a browser ships no desktop entry. Loads product.yaml, the authority for what Darkly says it is, and projects it into the syntaxes its consumers need.
sdf
Shared signed distance functions for mask rasterization and overlay hit testing.
shape
Parametric vector shapes: the families a shape object can be drawn from.
text
Text shaping, font registry, and the document→renderer bridge.
tool
tools
transform
Generic 2D transform record: a dependency-free helper.
undo
units
Display units for numeric values.

Constants§

VERSION
Darkly’s version: the latest git tag plus the commit height since it (git describe --tags --long, e.g. v0.3.0-1-gf0c3ea9), baked in by build.rs as DARKLY_VERSION. The single home for the version; consumers read this, never env!("CARGO_PKG_VERSION") (which is the stale hardcoded Cargo.toml value). The frontend reads it through the wasm bridge.