wgpu-layers icon indicating copy to clipboard operation
wgpu-layers copied to clipboard

Currently only a playground for rust, wgpu, openlayers web mapping combo

Preview

image


WebGPU mapping renderer for OpenLayers
Currently only a playground for rust, wgpu, openlayers web mapping combo

Build the project

wasm-pack build --release --all-features --target web

Next goals

  • [x] Fill
    • [x] Initial support
  • [ ] Line
    • [x] Initial support
    • [x] Anti aliasing
    • [ ] Line joins
    • [ ] Line caps
  • [ ] Points
    • [x] Initial support
    • [ ] Shapes
  • [ ] Move polygon triangulation to worker threads
  • [ ] Architecture overhaul
    • [ ] Combine tiles in buckets with same material
    • [ ] Split code in smaller chunks
  • [ ] CI
    • [x] Initial
    • [ ] Deployment
    • [ ] Publishing
  • [ ] OpenLayers integration
    • [ ] Smooth frame sync

Run a native example

cargo run --example window --target `rustc -vV | sed -n 's|host: ||p'`

Run tests

Native unit tests

LIBGL_ALWAYS_SOFTWARE=true cargo test --target `rustc -vV | sed -n 's|host: ||p'` -- --nocapture

WASM Browser Integration tests

wasm-pack test --chrome --release --features console_log,console_error_panic_hook --test '*'

Useful environment variables

Name Example
WGPU_BACKEND gl
LIBGL_ALWAYS_SOFTWARE true
WINIT_UNIX_BACKEND x11
VK_ICD_FILENAMES /usr/share/vulkan/icd.d/lvp_icd.x86_64.json