Update README.md

This commit is contained in:
Maximilian Ammann 2021-12-21 17:08:56 +01:00
parent f605960e43
commit 83bea5663b
5 changed files with 105 additions and 38 deletions

View File

@ -17,6 +17,10 @@
alt="Stability" />
<a href="https://github.com/maxammann/mapr/actions/workflows/rust.yml">
<img src="https://github.com/maxammann/mapr/actions/workflows/rust.yml/badge.svg"
alt="Build status" />
</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>
@ -29,36 +33,53 @@
<span> | </span>
<a href="https://maxammann.github.io/mapr">
Documentation
</a> | </span>
<a href="https://matrix.to/#/#mapr:matrix.org">
Chat in Matrix Space
</a>
</h3>
</div>
## 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/).
* Runs on:
* Web via WebAssembly and WebGPU,
* Linux (Xorg/Wayland) via Vulkan,
* Android via OpenGL,
* iOS via Metal.
* Web via WebAssembly and WebGPU,
* Linux (Xorg/Wayland) via Vulkan,
* Android via OpenGL,
* iOS via Metal.
* Supports the [TileJSON](https://docs.mapbox.com/help/glossary/tilejson/) standard
* Pimarily
## Non-Goals
### Non-Goals
* Rendering any kind of rasterized data
## Building
## Building & Running
Now, to clone the project:
@ -72,41 +93,21 @@ and then build it for running on a desktop:
cargo build
```
### Target: WebGPU
```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:
After that you can run it on your desktop:
```bash
cargo run --bin mapr --
```
## Testing
```bash
cargo test
```
More information about building for different platforms can be
found [here](https://maxammann.org/mapr-docs/building.html).
## 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

View File

@ -3,12 +3,15 @@
[Introduction](./introduction.md)
[Supported Platforms](./supported-platforms.md)
[Architecture](./architecture.md)
[Building](./building.md)
## Developer Log
- [Developer Log](./log00-logs.md)
- [Log 01 - WebGPU Stencil](./log01-stencil.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

61
docs/src/building.md Normal file
View 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
```

View File

@ -0,0 +1 @@
# Chapter 1

View File

@ -7,6 +7,7 @@
"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",
"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-production-build": "npm run production-build -- --env webgl"
},