mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Update README.md
This commit is contained in:
parent
f605960e43
commit
83bea5663b
69
README.md
69
README.md
@ -19,6 +19,10 @@
|
|||||||
<img src="https://github.com/maxammann/mapr/actions/workflows/rust.yml/badge.svg"
|
<img src="https://github.com/maxammann/mapr/actions/workflows/rust.yml/badge.svg"
|
||||||
alt="Build status" />
|
alt="Build status" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://matrix.to/#/#mapr:matrix.org">
|
||||||
|
<img src="https://img.shields.io/static/v1?label=Space&message=%23mapr&color=blue&logo=matrix"
|
||||||
|
alt="Build status" />
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
@ -29,21 +33,39 @@
|
|||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://maxammann.github.io/mapr">
|
<a href="https://maxammann.github.io/mapr">
|
||||||
Documentation
|
Documentation
|
||||||
|
</a> | </span>
|
||||||
|
<a href="https://matrix.to/#/#mapr:matrix.org">
|
||||||
|
Chat in Matrix Space
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
TODO
|
mapr is a portable and performant vector maps renderer. We aim to support the web, mobile and desktop applications. This
|
||||||
|
is achieved by the novel [WebGPU](https://www.w3.org/TR/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 which directly use Vulkan, OpenGL or Metal as a backend. Those backends allow mapr 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.
|
||||||
|
|
||||||
## Features
|
The goal of mapr is to render maps in order to visualize data. Right now the goal of mapr 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.
|
||||||
|
|
||||||
* None so far
|
## Current Features
|
||||||
|
|
||||||
## Goals
|
* [x] Render single vector tiles
|
||||||
|
* [x] Render multiple vector tiles
|
||||||
|
* [x] Runs on Linux, Android, iOS, MacOS, Firefox and Chrome
|
||||||
|
* [ ] Simple navigations by translating the camera
|
||||||
|
* [ ] Load and tessellate vector tiles on demand
|
||||||
|
* [ ] Navigation which "feels good"
|
||||||
|
|
||||||
|
### Goals
|
||||||
|
|
||||||
* Renders [vector tiles](https://docs.mapbox.com/vector-tiles/specification/).
|
* Renders [vector tiles](https://docs.mapbox.com/vector-tiles/specification/).
|
||||||
* Runs on:
|
* Runs on:
|
||||||
@ -52,13 +74,12 @@ TODO
|
|||||||
* Android via OpenGL,
|
* Android via OpenGL,
|
||||||
* iOS via Metal.
|
* iOS via Metal.
|
||||||
* Supports the [TileJSON](https://docs.mapbox.com/help/glossary/tilejson/) standard
|
* Supports the [TileJSON](https://docs.mapbox.com/help/glossary/tilejson/) standard
|
||||||
* Pimarily
|
|
||||||
|
|
||||||
## Non-Goals
|
### Non-Goals
|
||||||
|
|
||||||
* Rendering any kind of rasterized data
|
* Rendering any kind of rasterized data
|
||||||
|
|
||||||
## Building
|
## Building & Running
|
||||||
|
|
||||||
Now, to clone the project:
|
Now, to clone the project:
|
||||||
|
|
||||||
@ -72,41 +93,21 @@ and then build it for running on a desktop:
|
|||||||
cargo build
|
cargo build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Target: WebGPU
|
After that you can run it on your desktop:
|
||||||
|
|
||||||
```bash
|
|
||||||
tools/build-web
|
|
||||||
cd web
|
|
||||||
python3 -m http.server
|
|
||||||
```
|
|
||||||
|
|
||||||
### Target: WebGL
|
|
||||||
|
|
||||||
```bash
|
|
||||||
tools/build-web -g
|
|
||||||
cd web
|
|
||||||
python3 -m http.server
|
|
||||||
```
|
|
||||||
|
|
||||||
## Running on Linux
|
|
||||||
|
|
||||||
Fuzz using three clients:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cargo run --bin mapr --
|
cargo run --bin mapr --
|
||||||
```
|
```
|
||||||
|
|
||||||
## Testing
|
More information about building for different platforms can be
|
||||||
|
found [here](https://maxammann.org/mapr-docs/building.html).
|
||||||
```bash
|
|
||||||
cargo test
|
|
||||||
```
|
|
||||||
|
|
||||||
## Rust Setup
|
## Rust Setup
|
||||||
|
|
||||||
Install [rustup](https://rustup.rs/).
|
Install [rustup](https://rustup.rs/) 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](./rust-toolchain.toml) for more details about the toolchain.
|
The toolchain will be automatically downloaded when building this project.
|
||||||
|
See [./rust-toolchain.toml](./rust-toolchain.toml) for more details about the toolchain.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|||||||
@ -3,12 +3,15 @@
|
|||||||
[Introduction](./introduction.md)
|
[Introduction](./introduction.md)
|
||||||
[Supported Platforms](./supported-platforms.md)
|
[Supported Platforms](./supported-platforms.md)
|
||||||
[Architecture](./architecture.md)
|
[Architecture](./architecture.md)
|
||||||
|
[Building](./building.md)
|
||||||
|
|
||||||
## Developer Log
|
## Developer Log
|
||||||
|
|
||||||
- [Developer Log](./log00-logs.md)
|
- [Developer Log](./log00-logs.md)
|
||||||
- [Log 01 - WebGPU Stencil](./log01-stencil.md)
|
- [Log 01 - WebGPU Stencil](./log01-stencil.md)
|
||||||
- [Log 02 - WASM Shared Memory](./log02-wasm-shared-memory.md)
|
- [Log 02 - WASM Shared Memory](./log02-wasm-shared-memory.md)
|
||||||
|
- [Log 03 - WASM Bundle Size](./log03-wgpu-wasm-size.md)
|
||||||
|
- [Log 04 - Compiling for Apple](./log04-winit-apple.md)
|
||||||
|
|
||||||
## Appendix
|
## Appendix
|
||||||
|
|
||||||
|
|||||||
61
docs/src/building.md
Normal file
61
docs/src/building.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Building on various Platforms
|
||||||
|
|
||||||
|
## Desktop (Linux)
|
||||||
|
|
||||||
|
The setup normal desktop is very simple. You just have to run the following:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo run --bin mapr --
|
||||||
|
```
|
||||||
|
|
||||||
|
## Android
|
||||||
|
|
||||||
|
First you have to install cargo-apk:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo install cargo-apk
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, you should make sure that a recent Android NDK is installed. You will need to set the `ANDROID_NDK_ROOT` variable
|
||||||
|
to something like this:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export ANDROID_NDK_ROOT=$HOME/android-sdk/ndk/23.1.7779620/
|
||||||
|
```
|
||||||
|
|
||||||
|
After that you can run the app on a connected device using:
|
||||||
|
|
||||||
|
``bash
|
||||||
|
cargo apk run --lib
|
||||||
|
``
|
||||||
|
|
||||||
|
## iOS
|
||||||
|
|
||||||
|
In order to run this app on iOS you have to open the Xcode project at `./apple/mapr/mapr.xcodeproj`.
|
||||||
|
You can then run the app on an iOS Simulator or a real device. During the Xcode build process cargo is used to build
|
||||||
|
a static library for the required architecture.
|
||||||
|
|
||||||
|
## Desktop (macOS)
|
||||||
|
|
||||||
|
In order to run this app on macOS you have to open the Xcode project at `./apple/mapr/mapr.xcodeproj`.
|
||||||
|
You can then run the app on a macOS. During the Xcode build process cargo is used to build
|
||||||
|
a static library for the required architecture.
|
||||||
|
|
||||||
|
*Hint: Right now only arm64/aarch64 devices are supported*
|
||||||
|
|
||||||
|
## Web (WebGL, WebGPU)
|
||||||
|
|
||||||
|
If you have a browser which already supports a recent version of the WebGPU specification then you can start a
|
||||||
|
development server using the following commands.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd web
|
||||||
|
npm run start
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to run mapr with WebGL which is supported on every major browser, then you have to use the following
|
||||||
|
command.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run webgl-start
|
||||||
|
```
|
||||||
1
docs/src/log04-winit-apple.md
Normal file
1
docs/src/log04-winit-apple.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Chapter 1
|
||||||
@ -7,6 +7,7 @@
|
|||||||
"start": "RUSTUP_TOOLCHAIN=nightly-2021-12-07-x86_64-unknown-linux-gnu webpack-dev-server --mode=development",
|
"start": "RUSTUP_TOOLCHAIN=nightly-2021-12-07-x86_64-unknown-linux-gnu webpack-dev-server --mode=development",
|
||||||
"build": "RUSTUP_TOOLCHAIN=nightly-2021-12-07-x86_64-unknown-linux-gnu webpack --mode=development",
|
"build": "RUSTUP_TOOLCHAIN=nightly-2021-12-07-x86_64-unknown-linux-gnu webpack --mode=development",
|
||||||
"production-build": "RUSTUP_TOOLCHAIN=nightly-2021-12-07-x86_64-unknown-linux-gnu webpack --mode=production",
|
"production-build": "RUSTUP_TOOLCHAIN=nightly-2021-12-07-x86_64-unknown-linux-gnu webpack --mode=production",
|
||||||
|
"webgl-start": "npm run start -- --env webgl",
|
||||||
"webgl-build": "npm run build -- --env webgl",
|
"webgl-build": "npm run build -- --env webgl",
|
||||||
"webgl-production-build": "npm run production-build -- --env webgl"
|
"webgl-production-build": "npm run production-build -- --env webgl"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user