maplibre-rs weekly

May 13, 2022

Categories: Maplibre-rs
Authors: Max Ammann

maplibre-rs is an upcoming and cross-platform vector map renderer written in Rust. If you want to get in touch with the developers visit the #maplibre:matrix.org chat or join the MapLibre (#maplibre and #maplibre-rs) community within the OpenStreetMap Slack. You can get an invite here.

๐Ÿ“ฐ News

If you havenโ€™t read the initial news then check it out here. In the past week we continued to work on our collaboration with the University of Applied Sciences and Arts (HES-SO/HEIG-VD), Switzerland. The main focus of the past week was on documentation and redesigning the renderer and the structure of the maplibre-rs library.

In the past week, I extracted the render from Bevy. After some discussions on Github, Slack and Matrix we concluded that writing a renderer specific to maps is the best option. In general, specialized renderers can be optimized better. By implementing a renderer ourselves, we also stay independent of other projects. For example, Bevy is a render engine (renderer + a lot more) for games. That means that features which are important for bevy are most likely not important for maplibre-rs and vice versa. For example, the Bevy renderer does not support a stencil.

Because Iโ€™m quite unexperienced in the world of 3D graphics, I dediced to base the renderer on some existing one. The best renderers in the Rust world are currently Bevy and rend3. After evaluating both renderers I decided to go with the Bevy one, because rend3 had usages of `unsafe. Both renderers are based around the idea of a render graph.

๐Ÿ  Housekeeping

The following will summarizes what happened last week on GitHub.

๐ŸŽ New Features

  • #99 Postponed: Experimentally render to an Android surface
    Experiment which renders to an Android Surface instead of the whole screen.
  • #93 Add Render Graph from Bevy , #94 Experiment: Render Graph from rend3
    Experiment with a new render engine. This will probably define the architecture of maplibre.
  • #77 Postponed: Use only non-send futures
    Iโ€™m not sure whether Futures should be Send or not.
  • #80 Refactor WebWorker pool
    Restructure and optimize WebWorker pool.
  • #70 Experimentally add a headless mode
    Experiment with a headless mode.
  • #85 Contributors README.md
  • #86 Move winit code to maplibre-winit
    Extract winit dependency from main crate.

๐Ÿ”ง Fixes

  • #97 Initial start of removing unwrap from a Result type
    Remove .unwrap() from code.
  • #88 Postponed: Inspect WASM size
    Optimze WASM size.
  • #81 Update license and code of conduct

๐Ÿ“„ Documentation

  • #84 Write the Microsoft Windows build documentation
  • #87 Improve the Cargo documentation

๐Ÿงต Current Discussions

  • #18 Looking forward Whatโ€™s up in the mapping community?
  • #32 Should the map be controlled from rust or from higher level languages? Input handling of maplibre-rs.
  • #49 Introduce yourself! Who are you?

Some architectural discussions:

  • #75 Usage of bevy game engine
  • #60 Requirement of cross-origin isolated
  • #83 Potential memory allocation issues on WASM

๐Ÿ‘‹ New Contributors

  • @iakev: For resolving .unwrap()s in the code
  • neimsaci - For adding contributors to the README