RUSTWITHNERCO
v0.1.0 wasm 40.7 KB

System Architecture

A single Rust Cargo workspace uniting an async Axum and Askama server with a zero-dependency WebAssembly 3D mesh, normal, and stress-energy kernel rendered under a procedural studio lighting rig and selective HDR bloom.

Release
v0.1.0
WASM Kernel
40.7 KB
Mesh Topology
8,385 v / 16,384 tris
Requests Served
86

Zero-Copy Kernel

Deforming 16,384 triangles, smooth normals, and strain energy inside linear memory.

crates/wasm-sim compiles directly to wasm32-unknown-unknown as a zero-dependency cdylib. A cyclic 128 × 64 parametric manifold morphs smoothly across four 3D forms while updating contiguous positions, normals, and per-vertex energies buffers read straight into Three.js GLSL.

crates/wasm-sim positions: Vec<f32> normals: Vec<f32> energies: Vec<f32> WebAssembly.Memory mesh_positions_ptr() mesh_energies_ptr() Zero copy · shared buffer Three.js WebGL2 Float32Array views GLSL Brushed PBR HDR Bloom + X-Ray Fig. 1 — Contiguous f32 vertex, normal, and stress buffers shared zero-copy from Rust WASM to WebGL2.
// Bound once after mesh_init() — zero allocations in the render loop
const pos = new Float32Array(memory.buffer, mesh_positions_ptr(), verts * 3);
const nrm = new Float32Array(memory.buffer, mesh_normals_ptr(),   verts * 3);
const nrg = new Float32Array(memory.buffer, mesh_energies_ptr(),  verts);

mesh_step(dt, scrollMorph);
geometry.attributes.position.needsUpdate = true;
geometry.attributes.normal.needsUpdate   = true;
geometry.attributes.aEnergy.needsUpdate  = true;

Axum & Askama

Compile-time checked templates, Brotli/Gzip compression, and shared state.

crates/server serves Askama SSR HTML with live Brotli/Gzip response compression, streams the release .wasm binary with explicit application/wasm headers, and persists active sculpture settings inside Arc<RwLock<ActiveConfig>>.

Method Route Role
GET / Scroll-choreographed 3D WebGL metallurgy studio
GET /architecture System specification and live Axum API inspector
GET /api/health Uptime, request count, mesh resolution, and WASM size
GET /api/presets Surface material finishes and active server configuration
POST /api/config Validate, clamp, and persist sculpture material & physics
GET /wasm/rustwithnerco_wasm.wasm Compiled Rust WebAssembly 3D mesh & stress kernel

Surface Finishes

Authored GLSL micro-grain shaders calibrated for the procedural HDR rig.

Forged Obsidian
Anisotropic volcanic chrome with molten copper stress veins speed 1x · turbulence 0.95 · anisotropic clearcoat
Molten Oxide
Micro-brushed forged copper with live incandescent fracture glow speed 1.1x · turbulence 1.15 · anisotropic clearcoat
Liquid Mercury
Mirror-grade alloy reflecting studio softboxes with prismatic edges speed 0.9x · turbulence 0.8 · anisotropic clearcoat
WASM Topology
Exposed 16,384-triangle lattice deformed live in Rust linear memory speed 1x · turbulence 1 · exposed lattice

Live API Inspector

Query or mutate the running localhost Axum instance directly.

Return to Studio
// Select an endpoint above to inspect live JSON from Axum.