Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Crate map

The kernel is a Cargo workspace of 17 crates under crates/. This table is read from each crate’s Cargo.toml and lib.rs. Dependencies are the [dependencies] of the manifest (dev-dependencies are noted separately).

Table

CrateRoleMain modulesDepends on
ck-coreMath and utilities shared by everythinglinalg (vectors, matrices, frames), xform, quad (root finding), kdtree, fxhash, memo, budget (work budgets), tracenone
ck-geomCurves and surfaces, analytic and NURBS; representation only, no topologycurve, curve2 (sketch and parameter space), pcurve, surface, nurbs (basis, B-spline curves and surfaces, rational), fit, analysis (curvature, derivatives), convertck-core
ck-jsonZero-dependency JSON value, parser and writer; keeps key order; shortest round-trip floatsone filenone
ck-topoThe B-rep: arena-based body of lumps, shells, faces, loops, coedges, edges and vertices; builders, mass properties, region classification, editsbody, make (extrude, revolve), mass, orient, region, edit, check (structural check), facekey, trig (ported sine and cosine)ck-core, ck-geom, ck-json
ck-checkThe independent solid validator behind validate: topology, geometry and display-mesh checks with stable issue codesshell, wire, edge, solid, tessellationck-geom, ck-topo, ck-core
ck-healHealing: vertex merging, sewing, small-feature removal, orientation, tolerant edges; also damages bodies for testingvertex, sew, small, wire, orient, tolerance, damageck-geom, ck-topo, ck-check (dev: ck-model, ck-json, ck-core)
ck-tessTessellation of bodies into the display mesh (positions, normals, triangle-to-face map, silhouettes)cdt (constrained Delaunay), curvature (tolerances), face, mesh, comb, curvmap. Feature traceck-core, ck-geom, ck-topo (dev: ck-json)
ck-opsModelling operations: the geometric work behind the featuresboolean, blend (fillet, chamfer, g2), loft, sweep, helix, offset, shell, draft, pipecut, surfacing (fill, knit, trim, extend, fair, thicken), intersect (curve and surface intersections), bvh, analysis (the distance, thickness, section, probe and related requests), section, measure, interference, drawing, dfm, profile (design rules), agent (queries). Feature sanity-shadowck-core, ck-geom, ck-topo, ck-json, ck-tess, ck-check
ck-textLettering: built-in fonts, TrueType and OpenType outline reader, layout into closed loopsttf, fonts (registry), sha256; layout in libnone
ck-modelThe document model and feature program: parts, expressions, references, sketches and solver, features, regeneration driverexpr, refs, planes, sketch (solver, profiles, offset, spline, text), sketch3, features (one module per family), threads, regenck-core, ck-geom, ck-json, ck-topo, ck-ops, ck-check, ck-text (dev: ck-io, ck-tess)
ck-ioSTEP export and import, ACIS SAT importstep (write, read, parse), sat (parse, build)ck-core, ck-geom, ck-topo (dev: ck-json, ck-check, ck-tess)
ck-skpSketchUp reader, both containers; bakes to meshes or to a planar-face bodyvff (modern), legacy, legacy_ar (classic), zip, inflate, tlv, xml, model, scene, tri, body, export, errorck-geom, ck-topo (dev: ck-check, ck-tess)
ck-sldprtSolidWorks part reader, to a bodycontainer, inflate, xt (Parasolid transmit), ir, build, errorck-geom, ck-topo (dev: ck-check, ck-tess)
ck-recogFeature recognition of imported bodiesholes, prism, revolve, emit, rebuild, request, modelck-core, ck-geom, ck-json, ck-topo, ck-model, ck-ops (dev: ck-io)
ck-serverRequest envelope, dispatch table, reply framing, tag-keyed session state, hooks for the geometry layerssession, reply, query, geometry (mass, interference, import and step requests), model, agent, drawing, comb, curvature, trace, clock, viewck-json
ck-wasmThe WebAssembly module: the five-function ABI and the engine that wires every request to the geometry cratesengine, regen_cache, view_cache, drag, profile_q, refdiff, sketch_q, host. Features skp, sanity-shadow. Crate types cdylib and rlibck-json, ck-server, ck-model, ck-core, ck-geom, ck-topo, ck-check, ck-heal, ck-ops, ck-io, ck-sldprt, ck-tess, ck-recog, ck-text; optional ck-skp
ck-nativeA local HTTP service around the same dispatch, one worker thread per session; a library and the ck-native binarystore (token and pairing records), mainck-server, ck-wasm, ck-ops, ck-core, ck-json, ck-text

Layers

From the bottom up:

  1. Foundations: ck-core, ck-json, ck-text.
  2. Geometry and topology: ck-geom, then ck-topo.
  3. Analysis and meshing: ck-check (validation), ck-tess (display mesh), ck-heal.
  4. Operations: ck-ops.
  5. Document model: ck-model (features, regeneration), ck-recog.
  6. Interchange: ck-io, ck-skp, ck-sldprt. They build bodies and depend only on geometry and topology.
  7. Protocol and hosts: ck-server (dispatch; it depends only on ck-json and receives geometry behaviour through hooks), ck-wasm (installs the hooks and exports the ABI), ck-native (HTTP).

ck-wasm is the only crate that sees every other one; it is where a request type such as importStep or step is tied to ck-io and ck-heal. A native test calls ck_wasm::engine::install() and then ck_server::handle, which is the path the module exports use. See architecture.

Build profiles

Defined in the workspace Cargo.toml:

ProfileSettingsUse
releaseoptimisation 3, link-time optimisation, panic = "abort", one code-generation unitThe shipped WebAssembly module
servicerelease with panic = "unwind"ck-native, which must survive a panic in one session
fastrelease without link-time optimisation, 16 code-generation units, incremental, panic = "unwind"Quick native test runs

See also