An open API service indexing awesome lists of open source software.

https://github.com/shashlikmap/shashlik-map

A WIP map engine written in Rust using WGPU
https://github.com/shashlikmap/shashlik-map

map map-engine maps rendering-engine rust text-rendering uniffi-rs wgpu

Last synced: 5 months ago
JSON representation

A WIP map engine written in Rust using WGPU

Awesome Lists containing this project

README

          

# Shashlik Map
A WIP map engine written in Rust using WGPU.

The initial goal of the project is to learn a new cross-platform tech stack to build a mobile-ready MapEngine
with focus on Navigation features(including DeadReckoning and Map-matching)

## Showcases
Running on macOS, Android and iOS

Screenshot 2025-12-24 at 11 21 52
Screenshot_20251224-112013
Simulator Screenshot - iPhone 16 Pro - 2025-12-24 at 11 46 18

## Tech stack
The stack leverages the following approaches and libraries:
- Map vector graphics renderer written in Rust using [WGPU](https://github.com/gfx-rs/wgpu) as a low-level cross-platform graphics API and
with [RustyBuzz](https://github.com/harfbuzz/rustybuzz) support as a vector font shaper for TextRenderer.
- Uses custom tiles, a simple tiles generator and a tile server, [separate repo](https://github.com/ShashlikMap/shashlik-tiles-gen-v0). The server is running in free AWS EC2 Cloud.
- Kotlin/Compose Multiplatfom, [uniffi-rs](https://github.com/mozilla/uniffi-rs) and [gobley](https://github.com/gobley/gobley) projects enable fast and seamless integration
with Android/iOS mobile apps(Android is priority for now)
- [Rust Valhalla client](https://github.com/jelmer/valhalla-client-rs) is used a routing clieng/engine

### The important component diagram:
ShashlikDiagram

## Roadmap
### Now
- [x] Create a baseline POC with initial architecture
- [x] Complete README and examples
### Next
- [ ] Implement an initial geometric Map-matching POC
- [ ] General Renderer refactoring
- - [ ] Support a texture as a render target to improve CI and integration with [SlintUI](https://slint.dev/blog/slint-1.12-released)
- [ ] CI for KMP mobile SDK
### Later
- [ ] Software Dead-reckoning
- [ ] Move TextRenderer to the separate repo
- [ ] Support Mapbox [tilesets](https://docs.mapbox.com/data/tilesets/guides/vector-tiles-standards/)
- [ ] Complete iOS counter-part
- [ ] Integrate a simple search

## Running examples
### macOS
In root folder:
```
cargo run --package winit-run --release
```
### Android
- Make sure the latest Xcode is installed!
- Open "kmp" folder in AndroidStudio and just Run "demo" app or execute:
```
./gradlew :composeApp:installRelease && adb shell am start -n "com.shashlik.demo/com.shashlik.demo.MainActivity"
```
### iOS
Open "kmp/iosApp" project in XCode and just Run it

## Integration with KMP apps
1. Add dependency to the version catalog

```
[versions]
shashlikMap = "0.2.1"

[libraries]
shashlikmap = { module = "io.github.shashlikmap:mapshared", version.ref = "shashlikMap" }
```
In build.gradle.kts(KMP or Android):
```
implementation(libs.shashlikmap)
```
2. Include Composable function `ShashlikMap { _, _ -> }` anywhere in your Compose UI
```kotlin
@Composable
fun App() {
MaterialTheme {
ShashlikMap { _, _ -> }
}
}
```
- Note: Android app will ask for locations permissions.

## Known issues
- Tileset on the Web Service is generated only for Japan(Kanto region) and USA(Bay Area)
- Android app might not work on Android Emulator with hardware GPU acceleration. Try to change GPU mode to `Software` one.
- Debug build performance is significantly lower than Release build.