* Split into demo and lib, working commonjs/umd demo * Start documentation about package building * Exclude some directories * Make tsconfig more generic * Add more documentation around web packaging * Enable all rendering backends * Enable demo and lib to build with parcel and webpack * Update CI * Add missing features * Use github token for setup-just * Fix deployment * Update documentation * Change command name * Move example usages into documentation * Clean packages * Add esbuild support * Clean dependencies * Add iife example which does not work yet * Update tsconfig * Allow to create a demo with CJS * Cleanup example * Fix GITHUB_TOKEN usage in CI * Update CI to use esbuild * Add files setting for publishing the package * Update name of lib * Update documentation * Patch esbuild package
Project State
This project is in a proof-of-concept state. The proof of concept is done except for text rendering. The Rust ecosystem is suited very well for this project.
In the future, this project could be adopted and supported by Maplibre to implement a next-gen mapping solution.
Description
maplibre-rs is a portable and performant vector maps renderer. We aim to support web, mobile and desktop applications. This is achieved by the novel WebGPU specification. Plenty of native implementations are already implementing this specification. On the web, it is implemented by Firefox, Chrome and Safari. There are also standalone implementations that directly use Vulkan, OpenGL or Metal as a backend. Those backends allow maplibre-rs to run on mobile and desktop applications.
Rust is used as a Lingua-franka on all platforms. This is made possible by WebAssembly, which allows us to use Rust for web development.
The goal of maplibre-rs is to render maps to visualize data. Right now the goal of maplibre-rs is not to replace existing vector map renderers like Google Maps, Apple Maps or MapLibre. The current implementation serves as a proof-of-concept of the used technology stack. It is unclear whether the high-performance requirements of rendering maps using vector graphics are achievable using the current stack.
Talk: World in Vectors
https://user-images.githubusercontent.com/905221/163552617-5db04c66-23e3-4915-87c1-25185d96730a.mp4
(YouTube)
Current Features
- Runs on Linux, Android, iOS, macOS, Firefox and Chrome
- Render a vector tile dataset
- Simple navigation powered by winit
- Multithreaded on all platforms
- Querying feature data
Missing Features
- Rendering Text
- Per-Feature Rendering
- Rendering:
- Labels
- Symbols
- Raster data
- 3D terrain
- Hill-shade (DEM)
- Collision detection
- Support for:
- GeoJSON
- API for:
- TypeScript
- Swift
- Java/Kotlin
Building & Running
Now, to clone the project:
git clone --recursive git@github.com:maplibre/maplibre-rs
and then build it for running on a desktop:
cargo build
After that, you can run it on your desktop:
cargo run -p maplibre-demo
More information about building for different platforms can be found here.
Note for Mac: Before opening the XCode project, you need to build manually using the following command:
cargo build --target aarch64-apple-darwin --libAfter that, open the XCode project and run it. (XCode seems to set some environment variables which cause problems with the build directly within XCode)
Rust Setup
Install rustup because this is the recommended way of setting up Rust toolchains.
The toolchain will be automatically downloaded when building this project. See ./rust-toolchain.toml for more details about the toolchain.
Documentation
This generates the documentation for this crate and opens the browser. This also includes the documentation of every dependency.
cargo doc --open
You can also view the up-to-date documentation here.