Repository navigation
feat(demo): interactive WebAssembly demo - #49
Merged
Merged
Conversation
demo/: embind wrapper over geo-utils-cpp, seven interactive panels (distance & bearing, offset, geofence, polyline encode/decode p5/p6, simplify, snap-to-route, area), a native reference + Node cross-check, and a Pages workflow. Not built or verified against WASM yet (needs Emscripten).
…s string compare Verified: WASM (emsdk 6.0.11) matches the native reference on all 19 values, and a Playwright smoke test exercised all seven panels plus mobile layout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
demo/: the library compiled to WebAssembly (embind) with a Leaflet page — distance & bearing, offset, geofence, polyline encode/decode (p5/p6), simplify, snap-to-route, area. Client-side only; Leaflet is vendored, the only external request is OSM tiles.demo/demo_api.hppis a thin layer over<geo/geo.hpp>;bindings.cppforwards to it. The library itself is untouched.demo/test/native_ref.cpp+verify.mjscross-check the WASM build against a native build of the same layer (19 values match)..github/workflows/demo.ymlbuilds, verifies and deploysdemo/webto GitHub Pages onmaster(PRs build and verify only).Verified locally with emsdk 6.0.11:
geo.wasmis 50 KB (27 KB gzipped); a Playwright smoke test exercised all panels and the mobile layout. The workflow has not run in Actions yet.