Urban-Analytics-Technology-Platform / web-app-template

https://urban-analytics-technology-platform.github.io/web-app-template/
3 stars 0 forks source link

Rust backends #4

Closed dabreegster closed 4 months ago

dabreegster commented 8 months ago

Part of #3. In particular, approaches I've done so far:

1) Are on the main thread, not web workers. I think there was some problem with vite I couldn't get working. 2) Can't use multiple threads via web workers, again due to a vite bug. I started poking at this in https://github.com/Urban-Analytics-Technology-Platform/od2net/tree/parallel_wasm 3) Have no proper TS API, usually just using raw strings and parsing JSON either end. https://github.com/ratchetdesigns/ts-bindgen or https://github.com/Aleph-Alpha/ts-rs might be useful?

Depending how opinionated this template is with the questions someone picks, if a project is scraping info from OSM, I started https://github.com/a-b-street/osm-reader as an easy API to handle osm.xml or pbf. An end-to-end demo could be something like scraping roads or buildings from OSM (example https://github.com/dabreegster/ltn/blob/main/backend/src/scrape.rs), storing as a custom struct, then having GeoJSON output methods.