{"id":15650179,"url":"https://github.com/yukinarit/mapbox-gl-rs","last_synced_at":"2025-04-14T03:12:42.575Z","repository":{"id":65343298,"uuid":"563124924","full_name":"yukinarit/mapbox-gl-rs","owner":"yukinarit","description":"Unofficial Rust/WASM binding for mapbox-gl-js","archived":false,"fork":false,"pushed_at":"2025-02-26T13:50:04.000Z","size":3169,"stargazers_count":46,"open_issues_count":15,"forks_count":15,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-14T03:12:34.350Z","etag":null,"topics":["map","mapbox","mapbox-gl","mapbox-gl-js","rust","vector-tiles","wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yukinarit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-08T00:35:09.000Z","updated_at":"2025-04-05T14:20:15.000Z","dependencies_parsed_at":"2023-01-30T11:16:23.936Z","dependency_job_id":"1c998297-9411-4c36-87d2-aa6ec3194ce4","html_url":"https://github.com/yukinarit/mapbox-gl-rs","commit_stats":{"total_commits":28,"total_committers":5,"mean_commits":5.6,"dds":0.3571428571428571,"last_synced_commit":"b816001784e85ad8ec781b8f2f237a4ef90e2e24"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukinarit%2Fmapbox-gl-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukinarit%2Fmapbox-gl-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukinarit%2Fmapbox-gl-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yukinarit%2Fmapbox-gl-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yukinarit","download_url":"https://codeload.github.com/yukinarit/mapbox-gl-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813799,"owners_count":21165634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["map","mapbox","mapbox-gl","mapbox-gl-js","rust","vector-tiles","wasm"],"created_at":"2024-10-03T12:33:47.686Z","updated_at":"2025-04-14T03:12:42.550Z","avatar_url":"https://github.com/yukinarit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003emapbox-gl-rs\u003c/h1\u003e\n\u003cp align=\"center\"\u003eUnofficial Rust binding for \u003ca href=\"https://github.com/mapbox/mapbox-gl-js\"\u003emapbox-gl-js\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://crates.io/crates/mapboxgl\"\u003e\n    \u003cimg alt=\"Crates.io\" src=\"https://img.shields.io/crates/v/mapboxgl.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://docs.rs/mapboxgl\"\u003e\n    \u003cimg alt=\"Docs.rs\" src=\"https://img.shields.io/badge/docs.rs-mapboxgl-blue\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/yukinarit/mapbox-gl-rs/actions/workflows/test.yml\"\u003e\n    \u003cimg alt=\"GithubActions\" src=\"https://github.com/yukinarit/mapbox-gl-rs/actions/workflows/test.yml/badge.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/yukinarit/mapbox-gl-rs/main/logo.svg\" style=\"width:80px\"/\u003e\u003c/p\u003e\n\n## What's this?\n\n[mapbox-gl-js](https://github.com/mapbox/mapbox-gl-js) is an open source library for rendering a beautiful vector-based maps in web browser, built with Mapbox and OSS community. The goal of this project is to create a rust binding for `mapbox-gl-js` via [WebAssembly](https://webassembly.org/) so that Rustacean can build webapps with beautiful Mapbox maps only in Rust.\n\n**NOTE:** `mapbox-gl-rs` is in super-duper infant stage. Most of the features are WIP. Please bear with that if you're interested! Also, any contributions e.g. bug reports, feature requests, sending a patch are appreciated.\n\n## How does it work?\n\n[wasm-bindgen](https://rustwasm.github.io/wasm-bindgen/) provides a Rust library and tool to compile Rust code into WebAssembly, which allows Rust based application e.g. [egui](https://www.egui.rs/#demo) and [RustPython](https://rustpython.github.io/) to run on web browsers. Most of the people don't know that `wasm-bindgen` also allows to invoke JavaScript code from Rust. This project leverages this feature to provide a Rust binding for `mapbox-gl-js`.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/yukinarit/mapbox-gl-rs/main/how-it-works.svg\"/\u003e\u003c/p\u003e\n\n## Usage\n\nAdd `mapboxgl` to your Cargo.toml\n```toml\nmapboxgl = \"0.6\"\n```\n\nAdd the following CSS and JavaScript snippet in html, so that mapboxgl JavaScript module is loaded.\n```html\n\u003clink href='https://api.mapbox.com/mapbox-gl-js/v2.10.0/mapbox-gl.css' rel='stylesheet' /\u003e\n\u003cscript src=\"https://api.mapbox.com/mapbox-gl-js/v2.10.0/mapbox-gl.js\"\u003e\u003c/script\u003e\n```\n\nBuild and run your app. If you are a [Yew](https://github.com/yewstack/yew) user, the following command will build and start a web server automatically\n```bash\ntrunk serve\n```\n\n## Supported features\n\n* Map\n    * [x] [Options](https://docs.mapbox.com/mapbox-gl-js/api/properties/)\n\t* [ ] [Interaction handlers](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-interaction-handlers)\n\t* [ ] [Controls](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-interaction-handler://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-controls)\n\t* [ ] [Map constraints](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-map-constraints)\n\t* [ ] [Point conversion](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-point-conversion)\n\t* [ ] [Working with events](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-working-with-events)\n\t* [ ] [Sources](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-sources)\n\t* [x] [Images](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-images)\n\t* [x] [Layers](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-layers)\n\t* [ ] [Style properties](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-style-properties)\n\t* [ ] [Feature state](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-feature-state)\n\t* [ ] [Lifecycle](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-lifecycle)\n\t* [ ] [Debug features](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-debug-features)\n\t* [ ] [Camera](https://docs.mapbox.com/mapbox-gl-js/api/map/#instance-members-camera)\n* Events\n    * [x] [Interactions](https://docs.mapbox.com/mapbox-gl-js/api/map/#events-interaction)\n    * [x] [Movement](https://docs.mapbox.com/mapbox-gl-js/api/map/#events-movement)\n    * [x] [Lifecycle](https://docs.mapbox.com/mapbox-gl-js/api/map/#events-lifecycle)\n    * [x] [Data loading](https://docs.mapbox.com/mapbox-gl-js/api/map/#events-data-loading)\n* Markers and controls\n    * [x] [Marker](https://docs.mapbox.com/mapbox-gl-js/api/markers/#marker)\n    * [ ] [AttributionControl](https://docs.mapbox.com/mapbox-gl-js/api/markers/#attributioncontrol)\n    * [ ] [FullscreenControl](https://docs.mapbox.com/mapbox-gl-js/api/markers/#fullscreencontrol)\n    * [ ] [GeolocateControl](https://docs.mapbox.com/mapbox-gl-js/api/markers/#geolocatecontrol)\n    * [ ] [NavigationControl](https://docs.mapbox.com/mapbox-gl-js/api/markers/#navigationcontrol)\n    * [x] [Popup](https://docs.mapbox.com/mapbox-gl-js/api/markers/#popup)\n    * [ ] [ScaleControl](https://docs.mapbox.com/mapbox-gl-js/api/markers/#scalecontrol)\n* Geography and Geometry\n    * [x] [LngLat](https://docs.mapbox.com/mapbox-gl-js/api/geography/#lnglat)\n    * [x] [LngLatBounds](https://docs.mapbox.com/mapbox-gl-js/api/geography/#lnglatbounds)\n    * [ ] [LngLatBoundsLike](https://docs.mapbox.com/mapbox-gl-js/api/geography/#lnglatboundslike)\n    * [ ] [LngLatLike](https://docs.mapbox.com/mapbox-gl-js/api/geography/#lnglatlike)\n    * [ ] [MercatorCoordinate](https://docs.mapbox.com/mapbox-gl-js/api/geography/#mercatorcoordinate)\n    * [ ] [Point](https://docs.mapbox.com/mapbox-gl-js/api/geography/#point)\n    * [ ] [PointLike](https://docs.mapbox.com/mapbox-gl-js/api/geography/#pointlike)\n* User interaction handlers\n    * [x] [BoxZoomHandler](https://docs.mapbox.com/mapbox-gl-js/api/handlers/#boxzoomhandler)\n    * [ ] [DoubleClickZoomHandler](https://docs.mapbox.com/mapbox-gl-js/api/handlers/#doubleclickzoomhandler)\n    * [ ] [DragPanHandler](https://docs.mapbox.com/mapbox-gl-js/api/handlers/#dragpanhandler)\n    * [ ] [DragRotateHandler](https://docs.mapbox.com/mapbox-gl-js/api/handlers/#dragrotatehandler)\n    * [ ] [KeyboardHandler](https://docs.mapbox.com/mapbox-gl-js/api/handlers/#keyboardhandler)\n    * [ ] [ScrollZoomHandler](https://docs.mapbox.com/mapbox-gl-js/api/handlers/#scrollzoomhandler)\n    * [ ] [TouchPitchHandler](https://docs.mapbox.com/mapbox-gl-js/api/handlers/#touchpitchhandler)\n    * [ ] [TouchZoomRotateHandler](https://docs.mapbox.com/mapbox-gl-js/api/handlers/#touchzoomrotatehandler)\n* Sources\n    * [ ] [CanvasSource](https://docs.mapbox.com/mapbox-gl-js/api/sources/#canvassource)\n    * [ ] [CanvasSourceOptions](https://docs.mapbox.com/mapbox-gl-js/api/sources/#canvassourceoptions)\n    * [x] [GeoJsonSource](https://docs.mapbox.com/mapbox-gl-js/api/sources/#geojsonsource)\n    * [ ] [ImageSource](https://docs.mapbox.com/mapbox-gl-js/api/sources/#imagesource)\n    * [ ] [VectorTileSource](https://docs.mapbox.com/mapbox-gl-js/api/sources/#vectortilesource)\n    * [ ] [VideoSource](https://docs.mapbox.com/mapbox-gl-js/api/sources/#videosource)\n* Events and event types\n    * [x] [MapBoxZoomEvent](https://docs.mapbox.com/mapbox-gl-js/api/events/#mapboxzoomevent)\n    * [x] [MapDataEvent](https://docs.mapbox.com/mapbox-gl-js/api/events/#mapdataevent)\n    * [x] [MapMouseEvent](https://docs.mapbox.com/mapbox-gl-js/api/events/#mapmouseevent)\n    * [x] [MapTouchEvent](https://docs.mapbox.com/mapbox-gl-js/api/events/#maptouchevent)\n    * [x] [MapWheelEvent](https://docs.mapbox.com/mapbox-gl-js/api/events/#mapwheelevent)\n\n## Examples\n\n[![](https://raw.githubusercontent.com/yukinarit/mapbox-gl-rs/main/set-data.gif)](https://github.com/yukinarit/mapbox-gl-rs/tree/main/examples/set-data)\n\n[![](https://raw.githubusercontent.com/yukinarit/mapbox-gl-rs/main/popup.gif)](https://github.com/yukinarit/mapbox-gl-rs/tree/main/examples/popup)\n\n* [simple](https://github.com/yukinarit/mapbox-gl-rs/tree/main/examples/simple): Hello world\n* [on-load](https://github.com/yukinarit/mapbox-gl-rs/tree/main/examples/on-load): Catch the event when the map is loaded\n* [popup](https://github.com/yukinarit/mapbox-gl-rs/tree/main/examples/popup): Show popup control\n* [geojson-source](https://github.com/yukinarit/mapbox-gl-rs/tree/main/examples/geojson-source): Load GeoJSON source and show lines\n* [set-data](https://github.com/yukinarit/mapbox-gl-rs/tree/main/examples/set-data): Update paths in realtime using set-data\n* [add-image](https://github.com/yukinarit/mapbox-gl-rs/tree/main/examples/add-image): Display image on a map\n\n## License\n\nThis project is licensed under the [MIT license](https://github.com/yukinarit/mapbox-gl-rs/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukinarit%2Fmapbox-gl-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukinarit%2Fmapbox-gl-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukinarit%2Fmapbox-gl-rs/lists"}