Skip to content
Table of contents

Dimension: From matrix storage to a rendered scene

Dimension is my Rust workspace for mathematics and graphics experiments. mathlib provides numerical building blocks; render uses them for CPU-side transforms and cameras before submitting graphics work through wgpu.

Library
  • Updated
  • Rust · 63.95%
  • MIT
Documented components
2Explore modules
Source documents
21Read the instructions
Repository languagesRust 63.95%10

Shares calculated from GitHub Linguist bytes.

Rust63.95%
63.95%2,691,477 bytes
JavaScript31.84%
31.84%1,340,031 bytes
HTML2.57%
2.57%108,173 bytes
Just0.52%
0.52%21,784 bytes
Language%Bytes
Rust63.95%2,691,477
JavaScript31.84%1,340,031
HTML2.57%108,173
Just0.52%21,784
CSS0.51%21,650
WGSL0.4%16,946
4 more languages
TypeScript0.13%5,627
Python0.04%1,817
Shell0.02%751
Dockerfile0.01%389

1. Overview

1.1. Why it exists

High-performance wgpu graphics pipeline and linear algebra math engine built entirely in Rust from first principles.

1.2. Best fit

Hardware-accelerated 3D heightmap rendering, spatial transformation pipelines, and graphics education.

2. Use cases

A Rust workspace around mathlib: linear algebra, wgpu rendering, parsers, physics and geometry, with WASM demos.

Use-case diagram for Dimension: Compute with dense and sparse; Render a 3D scene with wgpu; Load meshes and data files; Simulate physics, collisions; Publish the WASM demo siteDimensionCompute with dense and sparseRender a 3D scene with wgpuLoad meshes and data filesSimulate physics, collisionsPublish the WASM demo siteRust developer«system»Browser (WASM/WebGPU)«system»GPU via wgpu
People on the left, external systems on the right; each oval is a use case backed by the files cited below.
Compute with dense and sparse
Rust developer

The mathlib crate provides dense and sparse matrices, vectors, SVD and 3D helpers; cd mathlib && cargo test and cargo bench exercise them.

Render a 3D scene with wgpu
Rust developerGPU via wgpu

The render crate draws a mathlib Tree scene through wgpu; cargo run -p render-demo --example render_native opens a window with a cube, gizmo and picking.

Load meshes and data files
Rust developer

The parse crate reads JSON, XML, OBJ, MTL, BVH, glTF, PLY, PNG, JPEG, ZIP and TAR behind Cargo features such as json and obj.

Simulate physics, collisions
Rust developer

physics implements PBD/XPBD with examples particles_2d, rigid_bodies_3d and softbody_3d; collision adds AABB, OBB, BVH, BSP, ray and frustum queries.

Publish the WASM demo site
Rust developerBrowser (WASM/WebGPU)

just website-build compiles the mathlib, render, kinematics, physics, geometry and neural demos to WASM into website/; pages.yml deploys it to GitHub Pages.

2.1. Scenario: Trying the demos locally before a push

  1. Run cd mathlib && cargo test to check the core library.
  2. Run just run-render to open the native wgpu scene and move the gizmo.
  3. Run just website-build to compile every demo to WASM into website/.
  4. Run just website-serve and open http://localhost:3000/ to browse /mathlib/, /render/ and /physics/.
  5. Push to main; the Pages workflow rebuilds website/ and publishes it.

Files readREADME.mdCargo.tomljustfiledocs/website.mdmathlib/README.mdrender/README.mdparse/README.mdphysics/Cargo.tomlcollision/Cargo.toml.github/workflows/pages.yml

3. Getting started

These commands come from the repository documentation. They were not run during this review.

kinematics/README.md · Build, test, bench
cd kinematics
cargo build
cargo test
cargo bench
cargo run --example forward_kinematics
cargo run --example jacobian_ik
mathlib/demo/README.md · Build and serve
just wasm-build      # or just wasm-build-gpu for GPU support
just wasm-serve
mathlib/demo/wasm-demo/README.md · Build
wasm-pack build --target web --features wasm
neural/README.md · Downloading ONNX models
cargo run -p neural --bin download_models -- --all
neural/README.md · Precomputing embeddings for the WASM recommendation demo
cargo run -p neural --example precompute_demo_embeddings --features precompute -- mathlib/demo/wasm-demo/recommendation/data.json
render/README.md · Build and run
cargo run -p render-demo --example render_native
render/README.md · Build and run
just render-wasm         # build + serve; open http://localhost:3000/wasm-demo/
website/README.md · Build and serve (local)
just website-build        # Build all WASM demos and populate website/
just website-build-gpu    # Same, but with GPU-enabled mathlib (WebGPU init, async matmul, etc.)
just website-build-simd   # Same as website-build, but render demo built with SIMD (can improve frame rate)
just website-serve        # Serve website/ (e.g. http://localhost:3000)
Tasks declared in manifests

3.1. e2e/package.json

test
playwright test

4. Repository references

Excerpts from the repository’s guides, in their original language. Links open the inspected source revision.

Prerequisites and first run

4.1. Getting started

CONTRIBUTING.md

All code lives in the mathlib/ crate. From the repo root: Optional: use just from the repo root (see justfile) for common tasks. For a containerized dev environment, see .devcontainer. For pre-commit hooks (fmt, clippy, typos), see .pre-commit-config.yaml and docs/dev-tools.md.
Read the full instructions ↗
Operations and troubleshooting

4.2. Performance / Troubleshooting

render/demo/README.md

  • Use a modern browser with WebGPU enabled (Chrome, Edge, or Firefox with dom.webgpu.enabled) for best frame rate; software or limited WebGPU can cause slow FPS.
  • For potentially better FPS on CPU-bound work (math, culling), build the render WASM demo with SIMD: just wasm-render-build-simd, then just wasm-render-serve, and open the same URL.
Read the full instructions ↗
Development and contributions

4.3. Contributing to Dimension

CONTRIBUTING.md

Thanks for your interest in contributing. This project hosts mathlib, a Rust linear algebra library.
Read the full instructions ↗

4.4. Development workflow

CONTRIBUTING.md

  1. Fork and clone the repository.
  2. Create a branch for your change (e.g. fix/svd-edge-case, feat/sparse-format).
  3. Make your changes in mathlib/. Keep formatting and style consistent with the existing codebase.
  4. Run tests and lints:
  5. Submit a pull request with a clear description of the change and why it’s needed.
Read the full instructions ↗

4.5. E2E tests (Playwright)

e2e/README.md

Browser end-to-end tests for WASM demos. Requires Node.js and Playwright browsers.
Read the full instructions ↗

4.6. What the tests do

e2e/README.md

  • Render (tests/render.spec.ts): Opens the render WASM demo at /wasm-demo/, checks the canvas is visible with width/height, ensures the error div is not shown, and takes a screenshot for visual regression.
  • Kinematics (tests/kinematics.spec.ts): Opens the kinematics-demo WASM at /wasm-demo/, checks the canvas (800×600) is visible and the error div is not shown, verifies the hint text (orbit / IK / zoom), and that the page title matches the demo.
Read the full instructions ↗

4.7. E2E tests (Playwright) (README.md)

render/demo/README.md

From repo root:
Read the full instructions ↗
Source documentation

21 documents read from 21 candidates.

5. Features and components 2

Data and numerical operations
mathlib exports dense and sparse storage, matrix views, vectors and numerical methods. A caller chooses the representation that fits its problem. Optional executor features are separate from the basic storage API.
Scene and platform boundary
render exports World, EntityId and Transform, with parent-child scene relationships. Native windowing and WebAssembly canvas support sit around the renderer. The root workspace also contains geometry, collision, kinematics and physics crates.

6. Architecture

Expand a component to follow its connections, or explore the full diagram.

System components Context
Mermaid Interactive diagram

System overview of the components and connections verified in the repository.

Static architecture view for Dimension
Static preview. The interactive diagram replaces it after Mermaid loads.
flowchart LR
node_application(("Application"))
node_api["Public API<br/>[lib.rs]"]

subgraph group_compute["Compute Backends"]
  node_cpu["CPU Dispatch<br/>[mod.rs]"]
  node_parallel["Parallel CPU<br/>[parallel.rs]"]
  node_sequential["Sequential CPU<br/>[sequential.rs]"]
  node_simd["SIMD CPU<br/>[simd.rs]"]
  node_executor["Execution<br/>[executor.rs]"]
  node_gpu["GPU Compute<br/>[mod.rs]"]
  node_pipelines["GPU Pipelines<br/>[pipelines.rs]"]
  node_shaders["GPU Shaders<br/>[shaders.rs]"]
end

subgraph group_algorithms["Numerical Algorithms"]
  node_linear["Linear Solvers<br/>[solve.rs]"]
  node_decomposition["Decomposition<br/>[svd.rs]"]
  node_optimization["Optimization<br/>[linesearch.rs]"]
  node_graph["Graph Algorithms<br/>[mod.rs]"]
end

subgraph group_domains["Math Domains"]
  node_math3d["3D Math<br/>[math3d.rs]"]
  node_transforms["Transforms<br/>[mod.rs]"]
  node_ml["ML and Statistics<br/>[mod.rs]"]
  node_noise["Noise<br/>[mod.rs]"]
end

subgraph group_data["Linear Algebra Data"]
  node_matrix["Matrices<br/>[matrix.rs]"]
  node_vector["Vectors<br/>[vector.rs]"]
  node_storage[("Matrix Storage<br/>[dense_storage.rs]")]
  node_operators["Operators<br/>[operators.rs]"]
end

node_application -->|"uses"| node_api
node_cpu -->|"dispatches"| node_parallel
node_cpu -->|"dispatches"| node_sequential
node_cpu -->|"dispatches"| node_simd
node_pipelines -->|"uses shaders"| node_shaders
node_api --> group_data
node_api -->|"exports"| group_algorithms
node_api --> group_domains
class node_matrix,node_vector,node_storage,node_operators toneBlue
class node_cpu,node_parallel,node_sequential,node_simd,node_executor,node_gpu,node_pipelines,node_shaders toneAmber
class node_linear,node_decomposition,node_optimization,node_graph,node_api toneMint
class node_math3d,node_transforms,node_ml,node_noise toneRose
class node_application toneIndigo

A Rust mathematics workspace centred on mathlib. Applications construct vectors, matrices and cubes, then use numerical, geometric and analytical operations before data reaches the wider rendering workspace.

Components
22
Connections
17
Evidence-backed links
16/17
Text version of the diagram

The diagram merges parallel links between groups, so it shows 8 of 17. Full list:

  • Application → Public API (uses)
  • Public API → Matrices (exports)
  • Public API → Vectors (exports)
  • Public API → Matrix Storage (exports)
  • Public API → Operators (exposes)
  • Public API → Linear Solvers (exports)
  • Public API → Decomposition (exports)
  • Public API → Optimization (exports)
  • Public API → Graph Algorithms (exports)
  • Public API → 3D Math (exports)
  • Public API → Transforms (exports)
  • Public API → ML and Statistics (exports)
  • Public API → Noise (exposes)
  • CPU Dispatch → Parallel CPU (dispatches)
  • CPU Dispatch → Sequential CPU (dispatches)
  • CPU Dispatch → SIMD CPU (dispatches)
  • GPU Pipelines → GPU Shaders (uses shaders)
Follow one path through the code

For a scene update, start with a local Transform and its parent relationship. Follow the scene representation toward the renderer rather than assuming a matrix calculation executes on the GPU. wgpu is the graphics backend; mathlib’s optional GPU executor is a different feature.

7. Technical dossier

Built from the source at commit 5281d09 (667 files). Each item comes from a pattern match in the code, so open the linked file before relying on it.

7.1. Layers and modules

Folders are sorted into layers by name, from the user interface down to data access. Because the sorting uses names only, the diagram says nothing about calls between layers.

Mermaid Layered view
flowchart TB
  subgraph L_presentation["Presentation"]
    direction TB
    presentation_0["mathlib/demo<br/>15 files"]
    presentation_1["render/ui<br/>6 files"]
    presentation_2["website<br/>2 files"]
    presentation_3["website/neural<br/>2 files"]
    presentation_more["+3"]
  end
  subgraph L_interface["Entry points and API"]
    direction TB
    interface_0["network/server<br/>5 files"]
    interface_1["neural/bin<br/>1 file"]
  end
  subgraph L_application["Application services"]
    direction TB
    application_0["mathlib/demo<br/>1 file"]
    application_1["mathlib/gpu<br/>1 file"]
    application_2["neural/scripts<br/>1 file"]
    application_3["render/src<br/>1 file"]
    application_more["+1"]
  end
  subgraph L_domain["Domain and business rules"]
    direction TB
    domain_0["physics/src<br/>19 files"]
    domain_1["mathlib/math<br/>12 files"]
    domain_2["physics/demo<br/>11 files"]
    domain_3["geometry/src<br/>10 files"]
    domain_more["+11"]
  end
  subgraph L_infrastructure["Data and infrastructure"]
    direction TB
    infrastructure_0["network/utils<br/>11 files"]
    infrastructure_1["network/transport<br/>4 files"]
    infrastructure_2["network/examples<br/>3 files"]
    infrastructure_3["network/protocol<br/>3 files"]
    infrastructure_more["+8"]
  end
  subgraph L_core["Core source"]
    direction TB
    core_0["mathlib/benches<br/>48 files"]
    core_1["mathlib/examples<br/>37 files"]
    core_2["mathlib/demo<br/>23 files"]
    core_3["mathlib/wasm<br/>18 files"]
    core_more["+46"]
  end
  subgraph L_tests["Tests"]
    direction TB
    tests_0["mathlib<br/>95 files"]
    tests_1["parse<br/>15 files"]
    tests_2["geometry<br/>6 files"]
    tests_3["render<br/>6 files"]
    tests_more["+6"]
  end
  subgraph L_hosting["Build, CI and hosting"]
    direction TB
    hosting_0[".github<br/>11 files"]
    hosting_1[".devcontainer<br/>2 files"]
    hosting_2["(root)<br/>1 file"]
    hosting_3["website<br/>1 file"]
  end
  L_presentation ~~~ L_interface
  L_interface ~~~ L_application
  L_application ~~~ L_domain
  L_domain ~~~ L_infrastructure
  L_infrastructure ~~~ L_core
  L_core ~~~ L_tests
  L_core ~~~ L_hosting
Modules and their main layer
ModuleLayerFilesTypesExtensions
mathlib/benchesCore source480.rs
mathlib/demoCore source3951.js .html .ts
mathlib/examplesCore source381.rs
physics/srcDomain and business rules1922.rs
website/mathlibCore source190.js .css
mathlib/wasmCore source1830.rs
mathlib/srcCore source1723.rs
parse/srcCore source1627.rs
kinematics/demoCore source157.rs .ts .js
mathlib/graphCore source1412.rs
render/demoCore source141.rs .ts .html
collision/srcCore source1314.rs
mathlib/mathDomain and business rules1210.rs
network/utilsData and infrastructure1113.rs

62 smaller modules are not shown.

7.2. C4 model

From system context to code declarations. Each level reflects the available source evidence.

UML 1 · System context
1 · System context

The widest C4 view: who uses the project and which outside systems and data stores it relies on. Rendered with uml-mcp.

PlantUML source
@startuml
!include <C4/C4_Context>
LAYOUT_LEFT_RIGHT()
Person(P_http, "HTTP client")
Person(P_cli, "CLI user")
System(SYS, "Dimension", "Dimension is my Rust workspace for mathematics and graphics experimen…")
System_Ext(E0, "Hugging Face")
Rel(P_http, SYS, "Uses")
Rel(P_cli, SYS, "Uses")
Rel(SYS, E0, "Calls")
@enduml
UML 2 · Containers
2 · Containers

One level closer: the parts that run separately inside the project, their main language and how calls flow between them. Rendered with uml-mcp.

PlantUML source
@startuml
!include <C4/C4_Container>
LAYOUT_LEFT_RIGHT()
Person(P_http, "HTTP client")
Person(P_cli, "CLI user")
System_Boundary(SYS, "Dimension") {
  Container(APP, "Dimension", "Rust")
}
System_Ext(E0, "Hugging Face")
Rel(P_http, APP, "Uses")
Rel(P_cli, APP, "Uses")
Rel(APP, E0, "Calls")
@enduml
UML 3 · Components and layers
3 · Components and layers

Modules grouped by source-layer classification. Boundaries show organization, not runtime isolation or call relationships. Rendered with uml-mcp.

PlantUML source
@startuml
!include <C4/C4_Component>
LAYOUT_TOP_DOWN()
System_Boundary(SYS, "Dimension") {
Boundary(L0, "Presentation", "layer") {
Component(M0_0, "mathlib/demo", "HTML, .css", "15 files")
Component(M0_1, "render/ui", "Rust", "6 files")
Component(M0_2, "website", "HTML", "2 files")
Component(M0_3, "website/neural", "HTML", "2 files")
Component(M0_4, "kinematics/demo", "HTML", "1 files")
Component(M0_5, "render/demo", "HTML", "1 files")
Component(M0_6, "website/mathlib", ".css", "1 files")
}
Boundary(L1, "Entry points and API", "layer") {
Component(M1_0, "network/server", "Rust", "5 files")
Component(M1_1, "neural/bin", "Rust", "1 files")
}
Boundary(L2, "Application services", "layer") {
Component(M2_0, "mathlib/demo", "JavaScript", "1 files")
Component(M2_1, "mathlib/gpu", "Rust", "1 files")
Component(M2_2, "neural/scripts", "Python", "1 files")
Component(M2_3, "render/src", "Rust", "1 files")
Component(M2_4, "website/mathlib", "JavaScript", "1 files")
}
Boundary(L3, "Domain and business rules", "layer") {
Component(M3_0, "physics/src", "Rust", "19 files")
Component(M3_1, "mathlib/math", "Rust", "12 files")
Component(M3_2, "physics/demo", "Rust, TypeScript, HTML", "11 files")
Component(M3_3, "geometry/src", "Rust", "10 files")
Component(M3_4, "geometry/demo", "Rust, TypeScript, JavaScript", "9 files")
Component(M3_5, "geometry/examples", "Rust", "3 files")
Component(M3_6, "physics/examples", "Rust", "3 files")
Component(M3_7, "website/geometry", "TypeScript, JavaScript", "3 files")
Component(M3_more, "+7 modules", "", "")
}
Boundary(L4, "Data and infrastructure", "layer") {
Component(M4_0, "network/utils", "Rust", "11 files")
Component(M4_1, "network/transport", "Rust", "4 files")
Component(M4_2, "network/examples", "Rust", "3 files")
Component(M4_3, "network/protocol", "Rust", "3 files")
Component(M4_4, "network/serialize", "Rust", "3 files")
Component(M4_5, "render/platform", "Rust", "3 files")
Component(M4_6, "network/src", "Rust", "2 files")
Component(M4_7, "mathlib/clustering", "Rust", "1 files")
Component(M4_more, "+4 modules", "", "")
}
Boundary(L5, "Core source", "layer") {
Component(M5_0, "mathlib/benches", "Rust", "48 files")
Component(M5_1, "mathlib/examples", "Rust", "37 files")
Component(M5_2, "mathlib/demo", "JavaScript, TypeScript", "23 files")
Component(M5_3, "mathlib/wasm", "Rust", "18 files")
Component(M5_4, "mathlib/src", "Rust", "17 files")
Component(M5_5, "website/mathlib", "JavaScript", "17 files")
Component(M5_6, "parse/src", "Rust", "16 files")
Component(M5_7, "kinematics/demo", "Rust, TypeScript, JavaScript", "14 files")
Component(M5_more, "+42 modules", "", "")
}
Boundary(L6, "Tests", "layer") {
Component(M6_0, "mathlib", "Rust", "95 files")
Component(M6_1, "parse", "Rust, .xml", "15 files")
Component(M6_2, "geometry", "Rust", "6 files")
Component(M6_3, "render", "Rust", "6 files")
Component(M6_4, "physics", "Rust", "5 files")
Component(M6_5, "e2e", "TypeScript", "4 files")
Component(M6_6, "network", "Rust", "4 files")
Component(M6_7, "kinematics", "Rust", "3 files")
Component(M6_more, "+2 modules", "", "")
}
Boundary(L7, "Build, CI and hosting", "layer") {
Component(M7_0, ".github", ".yml, .md, .sh", "11 files")
Component(M7_1, ".devcontainer", ".json, .sh", "2 files")
Component(M7_2, "(root)", "justfile", "1 files")
Component(M7_3, "website", "Dockerfile", "1 files")
}
}
@enduml
UML 4 · Code
4 · Code

Selected declarations, fields and methods grouped by source file. No inheritance or call edges are inferred. Rendered with uml-mcp.

PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
top to bottom direction
hide empty members
package "Dimension" {
package "render/src/scene/world.rs" as F0 {
class "World" as T0_0 {
  spawn()
  get()
  get_mut()
  set_transform()
  set_primitive()
  set_color()
}
}
package "mathlib/src/graph/types.rs" as F1 {
class "Graph" as T1_0 {
  from_adjacency_list()
  from_grid_2d()
  from_grid_2d_with_weights()
  from_grid_2d_edge_weights()
  add_edge()
  add_undirected_edge()
}
}
package "mathlib/src/wasm/matrix.rs" as F2 {
class "WasmMatrix32" as T2_0 {
  from_inner()
  clone_inner()
  identity4()
  rotation()
  from_array()
  rows()
}
class "WasmMatrix" as T2_1 {
  from_array()
  identity()
  rows()
  cols()
  get()
  set()
}
}
package "mathlib/src/wasm/graph.rs" as F3 {
class "WasmGraph" as T3_0 {
  from_edges()
  from_grid_2d()
  from_grid_2d_edge_weights()
  add_edge()
  add_edge_undirected()
  run_dijkstra()
}
}
package "physics/src/state.rs" as F4 {
class "PhysicsState" as T4_0 {
  with_particles()
  num_particles()
  num_rigid_bodies()
  num_soft_bodies()
  add_rigid_body()
  add_soft_body()
}
class "PhysicsConfig" as T4_1 {
  dt
  substeps
  solver_iterations
  stabilization_iterations
  sor_omega
  sleep_threshold
  gravity
  contact_friction
}
}
package "mathlib/src/math/quaternion.rs" as F5 {
class "Quat4f" as T5_0 {
  identity()
  from_euler_angles()
  from_rotation_matrix3()
  to_euler_angles()
  from_axis_angle()
  to_scaled_axis()
}
}
package "physics/src/particle.rs" as F6 {
class "Particle" as T6_0 {
  kinematic()
  with_phase()
  with_radius()
  is_kinematic()
  default()
}
}
package "physics/src/softbody.rs" as F7 {
class "SoftBody" as T7_0 {
  from_youngs()
  with_phase()
  compliance_deviatoric()
  compliance_hydrostatic()
  global_index()
}
}
package "mathlib/src/executor.rs" as F8 {
class "AutoExecutor" as T8_0 {
  default()
  with_thresholds()
  use_gpu_matmul()
  use_gpu_dot()
  use_gpu_matvec()
  use_gpu_elementwise()
}
}
package "mathlib/src/math/dual_quaternion.rs" as F9 {
class "DualQuat4f" as T9_0 {
  real_w
  real_x
  real_y
  real_z
  dual_w
  dual_x
  dual_y
  dual_z
}
}
package "physics/src/body.rs" as F10 {
class "RigidBody" as T10_0 {
  x
  v
  inv_mass
  q
  omega
  inv_inertia
  shape
  phase
}
}
package "physics/src/body_constraint.rs" as F11 {
class "RigidContactConstraint" as T11_0 {
  body_a
  body_b
  r_a
  r_b
  normal
  tangent1
  tangent2
  depth
}
class "PositionalConstraint" as T11_1 {
  body_a
  body_b
  r_a
  r_b
  compliance
  lambda_accum
}
}
package "render/src/backend/camera.rs" as F12 {
class "Camera" as T12_0 {
  width
  height
  projection
  near
  far
  orbit_yaw
  orbit_pitch
  orbit_distance
}
}
package "render/src/engine.rs" as F13 {
class "GizmoDragState" as T13_0 {
  entity_id
  axis
  mode
  start_screen
  start_world_pos
  start_plane_hit
  axis_direction
  start_rotation
}
}
package "parse/src/lib.rs" as F14 {
class "Material" as T14_0 {
  name
  ka
  kd
  ks
  ke
  ns
  ni
  illum
}
}
package "render/src/backend/gpu.rs" as F15 {
class "SlicePlaneUniforms" as T15_0 {
  view_matrix
  proj_matrix
  object_matrix
  length_scale
  transparency
  _pad
  color
  _pad2
}
}
package "render/src/ui/theme.rs" as F16 {
class "Theme" as T16_0 {
  panel_bg
  panel_border
  title_bar
  button_bg
  button_hover
  button_pressed
  slider_track
  slider_thumb
}
}
package "render/src/backend/framebuffer.rs" as F17 {
class "Framebuffer" as T17_0 {
  texture
  view
  depth_texture
  depth_view
  width
  height
  format
}
}
package "render/src/ui/components.rs" as F18 {
class "Slider" as T18_0 {
  id
  rect
  value
  target_value
  velocity
  state
  dragging
}
}
package "mathlib/src/structure/sparse_formats.rs" as F19 {
class "SparseMatrixBCRS" as T19_0 {
  block_vals
  block_col_indices
  row_pointers
  rows
  cols
  block_rows
  block_cols
}
}
package "mathlib/src/decomposition/tsne.rs" as F20 {
class "TsneOptions" as T20_0 {
  n_components
  perplexity
  max_iters
  seed
  init_pca
  early_exaggeration
  momentum
}
}
}
@enduml

7.3. Data flow

The calls from the GitDiagram graph, in the order you meet them from the entry points. GitDiagram generates the graph with AI; the file paths it cites were checked against the repository tree.

Mermaid Sequence diagram
sequenceDiagram
  autonumber
  participant P0 as CPU Dispatch
  participant P1 as Parallel CPU
  participant P2 as Sequential CPU
  participant P3 as SIMD CPU
  participant P4 as GPU Pipelines
  participant P5 as GPU Shaders
  participant P6 as Application
  participant P7 as Public API
  participant P8 as Matrices
  participant P9 as Vectors
  participant P10 as Matrix Storage
  participant P11 as Operators
  participant P12 as Linear Solvers
  participant P13 as Decomposition
  participant P14 as Optimization
  participant P15 as Graph Algorithms
  participant P16 as 3D Math
  participant P17 as Transforms
  participant P18 as ML and Statistics
  P0->>P1: dispatches
  P0->>P2: dispatches
  P0->>P3: dispatches
  P4->>P5: uses shaders
  P6->>P7: uses
  P7->>P8: exports
  P7->>P9: exports
  P7->>P10: exports
  P7->>P11: exposes
  P7->>P12: exports
  P7->>P13: exports
  P7->>P14: exports
  P7->>P15: exports
  P7->>P16: exports
  P7->>P17: exports
  P7->>P18: exports
Steps as text
  1. CPU Dispatch to Parallel CPU dispatches
  2. CPU Dispatch to Sequential CPU dispatches
  3. CPU Dispatch to SIMD CPU dispatches
  4. GPU Pipelines to GPU Shaders uses shaders
  5. Application to Public API uses
  6. Public API to Matrices exports
  7. Public API to Vectors exports
  8. Public API to Matrix Storage exports
  9. Public API to Operators exposes
  10. Public API to Linear Solvers exports
  11. Public API to Decomposition exports
  12. Public API to Optimization exports
  13. Public API to Graph Algorithms exports
  14. Public API to 3D Math exports
  15. Public API to Transforms exports
  16. Public API to ML and Statistics exports
  17. Public API to Noise exposes

7.4. Public interface

Outside code can use everything listed here. The project also declares 429 public types.

UML Use cases
Use cases

Each actor is a kind of caller, linked to what it can ask the project to do. Rendered with uml-mcp.

PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
left to right direction
actor "HTTP client" as A_http
actor "CLI user" as A_cli
rectangle "Dimension" {
  usecase "GET/POST /rooms (3 routes)" as U0
  usecase "GET /health" as U1
  usecase "Run the tool (2 options)" as U2
}
A_http --> U0
A_http --> U1
A_cli --> U2
@enduml

HTTP routes 4

Mermaid Route map by prefix
flowchart LR
  api(["HTTP API"])
  g0["/rooms"]
  api --> g0
  g0r0["GET /rooms"]
  g0 --> g0r0
  g0r1["POST /rooms"]
  g0 --> g0r1
  g0r2["POST /rooms/'room_id'/join"]
  g0 --> g0r2
  g1["/health"]
  api --> g1
  g1r0["GET /health"]
  g1 --> g1r0

Routes marked ops expose health, status or admin endpoints; restrict them in production.

Command line 2

Entry points

7.5. Private interface

These names are internal by the language’s conventions: a leading underscore, private, static or pub(crate).

module-private function
1358
crate-visible function
20

7.6. Services

Service 3

  • Enginenew_sdl3, new_wasm, enable_ui and 56 more
  • GpuRendererdevice, queue, last_gpu_time_ms and 9 more
  • TickSchedulerschedule, schedule_after, poll and 1 more

7.7. Entities and data model 247

Mermaid Entity class diagram
classDiagram
  direction LR
  class E0["DualQuat4f"] {
    +f32 real_w
    +f32 real_x
    +f32 real_y
    +f32 real_z
    +f32 dual_w
    +f32 dual_x
  }
  class E1["PhysicsConfig"] {
    +f32 dt
    +u32 substeps
    +u32 solver_iterations
    +u32 stabilization_iterations
    +f32 sor_omega
    +f32 sleep_threshold
  }
  class E2["RigidBody"] {
    +x
    +v
    +f32 inv_mass
    +q
    +omega
    +inv_inertia
  }
  class E3["RigidContactConstraint"] {
    +usize body_a
    +usize body_b
    +r_a
    +r_b
    +normal
    +tangent1
  }
  class E4["Camera"] {
    +f32 width
    +f32 height
    +Projection projection
    +f32 near
    +f32 far
    +f32 orbit_yaw
  }
  class E5["GizmoDragState"] {
    +EntityId entity_id
    +GizmoAxis axis
    +GizmoMode mode
    +start_screen
    +start_world_pos
    +start_plane_hit
  }
  class E6["Material"] {
    +String name
    +ka
    +kd
    +ks
    +ke
    +f32 ns
  }
  class E7["SlicePlaneUniforms"] {
    +view_matrix
    +proj_matrix
    +object_matrix
    +f32 length_scale
    +f32 transparency
    +_pad
  }
  class E8["Theme"] {
    +Color panel_bg
    +Color panel_border
    +Color title_bar
    +Color button_bg
    +Color button_hover
    +Color button_pressed
  }
  class E9["Framebuffer"] {
    +Texture texture
    +TextureView view
    +Texture depth_texture
    +TextureView depth_view
    +u32 width
    +u32 height
  }

An arrow links a field to the entity its type names.

EntityKindFirst fields
DualQuat4fRecord or interfacereal_w, real_x, real_y, real_z, dual_w, dual_x, dual_y, dual_z
PhysicsConfigRecord or interfacedt, substeps, solver_iterations, stabilization_iterations, sor_omega, sleep_threshold, gravity, contact_friction
RigidBodyRecord or interfacex, v, inv_mass, q, omega, inv_inertia, shape, phase
RigidContactConstraintRecord or interfacebody_a, body_b, r_a, r_b, normal, tangent1, tangent2, depth
CameraRecord or interfacewidth, height, projection, near, far, orbit_yaw, orbit_pitch, orbit_distance
GizmoDragStateRecord or interfaceentity_id, axis, mode, start_screen, start_world_pos, start_plane_hit, axis_direction, start_rotation
MaterialRecord or interfacename, ka, kd, ks, ke, ns, ni, illum
SlicePlaneUniformsRecord or interfaceview_matrix, proj_matrix, object_matrix, length_scale, transparency, _pad, color, _pad2
Show 6 more entities
ThemeRecord or interfacepanel_bg, panel_border, title_bar, button_bg, button_hover, button_pressed, slider_track, slider_thumb
FramebufferRecord or interfacetexture, view, depth_texture, depth_view, width, height, format
SliderRecord or interfaceid, rect, value, target_value, velocity, state, dragging
SparseMatrixBCRSRecord or interfaceblock_vals, block_col_indices, row_pointers, rows, cols, block_rows, block_cols
TsneOptionsRecord or interfacen_components, perplexity, max_iters, seed, init_pca, early_exaggeration, momentum
PositionalConstraintRecord or interfacebody_a, body_b, r_a, r_b, compliance, lambda_accum

7.8. Business logic

Once UI code and the services and entities above are set aside, these classes have the most methods.

World Core source, 19 methods
spawn, get, get_mut, set_transform, set_primitive, set_color
Graph Domain and business rules, 19 methods
from_adjacency_list, from_grid_2d, from_grid_2d_with_weights, from_grid_2d_edge_weights, add_edge, add_undirected_edge
WasmMatrix32 Core source, 20 methods
from_inner, clone_inner, identity4, rotation, from_array, rows
WasmGraph Core source, 18 methods
from_edges, from_grid_2d, from_grid_2d_edge_weights, add_edge, add_edge_undirected, run_dijkstra
PhysicsState Domain and business rules, 7 methods
with_particles, num_particles, num_rigid_bodies, num_soft_bodies, add_rigid_body, add_soft_body
WasmMatrix Core source, 17 methods
from_array, identity, rows, cols, get, set
Quat4f Domain and business rules, 12 methods
identity, from_euler_angles, from_rotation_matrix3, to_euler_angles, from_axis_angle, to_scaled_axis
Particle Domain and business rules, 5 methods
kinematic, with_phase, with_radius, is_kinematic, default
SoftBody Domain and business rules, 5 methods
from_youngs, with_phase, compliance_deviatoric, compliance_hydrostatic, global_index
AutoExecutor Core source, 14 methods
default, with_thresholds, use_gpu_matmul, use_gpu_dot, use_gpu_matvec, use_gpu_elementwise

7.9. Database and persistence

7.10. External integrations

HTTP clients

fetch reqwest

Hosts named in the code

7.11. Stack and dependencies

Rust collision/Cargo.toml 3 runtime, 1 dev

Rust edition 2021

Open the manifest

Node.js e2e/package.json 1 dev

Open the manifest

Rust geometry/Cargo.toml 7 runtime, 1 dev

Rust edition 2021

Open the manifest

Rust kinematics/Cargo.toml 3 runtime

Rust edition 2024

Open the manifest

Rust mathlib/Cargo.toml 12 runtime, 4 dev

Rust edition 2024

Open the manifest

Rust network/Cargo.toml 18 runtime, 5 dev

Rust edition 2021

Open the manifest

Rust neural/Cargo.toml 5 runtime

Rust edition 2021

Open the manifest

Rust parse/Cargo.toml 13 runtime, 1 dev

Rust edition 2021

Open the manifest

Rust physics/Cargo.toml 8 runtime, 2 dev

Rust edition 2024

Open the manifest

Rust render/Cargo.toml 10 runtime, 2 dev

Rust edition 2021

Open the manifest

External dependencies

50 declared packages (41 runtime, 9 development) in collision/Cargo.toml, e2e/package.json, geometry/Cargo.toml, kinematics/Cargo.toml, mathlib/Cargo.toml, network/Cargo.toml, neural/Cargo.toml, parse/Cargo.toml, physics/Cargo.toml, render/Cargo.toml.

Package table 50
External dependencies
PackageVersionScopePurposeRegistry
mathlib—runtimeA math library for Rustcrates.io
wide0.7runtimeA crate to help you go wide.crates.io
par-core2.0runtimeSwitchable parallel execution corecrates.io
criterion0.5developmentStatistics-driven micro-benchmarking librarycrates.io
@playwright/test^1.49.0developmentTestingnpmjs.com
collision—runtimeA collision extension to cgmathcrates.io
par-iter2.0runtimeFork of rayon, with chili supportcrates.io
wasm-bindgen0.2runtimeEasy support for interacting between JS and Rust.crates.io
wgpu28runtimeCross-platform, safe, pure-rust graphics APIcrates.io
parse—runtimeBasic parsing from str/bytes. Conversion back to bytes.crates.io
tracing0.1runtimeApplication-level tracing for Rust.crates.io
serde1runtimeSerializationcrates.io
wasm-bindgen-shared0.2runtimeShared support between wasm-bindgen and wasm-bindgen cli, an internal dependency.crates.io
js-sys0.3runtimeBindings for all JS global objects and functions in all JS environments like Node.js and browsers, built on #[wasm_bindgen] using the `wascrates.io
rand0.10runtimeRandom number generators and other randomness functionality.crates.io
wasm-bindgen-futures0.4runtimeBridging the gap between Rust Futures and JavaScript Promisescrates.io
futures0.3runtimeAn implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces.crates.io
image0.25developmentImaging library. Provides basic image processing and encoders/decoders for common image formats.crates.io
serde_json1developmentSerializationcrates.io
tracing-subscriber0.3developmentUtilities for implementing and composing tracing subscribers.crates.io
render—runtimeA safe and simple template engine with the ergonomics of JSXcrates.io
kinematics—runtime—crates.io
prost0.14runtimeA Protocol Buffers implementation for the Rust Language.crates.io
prost-types0.14runtimeProst definitions of Protocol Buffers well known types.crates.io
tonic0.14runtimeA gRPC over HTTP/2 implementation focused on high performance, interoperability, and flexibility.crates.io
tonic-prost0.14runtimeProst codec implementation for toniccrates.io
axum0.8runtimeWeb frameworkcrates.io
futures-util0.3runtimeCommon utilities and extension traits for the futures-rs library.crates.io
tokio1runtimeAn event-driven, non-blocking I/O platform for writing asynchronous I/O backed applications.crates.io
tokio-tungstenite0.28runtimeTokio binding for Tungstenite, the Lightweight stream-based WebSocket implementationcrates.io
tower0.5runtimeTower is a library of modular and reusable components for building robust clients and servers.crates.io
tower-http0.6runtimeTower middleware and utilities for HTTP clients and serverscrates.io
tokio-test0.4developmentTestingcrates.io
tokio-stream0.1developmentUtilities to work with Stream and tokio.crates.io
ort2.0.0-rc.11runtimeA safe Rust wrapper for ONNX Runtime 1.31 - Optimize and accelerate machine learning inference & trainingcrates.io
fastembed5runtimeLibrary for generating vector embeddings, reranking locally.crates.io
pdf-extract0.10runtimeA library to extract content from pdfscrates.io
quick-xml0.36runtimeHigh performance xml reader and writercrates.io
gltf1runtimeglTF 2.0 loadercrates.io
ply-rs0.1runtimeLibrary for reading/writing ascii and binary PLY files.crates.io
minipng0.1runtimeTiny PNG decoder with no dependenciescrates.io
jpeg-decoder0.3runtimeJPEG decodercrates.io
zip2runtimeLibrary to support the reading and writing of zip files.crates.io
tar0.4runtimeA Rust implementation of a TAR file reader and writer. This library does not currently handle compression, but it is abstract over all I/O rcrates.io
bincode1runtimeA binary serialization / deserialization strategy for transforming structs into bytes and vice versa!crates.io
wgpu_text28runtimeA simple 2D text renderer for wgpu.crates.io
ab_glyph0.2runtimeAPI for loading, scaling, positioning and rasterizing OpenType font glyphs.crates.io
bytemuck1runtimeA crate for mucking around with piles of bytes.crates.io
naga28developmentShader translator and validator. Part of the wgpu projectcrates.io
wasm-bindgen-cli0.2developmentCommand line interface of the #[wasm_bindgen] attribute and project. For more information see https://github.com/wasm-bindgen/wasm-bindgencrates.io

7.12. CI/CD pipeline

2 GitHub Actions workflows, 10 jobs. Each box is a job; double-bordered boxes publish or deploy, and arrows follow needs.

Mermaid Pipeline flow
flowchart LR
  subgraph wf0["CI"]
    direction LR
    wf0_ci["ci<br/>ubuntu-latest"]
    wf0_test_parse["test-parse<br/>ubuntu-latest"]
    wf0_test_features["test-features<br/>ubuntu-latest"]
    wf0_test_gpu["test-gpu<br/>ubuntu-latest"]
    wf0_typos["typos<br/>ubuntu-latest"]
    wf0_security["security<br/>ubuntu-latest"]
    wf0_coverage[["coverage<br/>ubuntu-latest"]]
    wf0_wasm["wasm<br/>ubuntu-latest"]
  end
  subgraph wf1["GitHub Pages"]
    direction LR
    wf1_build_and_deploy[["build-and-deploy<br/>ubuntu-latest"]]
  end
  t0(["push · pull request"])
  t1(["push"])
  d0[("GitHub Pages")]
  t0 --> wf0_ci
  t0 --> wf0_test_parse
  t0 --> wf0_test_features
  t0 --> wf0_test_gpu
  t0 --> wf0_typos
  t0 --> wf0_security
  t0 --> wf0_coverage
  t0 --> wf0_wasm
  t1 --> wf1_build_and_deploy
  wf1_build_and_deploy -.-> d0
Workflows, triggers, jobs and targets
WorkflowTriggersJobsPublishes to
CI
.github/workflows/ci.yml
push, pull request
  • ci ubuntu-latest
    actions/checkout · Rust setup · Check format · Clippy (mathlib) · Test (mathlib) · Doc test (mathlib)
  • test-parse ubuntu-latest
    actions/checkout · Rust setup · Test parse (all formats)
  • test-features ubuntu-latest
    actions/checkout · Rust setup · Test with parallel feature · Test with full feature
  • test-gpu ubuntu-latest
    actions/checkout · Rust setup · Test GPU · Build GPU examples
  • typos ubuntu-latest
    actions/checkout · crate-ci/typos
  • security ubuntu-latest
    actions/checkout · Rust setup · Install cargo-audit · Generate lockfile for audit · Audit dependencies
  • coverage ubuntu-latest
    actions/checkout · Rust setup · Install tarpaulin · Run coverage · Upload coverage artifact · Upload to Codecov
  • wasm ubuntu-latest
    actions/checkout · Rust setup · Check WASM build (default features) · Check WASM build (wasm feature)
  • wasm-gpu ubuntu-latest
    actions/checkout · Rust setup · Install wasm-pack · Build WASM with GPU
—
GitHub Pages
.github/workflows/pages.yml
push
  • build-and-deploy ubuntu-latest
    actions/checkout · Rust setup · Cache cargo-installed tools · Install Pages tools · Prepare Pages artifact · Setup Pages
GitHub Pages

7.13. Deployment

Mermaid Deployment diagram
flowchart LR
  repo[("GitHub repository")]
  ci[["GitHub Actions<br/>2 workflows"]]
  image["Docker image<br/>FROM rust:1-bookworm"]
  pub_GitHub_Pages[("GitHub Pages")]
  repo -->|"push or pull request"| ci
  ci -->|"docker build"| image
  ci -->|"publishes"| pub_GitHub_Pages
UML Deployment
Deployment

The outer node is where the code runs. Each base image points to what it builds, solid arrows lead to databases and dashed ones to outside services. Rendered with uml-mcp.

PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
node "Docker image" as H {
  artifact "Dimension" as APP
}
artifact "FROM rust:1-bookworm" as IMG0
IMG0 ..> APP : builds
artifact "FROM nginx:alpine" as IMG1
IMG1 ..> APP : builds
cloud "WebSocket" as E0
APP ..> E0
cloud "Hugging Face" as E1
APP ..> E1
@enduml

Where it runs

Published to

Docker base images

rust:1-bookworm nginx:alpine

7.14. Monitoring

What the code logs, measures and exposes to tell whether it is working.

Health and metrics routes

GET /health

7.15. Security

Supply chain

Environment variables 3

The page lists names without their values and underlines the ones that look like secrets.

CARGO_CFG_FEATURES CARGO_CFG_TARGET_ARCH MATHLIB_GPU_SIZE

7.16. Testing

Test files
141
Source files
525
Test cases, about
927
Unit tests
135
End-to-end tests
4
Integration tests
2

Code coverage

No measured coverage report in the analyzed sources.

Where the tests are

mathlib/tests/wasm 15 parse/tests 14 mathlib/tests/cg 10 mathlib/tests/graph 10 mathlib/tests/linear 10 mathlib/tests/optimisation/argmin 8

Continuous integration

CI
clippy, cargo test
UML CI pipeline
CI pipeline

The main GitHub Actions workflow runs these steps. Jobs that run in parallel sit side by side. Rendered with uml-mcp.

PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
title CI
start
fork
  partition "ci" {
    :actions/checkout;
    :Rust setup;
    :Check format;
    :Clippy (mathlib);
    :Test (mathlib);
    :Doc test (mathlib);
    :Build examples (mathlib);
  }
fork again
  partition "test-parse" {
    :actions/checkout;
    :Rust setup;
    :Test parse (all formats);
  }
fork again
  partition "test-features" {
    :actions/checkout;
    :Rust setup;
    :Test with parallel feature;
    :Test with full feature;
  }
fork again
  partition "test-gpu" {
    :actions/checkout;
    :Rust setup;
    :Test GPU;
    :Build GPU examples;
  }
fork again
  partition "typos" {
    :actions/checkout;
    :crate-ci/typos;
  }
end fork
stop
@enduml

8. Types and file structure

430 declared types, with 12 in the base-relationship overview.

Type diagram
classDiagram
direction TB
class t4a5cd93435e6["Aabb"] {
  <<struct>>
  new()
  corners()
  union()
  union_many()
}
class t00c318d02aea["Aabb2"] {
  <<struct>>
  new()
  from_center_half_extents()
  corners()
  intersects()
}
class tdf807751b6f7["BspNode"] {
  <<enum>>
}
class tc84a8c5a51f3["BspTree"] {
  <<struct>>
}
class t03c92090f7e7["BvhBuildStrategy"] {
  <<enum>>
}
class t8b7035050ae2["BvhNode"] {
  <<enum>>
}
class t4cf1ac3511d5["BvhTree"] {
  <<struct>>
}
class t2f72a336b45d["BvhRayIter"] {
  <<struct>>
}
class t0f551e8e9c62["BvhFrustumIter"] {
  <<struct>>
}
class tb5166a8a85e0["Capsule"] {
  <<struct>>
  new()
  aabb()
  ray_intersect()
}
class t39e7bad6e68e["Circle"] {
  <<struct>>
  new()
  aabb()
  contains_point()
  ray_intersect()
}
class ta681312b5c13["Frustum"] {
  <<struct>>
  from_view_proj()
  intersects_aabb()
}

Unresolved bases remain labelled; full signatures are not reconstructed.

9. Reference

660 / 660 eligible files read (800 in the tree); 0 oversized, 0 failed reads and 0 syntax diagnostics.

What the scan covers

Known dependency/build folders, credential files and binaries are excluded. The scan covers READMEs, recognized manifests and parser-supported source files.

Linguist statistics cover the whole repository and may include other languages.

11. Files to read 3

12. Glossary

Repository

The versioned source files, configuration, and history of a project.

README

The repository’s entry document, usually covering its purpose and initial setup.

Dependency

A library, tool, or service that another component needs to build or run.

API

An interface through which software components exchange requests and results. An API does not have to use HTTP.

Container

An isolated process environment created from an image. Persistent data needs storage outside the container’s disposable filesystem.

Volume and bind mount

A volume is storage managed by the container platform; a bind mount exposes a chosen host path inside a container.

Published port

A host port mapped to a service’s container port. Publishing a port can expose that service beyond its container network.

CLI

A text interface in which commands and arguments select operations. Exit codes let scripts detect success or failure.

Build

The steps that turn source files and dependencies into a runnable program or distributable artifact.

GPU

A processor designed for parallel workloads, including graphics rendering and many numerical operations.

Shader

A program executed at a stage of a graphics or compute pipeline, for example to transform vertices or calculate pixel colors.

Mesh

A surface represented by vertices and connected elements, often triangles. Its geometry is distinct from its material or texture.

Continuous collision detection

A test for contact during the motion between two states, rather than only at the sampled endpoints.

Backend

An implementation behind a shared interface. Depending on context, it can mean a server-side service or a graphics, input, or storage implementation.

13. References

  1. antoinebou12. (2026, November 5). Dimension. [Software repository] github.com.
  2. antoinebou12. (2026, November 5). Dimension: README. [Repository documentation] github.com.
  3. antoinebou12. (2026, November 5). Cargo.toml. [Source file] github.com.
  4. antoinebou12. (2026, November 5). mathlib/src/lib.rs. [Source file] github.com.
  5. antoinebou12. (2026, November 5). render/src/lib.rs. [Source file] github.com.
  6. Boucher, A. (2026, October 23). Dimension: connecting Rust mathematics to a renderer. [Project article] antoineboucher.info.
  7. Boucher, A. (2026, April 13). Dimension (mathlib). [Project article] antoineboucher.info.
  8. Boucher, A. (2026, October 23). Dimension: From matrix storage to a rendered scene. [Project article] antoineboucher.info.

Sources without a publication date show the date they were last checked, November 5, 2026. File links retain the inspected revision where available.