Skip to content

feat: [wasm-geotiff-viewer-poc] PoC wasm, in-browser app#63

Draft
JustCreature wants to merge 1 commit into
mainfrom
wasm-geotiff-viewer-poc
Draft

feat: [wasm-geotiff-viewer-poc] PoC wasm, in-browser app#63
JustCreature wants to merge 1 commit into
mainfrom
wasm-geotiff-viewer-poc

Conversation

@JustCreature

@JustCreature JustCreature commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Proof-of-concept WebAssembly build that runs the terrain renderer in the browser (viewer-only): pick a single GeoTIFF and it raymarches on WebGPU.

What's here

  • New standalone web/ crate (excluded from the workspace; own nightly + build-std toolchain) that reuses render_gpu / dem_io / terrain unchanged.
  • WebGPU compute raymarcher, SharedArrayBuffer threading via wasm-bindgen-rayon (GeoTIFF parse + normals run on a worker), native <input type=file> + File-API load, WASD/drag fly camera.
  • Built with Trunk; cross-origin isolation via a vendored coi-serviceworker so it works on GitHub Pages.

Minimal changes to existing code

  • render_gpu: GpuContext::new_async() (the wasm main thread can't block on pollster) + WebGPU-default limits on wasm.
  • dem_io: parse_geotiff_auto_reader<R: Read + Seek> to parse in-memory (browser) bytes.
  • Root Cargo.toml: exclude = ["web"] so native builds/CI never compile it.

Scope / limits

Viewer-only — no launcher, tier streaming, or HUD. Large tiles are center-cropped to stay under WebGPU's 128 MB storage-binding limit; rendering is on-demand to avoid pinning weak GPUs. web/README.md documents the build/deploy steps and the hard-won wasm-threading link flags.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.13043% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/render_gpu/src/context.rs 85.71% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@JustCreature
JustCreature force-pushed the wasm-geotiff-viewer-poc branch from 561a5ed to 8b7525e Compare June 19, 2026 08:46
@JustCreature
JustCreature marked this pull request as draft June 19, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant