Create a proper web package (#43)

* 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
This commit is contained in:
Max Ammann 2022-04-26 19:56:23 +02:00 committed by GitHub
commit e93d7e049a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 7858 additions and 10710 deletions

View File

@ -1,10 +1,17 @@
name: macOS
description: Build for macOS
inputs:
GITHUB_TOKEN:
required: true
description: On macos runners we often hit API limits. Using this token avoid this.
runs:
using: "composite"
steps:
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
- name: Install toolchain
shell: bash
run: just default-toolchain

View File

@ -9,9 +9,12 @@ runs:
shell: bash
run: just nightly-toolchain
- uses: Swatinem/rust-cache@v1
- name: Build
- name: Build lib
shell: bash
run: just webpack-webgl-production
run: just web-lib esbuild-webgl
- name: Build demo
shell: bash
run: just web-demo build
- name: Check
shell: bash
run: just check web wasm32-unknown-unknown

View File

@ -9,9 +9,12 @@ runs:
shell: bash
run: just nightly-toolchain
- uses: Swatinem/rust-cache@v1
- name: Build
- name: Build lib
shell: bash
run: just webpack-production
run: just web-lib esbuild
- name: Build demo
shell: bash
run: just web-demo build
- name: Check
shell: bash
run: just check web wasm32-unknown-unknown

View File

@ -34,7 +34,7 @@ jobs:
- uses: ./.github/actions/webgpu
- uses: ./.github/actions/deploy
with:
source: web/web/dist/linux-demo/.
source: web/demo/dist/.
destination: webgpu
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
build-deploy-webgl:
@ -44,7 +44,7 @@ jobs:
- uses: ./.github/actions/webgl
- uses: ./.github/actions/deploy
with:
source: web/web/dist/linux-demo/.
source: web/demo/dist/.
destination: webgl
key: ${{ secrets.SSH_KEY_MAXAMMANN_ORG }}
build-deploy-docs:
@ -67,3 +67,5 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/apple
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -47,3 +47,5 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/apple
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

3
.idea/maplibre-rs.iml generated
View File

@ -17,6 +17,9 @@
<sourceFolder url="file://$MODULE_DIR$/maplibre-demo/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/web/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/docs/book" />
<excludeFolder url="file://$MODULE_DIR$/web/lib/.parcel-cache" />
<excludeFolder url="file://$MODULE_DIR$/maplibre-cache" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

File diff suppressed because one or more lines are too long

View File

@ -3,4 +3,7 @@ authors = ["Maximilian Ammann"]
language = "en"
multilingual = false
src = "src"
title = "maplibe-rs documentation"
title = "MapLibre Rust Documentation"
[output.html]
additional-css = ["diff.css"]

372
docs/diff.css Normal file
View File

@ -0,0 +1,372 @@
.d2h-d-none {
display: none
}
.d2h-wrapper {
text-align: left
}
.d2h-file-header {
background-color: #f7f7f7;
border-bottom: 1px solid #d8d8d8;
font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;
height: 35px;
padding: 5px 10px
}
.d2h-file-header, .d2h-file-stats {
display: -webkit-box;
display: -ms-flexbox;
display: flex
}
.d2h-file-stats {
font-size: 14px;
margin-left: auto
}
.d2h-lines-added {
border: 1px solid #b4e2b4;
border-radius: 5px 0 0 5px;
color: #399839;
padding: 2px;
text-align: right;
vertical-align: middle
}
.d2h-lines-deleted {
border: 1px solid #e9aeae;
border-radius: 0 5px 5px 0;
color: #c33;
margin-left: 1px;
padding: 2px;
text-align: left;
vertical-align: middle
}
.d2h-file-name-wrapper {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-size: 15px;
width: 100%
}
.d2h-file-name {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap
}
.d2h-file-wrapper {
border: 1px solid #ddd;
border-radius: 3px;
margin-bottom: 1em
}
.d2h-file-collapse {
-webkit-box-pack: end;
-ms-flex-pack: end;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
border: 1px solid #ddd;
border-radius: 3px;
cursor: pointer;
display: none;
font-size: 12px;
justify-content: flex-end;
padding: 4px 8px
}
.d2h-file-collapse.d2h-selected {
background-color: #c8e1ff
}
.d2h-file-collapse-input {
margin: 0 4px 0 0
}
.d2h-diff-table {
border-collapse: collapse;
font-family: Menlo, Consolas, monospace;
font-size: 13px;
width: 100%
}
.d2h-files-diff {
width: 100%
}
.d2h-file-diff {
overflow-y: hidden
}
.d2h-file-side-diff {
display: inline-block;
margin-bottom: -8px;
margin-right: -4px;
overflow-x: scroll;
overflow-y: hidden;
width: 50%
}
/*.d2h-code-line {
padding: 0 8em
}*/
.d2h-code-line, .d2h-code-side-line {
display: inline-block;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
white-space: nowrap;
width: 100%
}
.d2h-code-side-line {
padding: 0 4.5em
}
.d2h-code-line-ctn {
word-wrap: normal;
background: none;
display: inline-block;
padding: 0;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
vertical-align: middle;
white-space: pre;
width: 100%
}
.d2h-code-line del, .d2h-code-side-line del {
background-color: #ffb6ba
}
.d2h-code-line del, .d2h-code-line ins, .d2h-code-side-line del, .d2h-code-side-line ins {
border-radius: .2em;
display: inline-block;
margin-top: -1px;
text-decoration: none;
vertical-align: middle
}
.d2h-code-line ins, .d2h-code-side-line ins {
background-color: #97f295;
text-align: left
}
.d2h-code-line-prefix {
word-wrap: normal;
background: none;
display: inline;
padding: 0;
white-space: pre
}
.line-num1 {
float: left
}
.line-num1, .line-num2 {
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
padding: 0 .5em;
text-overflow: ellipsis;
width: 3.5em
}
.line-num2 {
float: right
}
.d2h-code-linenumber {
display: none !important;
}
/*.d2h-code-linenumber {
background-color: #fff;
border: solid #eee;
border-width: 0 1px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: rgba(0, 0, 0, .3);
cursor: pointer;
display: inline-block;
position: absolute;
text-align: right;
width: 7.5em
}*/
.d2h-code-linenumber:after {
content: "\200b"
}
.d2h-code-side-linenumber {
background-color: #fff;
border: solid #eee;
border-width: 0 1px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: rgba(0, 0, 0, .3);
cursor: pointer;
display: inline-block;
overflow: hidden;
padding: 0 .5em;
position: absolute;
text-align: right;
text-overflow: ellipsis;
width: 4em
}
.d2h-code-side-linenumber:after {
content: "\200b"
}
.d2h-code-side-emptyplaceholder, .d2h-emptyplaceholder {
background-color: #f1f1f1;
border-color: #e1e1e1
}
.d2h-code-line-prefix, .d2h-code-linenumber, .d2h-code-side-linenumber, .d2h-emptyplaceholder {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.d2h-code-linenumber, .d2h-code-side-linenumber {
direction: rtl
}
.d2h-del {
background-color: #fee8e9;
border-color: #e9aeae
}
.d2h-ins {
background-color: #dfd;
border-color: #b4e2b4
}
.d2h-info {
background-color: #f8fafd;
border-color: #d5e4f2;
color: rgba(0, 0, 0, .3)
}
.d2h-file-diff .d2h-del.d2h-change {
background-color: #fdf2d0
}
.d2h-file-diff .d2h-ins.d2h-change {
background-color: #ded
}
.d2h-file-list-wrapper {
margin-bottom: 10px
}
.d2h-file-list-wrapper a {
color: #3572b0;
text-decoration: none
}
.d2h-file-list-wrapper a:visited {
color: #3572b0
}
.d2h-file-list-header {
text-align: left
}
.d2h-file-list-title {
font-weight: 700
}
.d2h-file-list-line {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
text-align: left
}
.d2h-file-list {
display: block;
list-style: none;
margin: 0;
padding: 0
}
.d2h-file-list > li {
border-bottom: 1px solid #ddd;
margin: 0;
padding: 5px 10px
}
.d2h-file-list > li:last-child {
border-bottom: none
}
.d2h-file-switch {
cursor: pointer;
display: none;
font-size: 10px
}
.d2h-icon {
fill: currentColor;
margin-right: 10px;
vertical-align: middle
}
.d2h-deleted {
color: #c33
}
.d2h-added {
color: #399839
}
.d2h-changed {
color: #d0b44c
}
.d2h-moved {
color: #3572b0
}
.d2h-tag {
background-color: #fff;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-size: 10px;
margin-left: 5px;
padding: 0 2px
}
.d2h-deleted-tag {
border: 1px solid #c33
}
.d2h-added-tag {
border: 1px solid #399839
}
.d2h-changed-tag {
border: 1px solid #d0b44c
}
.d2h-moved-tag {
border: 1px solid #3572b0
}

View File

@ -19,7 +19,10 @@
- [Caching](./development-documents/caching.md)
- [Stencil Masking](./development-documents/stencil-masking.md)
- [Font Rendering](./development-documents/font-rendering.md)
- [Library Packaging](./development-documents/library-packaging.md)
- [Apple](./development-documents/library-packaging/apple.md)
- [Android](./development-documents/library-packaging/android.md)
- [Web](./development-documents/library-packaging/web.md)
- [Appendix](./appendix/index.md)
- [Link Collection](./appendix/link-collection.md)

View File

@ -1,3 +1,16 @@
# Design
![](./figures/domain-model.drawio.svg)
<script src="https://unpkg.com/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js" >
</script>
<embed style="border-style: solid; width: 100%" type="image/svg+xml" src="./figures/domain-model.drawio.svg" id="my-embed"/>
<script>
document.getElementById('my-embed').addEventListener('load', function(){
let pan = svgPanZoom(document.getElementById('my-embed'), {controlIconsEnabled: true});
pan.resize();
pan.pan();
pan.center();
})
</script>

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 425 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -0,0 +1 @@
# Library Packaging

View File

@ -0,0 +1,6 @@
# Android
## Gradle Project setup
## NativeActivity

View File

@ -0,0 +1,26 @@
# Apple
{{#include figures/diff-macOS-entitlements.html}}
## Library Entry
{{#include figures/diff-maplibre-swift.html}}
## Files & Assets
{{#include figures/diff-xcode-project-assets.html}}
## Framework
{{#include figures/diff-xcode-project-framework.html}}
## Cargo Build Phase
{{#include figures/diff-xcode-project-build-cargo.html}}
## Build Settings
{{#include figures/diff-xcode-project-build-settings.html}}
## Info Plist for Applications
{{#include figures/diff-xcode-project-info-plist.html}}

View File

@ -0,0 +1,171 @@
<div id="d2h-648583" class="d2h-file-wrapper" data-lang="entitlements">
<div class="d2h-file-header">
<span class="d2h-file-name-wrapper">
<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">
<path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>
</svg> <span class="d2h-file-name">xcode/macOS/macOS.entitlements</span>
<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span></span>
<label class="d2h-file-collapse">
<input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">
Viewed
</label>
</div>
<div class="d2h-file-diff">
<div class="d2h-code-wrapper">
<table class="d2h-diff-table">
<tbody class="d2h-diff-tbody">
<tr>
<td class="d2h-code-linenumber d2h-info"></td>
<td class="d2h-info">
<div class="d2h-code-line">@@ -0,0 +1,12 @@</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">1</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">2</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">3</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">&lt;plist version="1.0"&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">4</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">&lt;dict&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">5</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> &lt;key&gt;com.apple.security.app-sandbox&lt;/key&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">6</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> &lt;true/&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">7</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> &lt;key&gt;com.apple.security.files.user-selected.read-only&lt;/key&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">8</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> &lt;true/&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">9</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> &lt;key&gt;com.apple.security.network.client&lt;/key&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">10</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> &lt;true/&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">11</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">&lt;/dict&gt;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">12</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">&lt;/plist&gt;</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -0,0 +1,87 @@
<div id="d2h-374920" class="d2h-file-wrapper" data-lang="swift">
<div class="d2h-file-header">
<span class="d2h-file-name-wrapper">
<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">
<path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>
</svg> <span class="d2h-file-name">xcode/maplibre-rs/maplibre.swift</span>
<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span></span>
<label class="d2h-file-collapse">
<input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">
Viewed
</label>
</div>
<div class="d2h-file-diff">
<div class="d2h-code-wrapper">
<table class="d2h-diff-table">
<tbody class="d2h-diff-tbody">
<tr>
<td class="d2h-code-linenumber d2h-info"></td>
<td class="d2h-info">
<div class="d2h-code-line">@@ -0,0 +1,5 @@</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">1</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">public class MapLibre {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">2</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> public static func start() {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">3</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> maplibre_apple_main();</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">4</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> }</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">5</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">}</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -0,0 +1,519 @@
<div class="d2h-file-wrapper" data-lang="pbxproj">
<div class="d2h-file-header">
<span class="d2h-file-name-wrapper">
<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">
<path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>
</svg> <span class="d2h-file-name">{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj</span>
<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span></span>
<label class="d2h-file-collapse">
<input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">
Viewed
</label>
</div>
<div class="d2h-file-diff">
<div class="d2h-code-wrapper">
<table class="d2h-diff-table">
<tbody class="d2h-diff-tbody">
<tr>
<td class="d2h-code-linenumber d2h-info"></td>
<td class="d2h-info">
<div class="d2h-code-line">@@ -7,93 +7,110 @@</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">7</div>
<div class="line-num2">7</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> objects = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">8</div>
<div class="line-num2">8</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"><br></span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">9</div>
<div class="line-num2">9</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn">/* Begin PBXBuildFile section */</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">10</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452E828132EA6003BD2A5</del> /* maplibre_rs.h in Headers */ = {isa = PBXBuildFile; fileRef = <del>0BE452E728132EA6003BD2A5</del> /* maplibre_rs.h */; settings = {ATTRIBUTES = (Public, ); }; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">11</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452FC28132EB5003BD2A5</del> /* exampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = <del>0BE452ED28132EB5003BD2A5</del> /* exampleApp.swift */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">12</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452FD28132EB5003BD2A5</del> /* exampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = <del>0BE452ED28132EB5003BD2A5</del> /* exampleApp.swift */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">13</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452FE28132EB5003BD2A5</del> /* <del>ContentView</del>.<del>swift</del> in <del>Sources</del> */ = {isa = PBXBuildFile; fileRef = <del>0BE452EE28132EB5003BD2A5</del> /* <del>ContentView</del>.<del>swift</del> */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">14</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452FF28132EB5003BD2A5</del> /* <del>ContentView</del>.<del>swift</del> in <del>Sources</del> */ = {isa = PBXBuildFile; fileRef = <del>0BE452EE28132EB5003BD2A5</del> /* <del>ContentView</del>.<del>swift</del> */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">15</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE4530028132EB5003BD2A5</del> /* <del>Assets</del>.<del>xcassets</del> in <del>Resources</del> */ = {isa = PBXBuildFile; fileRef = <del>0BE452EF28132EB5003BD2A5</del> /* <del>Assets</del>.<del>xcassets</del> */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">16</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE4530128132EB5003BD2A5</del> /* <del>Assets</del>.<del>xcassets</del> in <del>Resources</del> */ = {isa = PBXBuildFile; fileRef = <del>0BE452EF28132EB5003BD2A5</del> /* <del>Assets</del>.<del>xcassets</del> */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">10</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D56F2812903700906D21</ins> /* maplibre_rs.h in Headers */ = {isa = PBXBuildFile; fileRef = <ins>0B85D56E2812903700906D21</ins> /* maplibre_rs.h */; settings = {ATTRIBUTES = (Public, ); }; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">11</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D586281290F800906D21</ins> /* exampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = <ins>0B85D577281290F800906D21</ins> /* exampleApp.swift */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">12</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D587281290F800906D21</ins> /* exampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = <ins>0B85D577281290F800906D21</ins> /* exampleApp.swift */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">13</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D58A281290F800906D21</ins> /* <ins>Assets</ins>.<ins>xcassets</ins> in <ins>Resources</ins> */ = {isa = PBXBuildFile; fileRef = <ins>0B85D579281290F800906D21</ins> /* <ins>Assets</ins>.<ins>xcassets</ins> */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">14</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D58B281290F800906D21</ins> /* <ins>Assets</ins>.<ins>xcassets</ins> in <ins>Resources</ins> */ = {isa = PBXBuildFile; fileRef = <ins>0B85D579281290F800906D21</ins> /* <ins>Assets</ins>.<ins>xcassets</ins> */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">15</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D5952812913700906D21</ins> /* <ins>maplibre</ins>.<ins>swift</ins> in <ins>Sources</ins> */ = {isa = PBXBuildFile; fileRef = <ins>0B85D5942812913700906D21</ins> /* <ins>maplibre</ins>.<ins>swift</ins> */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">16</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D596281291A400906D21</ins> /* <ins>maplibre_rs</ins>.<ins>framework</ins> in <ins>Frameworks</ins> */ = {isa = PBXBuildFile; fileRef = <ins>0B85D56B2812903700906D21</ins> /* <ins>maplibre_rs</ins>.<ins>framework</ins> */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">17</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> 0B85D599281291A700906D21 /* maplibre_rs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B85D56B2812903700906D21 /* maplibre_rs.framework */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">18</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> 0B85D5A42812991100906D21 /* libmaplibre_apple.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B85D5A32812987B00906D21 /* libmaplibre_apple.a */; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">17</div>
<div class="line-num2">19</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn">/* End PBXBuildFile section */</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">18</div>
<div class="line-num2">20</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"><br></span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">19</div>
<div class="line-num2">21</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn">/* Begin PBXFileReference section */</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">20</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452E428132EA6003BD2A5</del> /* maplibre_rs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = maplibre_rs.framework; sourceTree = BUILT_PRODUCTS_DIR; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">21</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452E728132EA6003BD2A5</del> /* maplibre_rs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = maplibre_rs.h; sourceTree = "&lt;group&gt;"; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">22</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452ED28132EB5003BD2A5</del> /* exampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = exampleApp.swift; sourceTree = "&lt;group&gt;"; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">23</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452EE28132EB5003BD2A5</del> /* <del>ContentView</del>.<del>swift</del> */ = {isa = PBXFileReference; lastKnownFileType = <del>sourcecode</del>.<del>swift</del>; path = <del>ContentView</del>.<del>swift</del>; sourceTree = "&lt;group&gt;"; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">24</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452EF28132EB5003BD2A5</del> /* <del>Assets</del>.<del>xcassets</del> */ = {isa = PBXFileReference; <del>lastKnownFileType</del> = <del>folder</del>.<del>assetcatalog</del>; path = <del>Assets</del>.<del>xcassets</del>; sourceTree = <del>"&lt;group&gt;"</del>; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">25</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452F428132EB5003BD2A5</del> /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">26</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452F928132EB5003BD2A5</del> /* <del>example</del>.<del>app</del> */ = {isa = PBXFileReference; <del>explicitFileType</del> = <del>wrapper</del>.<del>application</del>; <del>includeInIndex = 0; </del>path = <del>example</del>.<del>app</del>; sourceTree = <del>BUILT_PRODUCTS_DIR</del>; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">27</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452FB28132EB5003BD2A5</del> /* <del>macOS</del>.<del>entitlements</del> */ = {isa = PBXFileReference; lastKnownFileType = <del>text</del>.<del>plist.entitlements</del>; path = <del>macOS</del>.<del>entitlements</del>; sourceTree = "&lt;group&gt;"; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">22</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D56B2812903700906D21</ins> /* maplibre_rs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = maplibre_rs.framework; sourceTree = BUILT_PRODUCTS_DIR; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">23</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D56E2812903700906D21</ins> /* maplibre_rs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = maplibre_rs.h; sourceTree = "&lt;group&gt;"; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">24</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D577281290F800906D21</ins> /* exampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = exampleApp.swift; sourceTree = "&lt;group&gt;"; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">25</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D579281290F800906D21</ins> /* <ins>Assets</ins>.<ins>xcassets</ins> */ = {isa = PBXFileReference; lastKnownFileType = <ins>folder</ins>.<ins>assetcatalog</ins>; path = <ins>Assets</ins>.<ins>xcassets</ins>; sourceTree = "&lt;group&gt;"; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">26</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D57E281290F800906D21</ins> /* <ins>example</ins>.<ins>app</ins> */ = {isa = PBXFileReference; <ins>explicitFileType</ins> = <ins>wrapper</ins>.<ins>application</ins>; <ins>includeInIndex = 0; </ins>path = <ins>example</ins>.<ins>app</ins>; sourceTree = <ins>BUILT_PRODUCTS_DIR</ins>; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">27</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D583281290F800906D21</ins> /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">28</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D585281290F800906D21</ins> /* <ins>macOS</ins>.<ins>entitlements</ins> */ = {isa = PBXFileReference; <ins>lastKnownFileType</ins> = <ins>text</ins>.<ins>plist.entitlements</ins>; path = <ins>macOS</ins>.<ins>entitlements</ins>; sourceTree = <ins>"&lt;group&gt;"</ins>; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">29</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D5942812913700906D21</ins> /* <ins>maplibre</ins>.<ins>swift</ins> */ = {isa = PBXFileReference; lastKnownFileType = <ins>sourcecode</ins>.<ins>swift</ins>; path = <ins>maplibre</ins>.<ins>swift</ins>; sourceTree = "&lt;group&gt;"; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">30</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> 0B85D5A32812987B00906D21 /* libmaplibre_apple.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libmaplibre_apple.a; sourceTree = SOURCE_ROOT; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">31</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> 0BE452D62812EEA8003BD2A5 /* example--iOS--Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "example--iOS--Info.plist"; sourceTree = "&lt;group&gt;"; };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx d2h-info">
<div class="line-num1"></div>
<div class="line-num2">32</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn">/* End PBXFileReference section */</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -0,0 +1,514 @@
<div class="d2h-file-wrapper" data-lang="pbxproj">
<div class="d2h-file-header">
<span class="d2h-file-name-wrapper">
<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">
<path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>
</svg> <span class="d2h-file-name">{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj</span>
<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span></span>
<label class="d2h-file-collapse">
<input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">
Viewed
</label>
</div>
<div class="d2h-file-diff">
<div class="d2h-code-wrapper">
<table class="d2h-diff-table">
<tbody class="d2h-diff-tbody">
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">114</div>
<div class="line-num2">131</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn">/* Begin PBXNativeTarget section */</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">115</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452E328132EA6003BD2A5</del> /* maplibre-rs */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">132</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D56A2812903700906D21</ins> /* maplibre-rs */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">116</div>
<div class="line-num2">133</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> isa = PBXNativeTarget;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">117</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> buildConfigurationList = <del>0BE452E928132EA6003BD2A5</del> /* Build configuration list for PBXNativeTarget "maplibre-rs" */;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">134</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> buildConfigurationList = <ins>0B85D5702812903700906D21</ins> /* Build configuration list for PBXNativeTarget "maplibre-rs" */;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">118</div>
<div class="line-num2">135</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> buildPhases = (</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">119</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452DF28132EA6003BD2A5</del> /* Headers */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">120</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452E028132EA6003BD2A5</del> /* Sources */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">121</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452E128132EA6003BD2A5</del> /* Frameworks */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">122</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452E228132EA6003BD2A5</del> /* Resources */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">136</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D5662812903700906D21</ins> /* Headers */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">137</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D5672812903700906D21</ins> /* Sources */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">138</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D5682812903700906D21</ins> /* Frameworks */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">139</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D5692812903700906D21</ins> /* Resources */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">140</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> 0BE452D72812EFC1003BD2A5 /* Cargo Build */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">229</div>
<div class="line-num2">248</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> );</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">230</div>
<div class="line-num2">249</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> runOnlyForDeploymentPostprocessing = 0;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">231</div>
<div class="line-num2">250</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">232</div>
<div class="line-num2">251</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn">/* End PBXResourcesBuildPhase section */</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">233</div>
<div class="line-num2">252</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"><br></span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">253</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">/* Begin PBXShellScriptBuildPhase section */</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">254</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> 0BE452D72812EFC1003BD2A5 /* Cargo Build */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">255</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> isa = PBXShellScriptBuildPhase;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">256</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> buildActionMask = 2147483647;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">257</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> files = (</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">258</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> );</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">259</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> inputFileListPaths = (</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">260</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> );</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">261</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> inputPaths = (</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">262</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> );</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">263</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> name = "Cargo Build";</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">264</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> outputFileListPaths = (</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">265</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> );</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">266</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> outputPaths = (</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">267</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> );</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">268</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> runOnlyForDeploymentPostprocessing = 0;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">269</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> shellPath = /bin/bash;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">270</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> shellScript = ". \"$HOME/.cargo/env\"\n\narch=\"unknown\"\nvendor=\"apple\"\nos_type=\"unknown\"\nenvironment_type=\"\"\n\nmode=\"\"\n\necho \"ARCH: $ARCHS\"\n\nif [[ $CONFIGURATION == \"Release\" ]]\nthen\n mode=\"--release\"\nfi\n\nif [[ $ARCHS == \"x86_64\" ]]\nthen\n arch=\"x86_64\"\nelif [[ $ARCHS == \"arm64\" ]]\nthen\n arch=\"aarch64\"\nfi\n\nif [[ $SDK_NAME == *\"iphoneos\"* ]]\nthen\n os_type=\"ios\"\nelif [[ $SDK_NAME == *\"macos\"* ]]\nthen\n os_type=\"darwin\"\nelif [[ $SDK_NAME == *\"iphonesimulator\"* ]]\nthen\n os_type=\"ios\"\n environment_type=\"sim\"\nfi\n\n\ntriplet=\"$arch-$vendor-$os_type\"\n\nif [ -n \"$environment_type\" ]\nthen\n triplet=\"$triplet-$environment_type\"\nfi\n\necho \"$mode\"\necho \"$triplet\"\n\nenv -i zsh -c \"cargo build -p maplibre-apple $mode --target $triplet --lib\"\n\n";</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">271</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">272</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn">/* End PBXShellScriptBuildPhase section */</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -0,0 +1,381 @@
<div class="d2h-file-wrapper" data-lang="pbxproj">
<div class="d2h-file-header">
<span class="d2h-file-name-wrapper">
<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">
<path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>
</svg> <span class="d2h-file-name">{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj</span>
<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span></span>
<label class="d2h-file-collapse">
<input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">
Viewed
</label>
</div>
<div class="d2h-file-diff">
<div class="d2h-code-wrapper">
<table class="d2h-diff-table">
<tbody class="d2h-diff-tbody">
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">29</div>
<div class="line-num2">33</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"><br></span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">30</div>
<div class="line-num2">34</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn">/* Begin PBXFrameworksBuildPhase section */</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">31</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452E128132EA6003BD2A5</del> /* Frameworks */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">35</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D5682812903700906D21</ins> /* Frameworks */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">32</div>
<div class="line-num2">36</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> isa = PBXFrameworksBuildPhase;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">33</div>
<div class="line-num2">37</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> buildActionMask = 2147483647;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">34</div>
<div class="line-num2">38</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> files = (</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">39</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> 0B85D5A42812991100906D21 /* libmaplibre_apple.a in Frameworks */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">35</div>
<div class="line-num2">40</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> );</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">36</div>
<div class="line-num2">41</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> runOnlyForDeploymentPostprocessing = 0;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">37</div>
<div class="line-num2">42</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">38</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452F128132EB5003BD2A5</del> /* Frameworks */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">43</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D57B281290F800906D21</ins> /* Frameworks */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">39</div>
<div class="line-num2">44</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> isa = PBXFrameworksBuildPhase;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">40</div>
<div class="line-num2">45</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> buildActionMask = 2147483647;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">41</div>
<div class="line-num2">46</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> files = (</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">47</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> 0B85D596281291A400906D21 /* maplibre_rs.framework in Frameworks */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">42</div>
<div class="line-num2">48</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> );</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">43</div>
<div class="line-num2">49</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> runOnlyForDeploymentPostprocessing = 0;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">44</div>
<div class="line-num2">50</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">45</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE452F628132EB5003BD2A5</del> /* Frameworks */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">51</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D580281290F800906D21</ins> /* Frameworks */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">46</div>
<div class="line-num2">52</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> isa = PBXFrameworksBuildPhase;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">47</div>
<div class="line-num2">53</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> buildActionMask = 2147483647;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">48</div>
<div class="line-num2">54</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> files = (</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins">
<div class="line-num1"></div>
<div class="line-num2">55</div>
</td>
<td class="d2h-ins">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> 0B85D599281291A700906D21 /* maplibre_rs.framework in Frameworks */,</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">49</div>
<div class="line-num2">56</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> );</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">50</div>
<div class="line-num2">57</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> runOnlyForDeploymentPostprocessing = 0;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">51</div>
<div class="line-num2">58</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1"></div>
<div class="line-num2">59</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn">/* End PBXFrameworksBuildPhase section */</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -0,0 +1,393 @@
<div class="d2h-file-wrapper" data-lang="pbxproj">
<div class="d2h-file-header">
<span class="d2h-file-name-wrapper">
<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">
<path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>
</svg> <span class="d2h-file-name">{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj</span>
<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span></span>
<label class="d2h-file-collapse">
<input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">
Viewed
</label>
</div>
<div class="d2h-file-diff">
<div class="d2h-code-wrapper">
<table class="d2h-diff-table">
<tbody class="d2h-diff-tbody">
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">435</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE4530328132EB5003BD2A5</del> /* Debug */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">511</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D58D281290F800906D21</ins> /* Debug */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">436</div>
<div class="line-num2">512</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> isa = XCBuildConfiguration;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">437</div>
<div class="line-num2">513</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> buildSettings = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">438</div>
<div class="line-num2">514</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> ALWAYS_SEARCH_USER_PATHS = NO;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-info"></td>
<td class="d2h-info">
<div class="d2h-code-line">@@ -489,7 +565,7 @@</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">489</div>
<div class="line-num2">565</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> GCC_WARN_UNUSED_FUNCTION = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">490</div>
<div class="line-num2">566</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> GCC_WARN_UNUSED_VARIABLE = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">491</div>
<div class="line-num2">567</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> GENERATE_INFOPLIST_FILE = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">492</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>INFOPLIST_KEY_UIApplicationSceneManifest_Generation</del> = <del>YES</del>;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">568</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>INFOPLIST_FILE</ins> = <ins>"example--iOS--Info.plist"</ins>;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">493</div>
<div class="line-num2">569</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">494</div>
<div class="line-num2">570</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> INFOPLIST_KEY_UILaunchScreen_Generation = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">495</div>
<div class="line-num2">571</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-info"></td>
<td class="d2h-info">
<div class="d2h-code-line">@@ -514,7 +590,7 @@</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">514</div>
<div class="line-num2">590</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">515</div>
<div class="line-num2">591</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> name = Debug;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">516</div>
<div class="line-num2">592</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> };</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">517</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>0BE4530428132EB5003BD2A5</del> /* Release */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">593</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>0B85D58E281290F800906D21</ins> /* Release */ = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">518</div>
<div class="line-num2">594</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> isa = XCBuildConfiguration;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">519</div>
<div class="line-num2">595</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> buildSettings = {</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">520</div>
<div class="line-num2">596</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> ALWAYS_SEARCH_USER_PATHS = NO;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-info"></td>
<td class="d2h-info">
<div class="d2h-code-line">@@ -565,7 +641,7 @@</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">565</div>
<div class="line-num2">641</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> GCC_WARN_UNUSED_FUNCTION = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">566</div>
<div class="line-num2">642</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> GCC_WARN_UNUSED_VARIABLE = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">567</div>
<div class="line-num2">643</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> GENERATE_INFOPLIST_FILE = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-del d2h-change">
<div class="line-num1">568</div>
<div class="line-num2"></div>
</td>
<td class="d2h-del d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">-</span>
<span class="d2h-code-line-ctn"> <del>INFOPLIST_KEY_UIApplicationSceneManifest_Generation</del> = <del>YES</del>;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-ins d2h-change">
<div class="line-num1"></div>
<div class="line-num2">644</div>
</td>
<td class="d2h-ins d2h-change">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">+</span>
<span class="d2h-code-line-ctn"> <ins>INFOPLIST_FILE</ins> = <ins>"example--iOS--Info.plist"</ins>;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">569</div>
<div class="line-num2">645</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">570</div>
<div class="line-num2">646</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> INFOPLIST_KEY_UILaunchScreen_Generation = YES;</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-cntx">
<div class="line-num1">571</div>
<div class="line-num2">647</div>
</td>
<td class="d2h-cntx">
<div class="d2h-code-line">
<span class="d2h-code-line-prefix">&nbsp;</span>
<span class="d2h-code-line-ctn"> INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";</span>
</div>
</td>
</tr>
<tr>
<td class="d2h-code-linenumber d2h-info"></td>
<td class="d2h-info">
<div class="d2h-code-line">@@ -590,7 +666,7 @@</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -0,0 +1,272 @@
# Web
This document describes issues and challenges when packaging maplibre-rs as a npm package.
## Required Formats
### ESM
The ESM module format is the standard nowadays which should be followed. If a bundler like webpack encounters an ESM
module it can resolve WebAssembly files or WebWorkers dynamically.
The following syntax is used to resolve referenced WebWorkers:
```ts
new Worker(new URL("./pool.worker.ts", import.meta.url), {
type: 'module'
});
```
Similarly, the following works:
```ts
new URL('index_bg.wasm', import.meta.url);
```
### IIFE (immediately-invoked function expression)
> This format is used when including maplibre-rs in a `<script>` tag. The library is "written" onto the window/global
> object. This allows quick prototyping/playgrounds/experiments using maplibre-rs.
In order to support this we need to create a bundle which works on any modern browser. Additionally, a WASM file and
WebWorker needs to be deployed at a predictable path, because there is no bundler active which manages assets.
Both assets could be inlined theoretically. This is common for WebWorkers, but not for WASM files.
### UMD
> UMD modules are needed when creating a library which should run in Node as well as browsers. This is not a usecase
> for maplibre-rs. If we support node, then we probably would ship a separate package called "maplibre-rs-node" which
> bundles to CJS directly.
### CJS/CommonJS
> Not needed for the browser build of maplibre-rs, possibly needed when supporting Node
With a CommonJS module its is not possible for bundlers to dynamically resolve WebWorkers or WASM files. Users of these
libraries have
to specify where WASM or non-inlined WebWorkers are hosted.
The `import.meta.url` token can not exist in a CommonJS module. Therefore, bundlers which encounter a CommonJS module
have to use a different mechanism of resolving files.
* The Parcel bundler translates to `new URL('index_bg.wasm', import.meta.url);`
to `new URL("index_bg.wasm", "file:" + __filename);`
While depending on `file:` and `filename` works for NodeJS, it is unsupported in the browser
* Webpack translates `new URL('index_bg.wasm', import.meta.url);` to something that is equivalent to `'./index_bg.wasm'`
. It just expects that assets are resolvable from the current file.
## wasm-pack output
wasm-pack can output [multiple formats](https://rustwasm.github.io/docs/wasm-pack/commands/build.html#target). The `web`
and `bundler` outputs offer the most modular modules.
Unfortunately, the
function [wasm_bindgen::module()](https://docs.rs/wasm-bindgen/0.2.80/src/wasm_bindgen/lib.rs.html#1208-1217)
is only supported in `web` and `no-modules`. We currently are using this in order to send loaded instances
of `WebAssembly.Module` to WebWorkers. `nodejs` should not be used because MapLibre does not target Node.
Therefore, we should stick to the `web` output format.
## Required Features
* WASM Bundling
> Make the WASM binary available to users of the maplibre-rs library
* WebWorker Bundling
> Make the WebWorker available to users of the maplibre-rs library. This could also be achived by inlining.
* WebWorker Inlining
> Inline the WebWorker bundle in the library bundle as a string.
* Predictable paths for CJS
> TODO
## Bundler Feature Comparison
| Bundler | *ESM* | *IIFE* | CJS | UMD | *WebWorker Inlining* | Web Worker Bundling | *WASM Bundling* | *Predictable Paths* |
|---------------|-------|--------|-----|-----|----------------------|---------------------|-----------------|---------------------|
| Babel 1) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
| TypeScript 1) | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
| Webpack | ❌ 4) | ❓ | ❌ | ❓ | ❌ 2) | ✅ | ✅ | ❓ |
| Parcel | ✅ | ❌ | ✅ | ❌ | 🛠️ 3) | ✅ | ✅ | ❌ 5) |
| ESBuild | ✅ | ✅ | ✅ | ❌ | ✅ 6) | ❓ | ✅ 6) | ✅ |
| Rollup | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ |
Features in ***italic***s are required for maplibre-rs.
> 1) Technically not a bundler but can be used to emit ES modules
> 2) Was Supported in Webpack 4, but currently is not supported
> 3) https://github.com/parcel-bundler/parcel/issues/8004
> 4) As of the time of writing Webpack can not output ESM libraries
> 5) Plugins exist, but they don't work reliably
> 6) Plugins exist, and work reliably
### Babel & TypeScript
Babel and TypeScript both can produce ESM modules, but they **fail with transforming references within the source code**
like `new URL("./pool.worker.ts", import.meta.url)`. There exist some Babel plugins, but none of them is stable.
Therefore, we actually need a proper bundler which supports outputting ESM modules.
The only stable solution to this is Parcel. Parcel also has good documentation around the bundling of WebWorkers.
### WebPack
TODO
Example scripts:
```json
{
"scripts": {
"webpack": "webpack --mode=development",
"webpack-webgl": "npm run build -- --env webgl",
"webpack-production": "webpack --mode=production",
"webpack-webgl-production": "npm run production-build -- --env webgl"
}
}
```
Example config:
```js
const path = require("path");
const webpack = require("webpack");
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
let dist = path.join(__dirname, 'dist/maplibre-rs');
module.exports = (env) => ({
mode: "development",
entry: "./src/index.ts",
experiments: {
syncWebAssembly: true,
},
performance: {
maxEntrypointSize: 400000,
maxAssetSize: 400000000,
},
output: {
path: dist,
filename: "maplibre-rs.js",
library: {
name: 'maplibre_rs',
type: 'umd',
},
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader',
options: {
}
}
]
},
],
},
resolve: {
extensions: ['.ts', '.js'],
},
plugins: [
new webpack.DefinePlugin({
'process.env.WEBGL': !!env.webgl
}),
new WasmPackPlugin({
crateDirectory: path.resolve(__dirname, '../'),
// Check https://rustwasm.github.io/wasm-pack/book/commands/build.html for
// the available set of arguments.
//
// Optional space delimited arguments to appear before the wasm-pack
// command. Default arguments are `--verbose`.
//args: '--log-level warn',
// Default arguments are `--typescript --target browser --mode normal`.
extraArgs: ` --target web -- . -Z build-std=std,panic_abort ${env.webgl ? '--features web-webgl' : ''} ${env.tracing ? '--features enable-tracing' : ''}`,
// Optional array of absolute paths to directories, changes to which
// will trigger the build.
// watchDirectories: [
// path.resolve(__dirname, "another-crate/src")
// ],
// The same as the `--out-dir` option for `wasm-pack`
outDir: path.resolve(__dirname, 'src/wasm-pack'),
// The same as the `--out-name` option for `wasm-pack`
// outName: "index",
// If defined, `forceWatch` will force activate/deactivate watch mode for
// `.rs` files.
//
// The default (not set) aligns watch mode for `.rs` files to Webpack's
// watch mode.
// forceWatch: true,
// If defined, `forceMode` will force the compilation mode for `wasm-pack`
//
// Possible values are `development` and `production`.
//
// the mode `development` makes `wasm-pack` build in `debug` mode.
// the mode `production` makes `wasm-pack` build in `release` mode.
// forceMode: "production",
// Controls plugin output verbosity, either 'info' or 'error'.
// Defaults to 'info'.
// pluginLogLevel: 'info'
}),
]
});
```
### Parcel
TODO
Example scripts:
```json
{
"scripts": {
"parcel": "npm run clean && npm run wasm-pack && WEBGL=false parcel build --no-cache src/index.ts",
"parcel-webgl": "npm run clean && FEATURES=web-webgl npm run wasm-pack && WEBGL=true parcel build --no-cache src/index.ts"
}
}
```
Example config in `package.json:
```json
{
"module": "dist/parcel-esm/module.js",
"main": "dist/parcel-cjs/main.js",
"types": "dist/parcel/types.d.ts",
"targets": {
"main": {
"distDir": "./dist/parcel-cjs",
"context": "browser",
"outputFormat": "commonjs"
},
"module": {
"distDir": "./dist/parcel-esm",
"context": "browser",
"outputFormat": "esmodule"
}
},
"@parcel/transformer-js": {
"inlineFS": false,
"inlineEnvironment": [
"WEBGL"
]
}
}
```
### ESBuild
TODO
See config in `web/lib/build.mjs`.
### Rollup
Not yet evaluated

View File

@ -1,3 +1,5 @@
# Stencil Masking
The following diagram shows a method which has been used in the beginning of maplibre-rs. It is not used currently.
![](figures/stencil_buffer.drawio.svg)

View File

@ -1,13 +1,14 @@
# Debugging
* log crate
## GPU Debugging
* For WebGL there is SpectorJS is enabled by default right now. For debugging on a desktop environment you can use
[RenderDoc](https://renderdoc.org/).
## Frame Profiling
## CPU Profiling
## GPU Profiling
* For WebGL there is SpectorJS is enabled by default right now. For debugging on a desktop environment you can use
[RenderDoc](https://renderdoc.org/).
* tracing crate

View File

@ -34,20 +34,20 @@ WebGPU Status:
* [Chrome](https://chromestatus.com/feature/6213121689518080)
* [WebKit](https://webkit.org/status/#specification-webgpu)
| Platform | Linux & Android | Graphics API | Note |
|----------------|---------------------|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Linux X11 | :white_check_mark: | Vulkan | |
| Linux Wayland | :white_check_mark: | Vulkan | |
| Windows | :question_mark: | :question_mark: | |
| MacOS | :white_check_mark: | :question_mark: | |
| Android | :white_check_mark: | Vulkan/OpenGL ES/Angle | Not tested, but should work on all devices if [Angle](https://github.com/gfx-rs/wgpu/blob/master/README.md#supported-platforms) is used. [Vulkan](https://developer.android.com/about/dashboards) is not yet supported widely. |
| iOS | :white_check_mark: | Metal | Not tested. |
| Firefox | :white_check_mark: | WebGL/WebGPU | |
| Chrome | :white_check_mark: | WebGL/WebGPU | WebGPU is significantly faster because WASM output is smaller. |
| Safari | :hammer_and_wrench: | WebGL/WebGPU | Safari does not yet support [Shared Array Buffer](https://caniuse.com/sharedarraybuffer) |
| Mobile Firefox | :ok: | WebGL/WebGPU | |
| Mobile Chrome | :ok: | WebGL | [WebGPU](https://caniuse.com/webgpu) is not implemented. |
| Mobile Safari | :hammer_and_wrench: | WebGL | [WebGPU](https://caniuse.com/webgpu) is not implemented. Safari does not yet support [Shared Array Buffer](https://caniuse.com/sharedarraybuffer) |
| Platform | Linux & Android | Graphics API | Note |
|----------------|-----------------|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Linux X11 | | Vulkan | |
| Linux Wayland | | Vulkan | |
| Windows | ❓ | ❓ | |
| MacOS | ✅ | ❓ | |
| Android | | Vulkan/OpenGL ES/Angle | Not tested, but should work on all devices if [Angle](https://github.com/gfx-rs/wgpu/blob/master/README.md#supported-platforms) is used. [Vulkan](https://developer.android.com/about/dashboards) is not yet supported widely. |
| iOS | | Metal | Not tested. |
| Firefox | | WebGL/WebGPU | |
| Chrome | | WebGL/WebGPU | WebGPU is significantly faster because WASM output is smaller. |
| Safari | 🛠️ | WebGL/WebGPU | Safari does not yet support [Shared Array Buffer](https://caniuse.com/sharedarraybuffer) |
| Mobile Firefox | 🆗 | WebGL/WebGPU | |
| Mobile Chrome | 🆗 | WebGL | [WebGPU](https://caniuse.com/webgpu) is not implemented. |
| Mobile Safari | 🛠️ | WebGL | [WebGPU](https://caniuse.com/webgpu) is not implemented. Safari does not yet support [Shared Array Buffer](https://caniuse.com/sharedarraybuffer) |
:white_check_mark: = First Class Support — :ok: = Best Effort Support — :hammer_and_wrench: = Unsupported, but support
✅ = First Class Support — 🆗= Best Effort Support — 🛠️ = Unsupported, but support
in progress

View File

@ -31,50 +31,25 @@ default-toolchain:
nightly-toolchain:
rustup install $NIGHTLY_TOOLCHAIN
rustup component add rust-src --toolchain $NIGHTLY_TOOLCHAIN
rustup override set $NIGHTLY_TOOLCHAIN
nightly-toolchain-android: nightly-toolchain
rustup target add --toolchain $NIGHTLY_TOOLCHAIN x86_64-linux-android
rustup target add --toolchain $NIGHTLY_TOOLCHAIN aarch64-linux-android
webpack-webgl-production: nightly-toolchain
cd web/web && npm install && npm run webgl-production-build
web-install PROJECT:
cd web/{{PROJECT}} && npm install
webpack-production: nightly-toolchain
cd web/web && npm install && npm run production-build
web-lib TARGET: nightly-toolchain (web-install "lib")
export RUSTUP_TOOLCHAIN=$NIGHTLY_TOOLCHAIN && cd web/lib && npm run {{TARGET}}
web-demo TARGET: (web-install "demo")
cd web/demo && npm run {{TARGET}}
# TODO
# wasm-pack-webgl: nightly-toolchain
# ./wasm-pack-v0.10.1-x86_64-unknown-linux-musl/wasm-pack build . \
# --release --target web --out-dir web/dist/maplibre-rs -- \
# --features "web-webgl" -Z build-std=std,panic_abort
#
# wasm-pack: nightly-toolchain
# ./wasm-pack-v0.10.1-x86_64-unknown-linux-musl/wasm-pack build . \
# --release --target web --out-dir web/dist/maplibre-rs -- \
# -Z build-std=std,panic_abort
#
# build-web-webgl: nightly-toolchain
# cargo build --features web-webgl --target wasm32-unknown-unknown -Z build-std=std,panic_abort
#
# build-web: nightly-toolchain
# cargo build --features "" --target wasm32-unknown-unknown -Z build-std=std,panic_abort
#
# wasm-bindgen:
# cargo install wasm-bindgen-cli
# # TODO: Untested: --reference-types
# wasm-bindgen --target web --out-dir web/dist/maplibre-rs-plain-bindgen target/wasm32-unknown-unknown/debug/maplibre.wasm
#
# build-wasm-bindgen: build-web wasm-bindgen
#
# build-wasm-bindgen-webgpu: build-web wasm-bindgen
# TODO
#profile-bench:
# cargo flamegraph --bench render -- --bench
build-android: print-android-env
cd android/gradle && ./gradlew assembleDebug
export RUSTUP_TOOLCHAIN=$NIGHTLY_TOOLCHAIN && cd android/gradle && ./gradlew assembleDebug
# language=bash
print-android-env:
@ -136,6 +111,9 @@ xcodebuild-xcframework: xcodebuild-clean (xcodebuild-archive "arm64" "iOS") (xc
echo "$framework_args" | xargs xcodebuild -create-xcframework -output "$XC_FRAMEWORK_PATH"
cat "$XC_FRAMEWORK_PATH/Info.plist"
book-serve:
mdbook serve docs
# language=bash
extract-tiles:
#!/usr/bin/env bash

View File

@ -16,9 +16,9 @@ default = []
console_error_panic_hook = "0.1"
web-sys = { version = "0.3", features = [
"Window",
"Headers",
"WorkerGlobalScope", "Request", "RequestInit", "RequestMode", "Response",
"ErrorEvent", "DedicatedWorkerGlobalScope"
"Worker", "WorkerGlobalScope", "DedicatedWorkerGlobalScope", "MessageEvent",
"Request", "RequestInit", "RequestMode", "Response", "Headers",
"ErrorEvent"
] }
js-sys = "0.3"
wasm-bindgen = "0.2"

View File

@ -72,8 +72,8 @@ impl RenderState {
let sample_count = 4;
//let instance = wgpu::Instance::new(wgpu::Backends::GL);
//let instance = wgpu::Instance::new(wgpu::Backends::all());
let instance = wgpu::Instance::new(wgpu::Backends::VULKAN);
let instance = wgpu::Instance::new(wgpu::Backends::all());
//let instance = wgpu::Instance::new(wgpu::Backends::VULKAN);
let surface = unsafe { instance.create_surface(&window) };
let surface_config = wgpu::SurfaceConfiguration {

21
web/demo/iife/iife.html Normal file
View File

@ -0,0 +1,21 @@
<!doctype html>
<html lang="en" style="margin: 0; padding: 0;height: 100%;">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body style="margin: 0; padding: 0; width:100%; height: 100%; max-height: 100%;">
<canvas id="maplibre" style="position:absolute;"></canvas>
<script src="dist/esbuild-iffe/main.js"></script>
<script>
window.maplibre.startMapLibre()
</script>
</body>
</html>

10
web/demo/index.ts Normal file
View File

@ -0,0 +1,10 @@
import { startMapLibre } from 'maplibre-rs'
if (process.env.CJS) {
// When bundling a CJS library, webpack can not know where to find the wasm file or the WebWorker. So we need to
// find it manually and then pass it down.
const maplibreWasm = require('file-loader!maplibre_rs/dist/esbuild-cjs/assets/index_bg.wasm')
startMapLibre(maplibreWasm.default, undefined)
} else {
startMapLibre(undefined, undefined)
}

View File

@ -1,30 +1,46 @@
{
"name": "web",
"name": "demo",
"version": "0.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "web",
"name": "demo",
"version": "0.0.1",
"license": "MIT",
"dependencies": {
"maplibre-rs": "file:../lib"
},
"devDependencies": {
"copy-webpack-plugin": "^10.2.4",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"ts-loader": "^9.2.6",
"typescript": "^4.5.4",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.6.0"
}
},
"../../../../../../../lib": {
"extraneous": true
},
"../lib": {
"name": "maplibre-rs",
"version": "0.0.1",
"license": "MIT",
"dependencies": {
"spectorjs": "^0.9.27",
"wasm-feature-detect": "^1.2.11",
"workbox-cacheable-response": "^6.4.2",
"workbox-routing": "^6.4.2",
"workbox-strategies": "^6.4.2"
"wasm-feature-detect": "^1.2.11"
},
"devDependencies": {
"@wasm-tool/wasm-pack-plugin": "^1.6.0",
"copy-webpack-plugin": "^10.0.0",
"html-webpack-plugin": "^5.5.0",
"ts-loader": "^9.2.6",
"@chialab/esbuild-plugin-env": "^0.15.3",
"@chialab/esbuild-plugin-meta-url": "^0.15.15",
"esbuild": "^0.14.38",
"esbuild-plugin-inline-worker": "^0.1.1",
"ts-loader": "^9.2.8",
"typescript": "^4.5.4",
"wasm-pack": "^0.10.1",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.6.0"
"wasm-pack": "^0.10.2"
}
},
"node_modules/@discoveryjs/json-ext": {
@ -252,18 +268,6 @@
"@types/node": "*"
}
},
"node_modules/@wasm-tool/wasm-pack-plugin": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@wasm-tool/wasm-pack-plugin/-/wasm-pack-plugin-1.6.0.tgz",
"integrity": "sha512-Iax4nEgIvVCZqrmuseJm7ln/muWpg7uT5fXMAT0crYo+k5JTuZE58DJvBQoeIAegA3IM9cZgfkcZjAOUCPsT1g==",
"dev": true,
"dependencies": {
"chalk": "^2.4.1",
"command-exists": "^1.2.7",
"watchpack": "^2.1.1",
"which": "^2.0.2"
}
},
"node_modules/@webassemblyjs/ast": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
@ -558,18 +562,6 @@
"node": ">=8"
}
},
"node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"dependencies": {
"color-convert": "^1.9.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/anymatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
@ -610,15 +602,6 @@
"lodash": "^4.17.14"
}
},
"node_modules/axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"dev": true,
"dependencies": {
"follow-redirects": "^1.14.0"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@ -631,6 +614,15 @@
"integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=",
"dev": true
},
"node_modules/big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
"dev": true,
"engines": {
"node": "*"
}
},
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@ -640,20 +632,6 @@
"node": ">=8"
}
},
"node_modules/binary-install": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/binary-install/-/binary-install-0.1.1.tgz",
"integrity": "sha512-DqED0D/6LrS+BHDkKn34vhRqOGjy5gTMgvYZsGK2TpNbdPuz4h+MRlNgGv5QBRd7pWq/jylM4eKNCizgAq3kNQ==",
"dev": true,
"dependencies": {
"axios": "^0.21.1",
"rimraf": "^3.0.2",
"tar": "^6.1.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/body-parser": {
"version": "1.19.2",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz",
@ -794,20 +772,6 @@
}
]
},
"node_modules/chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"dependencies": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
@ -847,15 +811,6 @@
"node": ">= 6"
}
},
"node_modules/chownr": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
"dev": true,
"engines": {
"node": ">=10"
}
},
"node_modules/chrome-trace-event": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
@ -891,33 +846,12 @@
"node": ">=6"
}
},
"node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"dependencies": {
"color-name": "1.1.3"
}
},
"node_modules/color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"node_modules/colorette": {
"version": "2.0.16",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz",
"integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==",
"dev": true
},
"node_modules/command-exists": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz",
"integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==",
"dev": true
},
"node_modules/commander": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
@ -1253,6 +1187,15 @@
"integrity": "sha512-gRwLpVYWHGbERPU6o8pKfR168V6enWEXzZc6zQNNXbgJ7UJna+9qzAIHY94+9KOv71D/CH+QebLA9pChD2q8zA==",
"dev": true
},
"node_modules/emojis-list": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
"dev": true,
"engines": {
"node": ">= 4"
}
},
"node_modules/encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@ -1317,15 +1260,6 @@
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
"dev": true
},
"node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/eslint-scope": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
@ -1530,6 +1464,75 @@
"node": ">=0.8.0"
}
},
"node_modules/file-loader": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz",
"integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==",
"dev": true,
"dependencies": {
"loader-utils": "^2.0.0",
"schema-utils": "^3.0.0"
},
"engines": {
"node": ">= 10.13.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"peerDependencies": {
"webpack": "^4.0.0 || ^5.0.0"
}
},
"node_modules/file-loader/node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/file-loader/node_modules/ajv-keywords": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
"dev": true,
"peerDependencies": {
"ajv": "^6.9.1"
}
},
"node_modules/file-loader/node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true
},
"node_modules/file-loader/node_modules/schema-utils": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.8",
"ajv": "^6.12.5",
"ajv-keywords": "^3.5.2"
},
"engines": {
"node": ">= 10.13.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
}
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@ -1611,18 +1614,6 @@
"node": ">= 0.6"
}
},
"node_modules/fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
"dev": true,
"dependencies": {
"minipass": "^3.0.0"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/fs-monkey": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz",
@ -1749,15 +1740,6 @@
"node": ">= 0.4.0"
}
},
"node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@ -2215,6 +2197,18 @@
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true
},
"node_modules/json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"dev": true,
"bin": {
"json5": "lib/cli.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
@ -2233,6 +2227,20 @@
"node": ">=6.11.5"
}
},
"node_modules/loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
},
"engines": {
"node": ">=8.9.0"
}
},
"node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
@ -2272,6 +2280,10 @@
"node": ">=10"
}
},
"node_modules/maplibre-rs": {
"resolved": "../lib",
"link": true
},
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
@ -2402,43 +2414,6 @@
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"node_modules/minipass": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz",
"integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==",
"dev": true,
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/minizlib": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
"dev": true,
"dependencies": {
"minipass": "^3.0.0",
"yallist": "^4.0.0"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"dev": true,
"bin": {
"mkdirp": "bin/cmd.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@ -3427,11 +3402,6 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"node_modules/spectorjs": {
"version": "0.9.27",
"resolved": "https://registry.npmjs.org/spectorjs/-/spectorjs-0.9.27.tgz",
"integrity": "sha512-eujFAuFWdW9S5wT++ks2o1zShN5Vd8Zple2NB6oM5G5tXqNtGbk6Yg3mfCpL03Bbq0djqGJAeswYk0VfpuPfIQ=="
},
"node_modules/statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
@ -3471,18 +3441,6 @@
"node": ">=6"
}
},
"node_modules/supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
@ -3504,23 +3462,6 @@
"node": ">=6"
}
},
"node_modules/tar": {
"version": "6.1.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"dev": true,
"dependencies": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"minipass": "^3.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
},
"engines": {
"node": ">= 10"
}
},
"node_modules/terser": {
"version": "5.12.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.12.1.tgz",
@ -3842,24 +3783,6 @@
"node": ">= 0.8"
}
},
"node_modules/wasm-feature-detect": {
"version": "1.2.11",
"resolved": "https://registry.npmjs.org/wasm-feature-detect/-/wasm-feature-detect-1.2.11.tgz",
"integrity": "sha512-HUqwaodrQGaZgz1lZaNioIkog9tkeEJjrM3eq4aUL04whXOVDRc/o2EGb/8kV0QX411iAYWEqq7fMBmJ6dKS6w=="
},
"node_modules/wasm-pack": {
"version": "0.10.2",
"resolved": "https://registry.npmjs.org/wasm-pack/-/wasm-pack-0.10.2.tgz",
"integrity": "sha512-Kuh8XAArQNVoikMUenjDs4+g6LpktgfXgqlp03G2dJKDBokA7Y8Cx6MDCnvREzNnmprk9IohHytwycVSemwe/w==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
"binary-install": "^0.1.0"
},
"bin": {
"wasm-pack": "run.js"
}
},
"node_modules/watchpack": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
@ -4170,35 +4093,6 @@
"integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==",
"dev": true
},
"node_modules/workbox-cacheable-response": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.5.3.tgz",
"integrity": "sha512-6JE/Zm05hNasHzzAGKDkqqgYtZZL2H06ic2GxuRLStA4S/rHUfm2mnLFFXuHAaGR1XuuYyVCEey1M6H3PdZ7SQ==",
"dependencies": {
"workbox-core": "6.5.3"
}
},
"node_modules/workbox-core": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.5.3.tgz",
"integrity": "sha512-Bb9ey5n/M9x+l3fBTlLpHt9ASTzgSGj6vxni7pY72ilB/Pb3XtN+cZ9yueboVhD5+9cNQrC9n/E1fSrqWsUz7Q=="
},
"node_modules/workbox-routing": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.5.3.tgz",
"integrity": "sha512-DFjxcuRAJjjt4T34RbMm3MCn+xnd36UT/2RfPRfa8VWJGItGJIn7tG+GwVTdHmvE54i/QmVTJepyAGWtoLPTmg==",
"dependencies": {
"workbox-core": "6.5.3"
}
},
"node_modules/workbox-strategies": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.5.3.tgz",
"integrity": "sha512-MgmGRrDVXs7rtSCcetZgkSZyMpRGw8HqL2aguszOc3nUmzGZsT238z/NN9ZouCxSzDu3PQ3ZSKmovAacaIhu1w==",
"dependencies": {
"workbox-core": "6.5.3"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@ -4447,18 +4341,6 @@
"@types/node": "*"
}
},
"@wasm-tool/wasm-pack-plugin": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@wasm-tool/wasm-pack-plugin/-/wasm-pack-plugin-1.6.0.tgz",
"integrity": "sha512-Iax4nEgIvVCZqrmuseJm7ln/muWpg7uT5fXMAT0crYo+k5JTuZE58DJvBQoeIAegA3IM9cZgfkcZjAOUCPsT1g==",
"dev": true,
"requires": {
"chalk": "^2.4.1",
"command-exists": "^1.2.7",
"watchpack": "^2.1.1",
"which": "^2.0.2"
}
},
"@webassemblyjs/ast": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
@ -4705,15 +4587,6 @@
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"anymatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
@ -4745,15 +4618,6 @@
"lodash": "^4.17.14"
}
},
"axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"dev": true,
"requires": {
"follow-redirects": "^1.14.0"
}
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@ -4766,23 +4630,18 @@
"integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=",
"dev": true
},
"big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
"dev": true
},
"binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
},
"binary-install": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/binary-install/-/binary-install-0.1.1.tgz",
"integrity": "sha512-DqED0D/6LrS+BHDkKn34vhRqOGjy5gTMgvYZsGK2TpNbdPuz4h+MRlNgGv5QBRd7pWq/jylM4eKNCizgAq3kNQ==",
"dev": true,
"requires": {
"axios": "^0.21.1",
"rimraf": "^3.0.2",
"tar": "^6.1.0"
}
},
"body-parser": {
"version": "1.19.2",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz",
@ -4887,17 +4746,6 @@
"integrity": "sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==",
"dev": true
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
@ -4925,12 +4773,6 @@
}
}
},
"chownr": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
"dev": true
},
"chrome-trace-event": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
@ -4957,33 +4799,12 @@
"shallow-clone": "^3.0.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"colorette": {
"version": "2.0.16",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz",
"integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==",
"dev": true
},
"command-exists": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz",
"integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==",
"dev": true
},
"commander": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
@ -5245,6 +5066,12 @@
"integrity": "sha512-gRwLpVYWHGbERPU6o8pKfR168V6enWEXzZc6zQNNXbgJ7UJna+9qzAIHY94+9KOv71D/CH+QebLA9pChD2q8zA==",
"dev": true
},
"emojis-list": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
"dev": true
},
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@ -5291,12 +5118,6 @@
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
"dev": true
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"eslint-scope": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
@ -5471,6 +5292,54 @@
"websocket-driver": ">=0.5.1"
}
},
"file-loader": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz",
"integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==",
"dev": true,
"requires": {
"loader-utils": "^2.0.0",
"schema-utils": "^3.0.0"
},
"dependencies": {
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"ajv-keywords": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
"dev": true,
"requires": {}
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true
},
"schema-utils": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.8",
"ajv": "^6.12.5",
"ajv-keywords": "^3.5.2"
}
}
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@ -5523,15 +5392,6 @@
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
"dev": true
},
"fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
"dev": true,
"requires": {
"minipass": "^3.0.0"
}
},
"fs-monkey": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz",
@ -5627,12 +5487,6 @@
"function-bind": "^1.1.1"
}
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@ -5970,6 +5824,12 @@
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true
},
"json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"dev": true
},
"kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
@ -5982,6 +5842,17 @@
"integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
"dev": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
@ -6015,6 +5886,20 @@
"yallist": "^4.0.0"
}
},
"maplibre-rs": {
"version": "file:../lib",
"requires": {
"@chialab/esbuild-plugin-env": "^0.15.3",
"@chialab/esbuild-plugin-meta-url": "^0.15.15",
"esbuild": "^0.14.38",
"esbuild-plugin-inline-worker": "^0.1.1",
"spectorjs": "^0.9.27",
"ts-loader": "^9.2.8",
"typescript": "^4.5.4",
"wasm-feature-detect": "^1.2.11",
"wasm-pack": "^0.10.2"
}
},
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
@ -6112,31 +5997,6 @@
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
"dev": true
},
"minipass": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz",
"integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==",
"dev": true,
"requires": {
"yallist": "^4.0.0"
}
},
"minizlib": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
"dev": true,
"requires": {
"minipass": "^3.0.0",
"yallist": "^4.0.0"
}
},
"mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"dev": true
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@ -6887,11 +6747,6 @@
}
}
},
"spectorjs": {
"version": "0.9.27",
"resolved": "https://registry.npmjs.org/spectorjs/-/spectorjs-0.9.27.tgz",
"integrity": "sha512-eujFAuFWdW9S5wT++ks2o1zShN5Vd8Zple2NB6oM5G5tXqNtGbk6Yg3mfCpL03Bbq0djqGJAeswYk0VfpuPfIQ=="
},
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
@ -6922,15 +6777,6 @@
"integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
"dev": true
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
},
"supports-preserve-symlinks-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
@ -6943,20 +6789,6 @@
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
"dev": true
},
"tar": {
"version": "6.1.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"dev": true,
"requires": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"minipass": "^3.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
}
},
"terser": {
"version": "5.12.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.12.1.tgz",
@ -7185,20 +7017,6 @@
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
"dev": true
},
"wasm-feature-detect": {
"version": "1.2.11",
"resolved": "https://registry.npmjs.org/wasm-feature-detect/-/wasm-feature-detect-1.2.11.tgz",
"integrity": "sha512-HUqwaodrQGaZgz1lZaNioIkog9tkeEJjrM3eq4aUL04whXOVDRc/o2EGb/8kV0QX411iAYWEqq7fMBmJ6dKS6w=="
},
"wasm-pack": {
"version": "0.10.2",
"resolved": "https://registry.npmjs.org/wasm-pack/-/wasm-pack-0.10.2.tgz",
"integrity": "sha512-Kuh8XAArQNVoikMUenjDs4+g6LpktgfXgqlp03G2dJKDBokA7Y8Cx6MDCnvREzNnmprk9IohHytwycVSemwe/w==",
"dev": true,
"requires": {
"binary-install": "^0.1.0"
}
},
"watchpack": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
@ -7414,35 +7232,6 @@
"integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==",
"dev": true
},
"workbox-cacheable-response": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.5.3.tgz",
"integrity": "sha512-6JE/Zm05hNasHzzAGKDkqqgYtZZL2H06ic2GxuRLStA4S/rHUfm2mnLFFXuHAaGR1XuuYyVCEey1M6H3PdZ7SQ==",
"requires": {
"workbox-core": "6.5.3"
}
},
"workbox-core": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.5.3.tgz",
"integrity": "sha512-Bb9ey5n/M9x+l3fBTlLpHt9ASTzgSGj6vxni7pY72ilB/Pb3XtN+cZ9yueboVhD5+9cNQrC9n/E1fSrqWsUz7Q=="
},
"workbox-routing": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.5.3.tgz",
"integrity": "sha512-DFjxcuRAJjjt4T34RbMm3MCn+xnd36UT/2RfPRfa8VWJGItGJIn7tG+GwVTdHmvE54i/QmVTJepyAGWtoLPTmg==",
"requires": {
"workbox-core": "6.5.3"
}
},
"workbox-strategies": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.5.3.tgz",
"integrity": "sha512-MgmGRrDVXs7rtSCcetZgkSZyMpRGw8HqL2aguszOc3nUmzGZsT238z/NN9ZouCxSzDu3PQ3ZSKmovAacaIhu1w==",
"requires": {
"workbox-core": "6.5.3"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",

39
web/demo/package.json Normal file
View File

@ -0,0 +1,39 @@
{
"name": "demo",
"version": "0.0.1",
"description": "A maplibre demo",
"private": true,
"scripts": {
"clean": "rm -rf dist",
"start": "webpack-dev-server --mode=development",
"start-cjs": "npm run start -- --env cjs",
"start-production": "webpack-dev-server --mode=production",
"build": "npm run clean && webpack --mode=development",
"build-cjs": "npm run build -- --env cjs",
"build-production": "npm run clean && webpack --mode=production"
},
"repository": {
"type": "git",
"url": "https://github.com/maplibre/maplibre-rs"
},
"dependencies": {
"maplibre-rs": "file:../lib"
},
"devDependencies": {
"copy-webpack-plugin": "^10.2.4",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"ts-loader": "^9.2.6",
"typescript": "^4.5.4",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.6.0"
},
"keywords": [
"wasm",
"webgpu",
"maps"
],
"author": "",
"license": "MIT"
}

View File

@ -0,0 +1,68 @@
const path = require("path");
const HtmlWebpackPlugin = require('html-webpack-plugin');
//const CopyPlugin = require("copy-webpack-plugin");
const webpack = require("webpack");
let dist = path.join(__dirname, 'dist/');
module.exports = (env) => ({
mode: "development",
entry: {
main: "./index.ts",
},
experiments: {
asyncWebAssembly: env.cjs ? false : true
},
performance: {
maxEntrypointSize: 400000,
maxAssetSize: 400000000,
},
output: {
path: dist,
filename: "[name].[fullhash].js"
},
devServer: {
server: {
type: 'http',
},
allowedHosts: 'all',
host: '0.0.0.0',
static: {
directory: dist,
},
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp'
},
},
module: {
rules: [
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.ts', '.js'],
//mainFields: env.cjs ? ['main', 'module'] : undefined,
},
plugins: [
new webpack.DefinePlugin({
'process.env.CJS': !!env.cjs
}),
/*new CopyPlugin({
patterns: [
// webpack
//{ from: "*.wasm", to: "[path][name][ext]", context: 'node_modules/maplibre_rs/dist/maplibre-rs/' },
//{ from: "*.maplibre-rs.js", to: "[path][name][ext]", context: 'node_modules/maplibre_rs/dist/maplibre-rs/' },
// parcel
{from: "*.wasm", to: "[path]maplibre[ext]", context: 'node_modules/maplibre_rs/dist/parcel-cjs/'},
{from: "*worker*", to: "[path]worker[ext]", context: 'node_modules/maplibre_rs/dist/parcel-cjs/'},
],
}),*/
new HtmlWebpackPlugin({
title: 'maplibre demo',
}),
]
});

9
web/lib/.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
node_modules
libs/maplibre*
dist
src/wasm-pack
.parcel-cache

1
web/lib/@types/env/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare const process: { env: { WEBGL: string } }

4
web/lib/@types/maplibre/index.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
interface Window {
schedule_tile_request: (url: string, request_id: number) => void;
newWorker: () => void;
}

29
web/lib/build.mjs Normal file
View File

@ -0,0 +1,29 @@
import { build } from 'esbuild';
import metaUrlPlugin from '@chialab/esbuild-plugin-meta-url';
import inlineWorker from 'esbuild-plugin-inline-worker';
import envPlugin from '@chialab/esbuild-plugin-env';
let baseSettings = {
entryPoints: ['src/index.ts'],
bundle: true,
platform: "browser",
assetNames: "assets/[name]",
plugins: [
inlineWorker({
format: "cjs", platform: "browser",
target: 'es2022',
bundle: true,
assetNames: "assets/[name]",
}),
metaUrlPlugin(),
envPlugin()
],
};
const start = async() => {
await build({...baseSettings, format: "esm", outfile: "dist/esbuild-esm/module.js",});
await build({...baseSettings, format: "cjs", outfile: "dist/esbuild-cjs/main.js",});
await build({...baseSettings, format: "iife", outfile: "dist/esbuild-iffe/main.js", globalName: "maplibre"});
}
start()

3089
web/lib/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

43
web/lib/package.json Normal file
View File

@ -0,0 +1,43 @@
{
"name": "maplibre-rs",
"version": "0.0.1",
"description": "",
"scripts": {
"wasm-pack": "wasm-pack build --out-name index --out-dir lib/src/wasm-pack ../ --target web -- --features \"$FEATURES\" -Z build-std=std,panic_abort && rm src/wasm-pack/package.json",
"clean": "rm -rf dist && rm -rf src/wasm-pack",
"esbuild": "npm run clean && npm run wasm-pack && WEBGL=false node build.mjs && tsc -m es2022 -outDir ./dist/esbuild --emitDeclarationOnly",
"esbuild-webgl": "npm run clean && FEATURES=web-webgl npm run wasm-pack && WEBGL=true node build.mjs && tsc -m es2022 -outDir ./dist/esbuild --emitDeclarationOnly",
"postinstall": "patch-package"
},
"files": [
"dist/**/*"
],
"module": "dist/esbuild-esm/module.js",
"main": "dist/esbuild-cjs/main.js",
"types": "dist/esbuild/index.d.ts",
"dependencies": {
"spectorjs": "^0.9.27",
"wasm-feature-detect": "^1.2.11"
},
"devDependencies": {
"@chialab/esbuild-plugin-env": "^0.15.3",
"@chialab/esbuild-plugin-meta-url": "^0.15.15",
"esbuild": "^0.14.38",
"esbuild-plugin-inline-worker": "^0.1.1",
"patch-package": "^6.4.7",
"ts-loader": "^9.2.8",
"typescript": "^4.5.4",
"wasm-pack": "^0.10.2"
},
"repository": {
"type": "git",
"url": "https://github.com/maplibre/maplibre-rs"
},
"keywords": [
"wasm",
"webgpu",
"maps"
],
"author": "",
"license": "MIT"
}

View File

@ -0,0 +1,13 @@
diff --git a/node_modules/@chialab/esbuild-plugin-meta-url/lib/index.js b/node_modules/@chialab/esbuild-plugin-meta-url/lib/index.js
index 7e34edb..9a52cac 100644
--- a/node_modules/@chialab/esbuild-plugin-meta-url/lib/index.js
+++ b/node_modules/@chialab/esbuild-plugin-meta-url/lib/index.js
@@ -158,7 +158,7 @@ export default function({ emit = true } = {}) {
}
promises.push(Promise.resolve().then(async () => {
- const { path: resolvedPath } = await build.resolve(value.split('?')[0], {
+ const { path: resolvedPath } = await build.resolve("./" + value.split('?')[0], {
kind: 'dynamic-import',
importer: args.path,
namespace: 'file',

View File

@ -1,4 +1,4 @@
import init, {create_pool_scheduler, new_thread_local_state, run} from "./dist/libs/maplibre"
import init, {create_pool_scheduler, new_thread_local_state, run} from "./wasm-pack"
import {Spector} from "spectorjs"
import {WebWorkerMessageType} from "./types"
import {
@ -15,12 +15,10 @@ import {
threads
} from "wasm-feature-detect"
declare global {
interface Window {
schedule_tile_request: (url: string, request_id: number) => void;
newWorker: () => void;
}
}
// @ts-ignore
import Worker from './pool.worker.js';
const WEBGL = process.env.WEBGL === "true"
const isWebGLSupported = () => {
try {
@ -34,13 +32,13 @@ const isWebGLSupported = () => {
const checkWasmFeatures = async () => {
const checkFeature = async function (featureName: string, feature: () => Promise<boolean>) {
let result = await feature();
let result = await feature();
let msg = `The feature ${featureName} returned: ${result}`;
if (result) {
console.log(msg);
} else {
console.warn(msg);
}
if (result) {
console.log(msg);
} else {
console.warn(msg);
}
}
await checkFeature("bulkMemory", bulkMemory);
@ -98,32 +96,21 @@ const preventDefaultTouchActions = () => {
canvas.addEventListener("touchmove", e => e.preventDefault())
})
}
/*
let WORKER_COUNT = 4
const createWorker = (id: number, memory: WebAssembly.Memory) => {
const worker = new Worker(new URL('./legacy.worker.ts', import.meta.url), {
type: "module",
})
worker.postMessage({type: "init", memory} as WebWorkerMessageType)
const registerServiceWorker = () => {
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register(new URL('./service-worker.ts', import.meta.url)).catch(() => {
console.error("Failed to register service worker");
})
})
}
return worker
}
const setupLegacyWebWorker = (schedulerPtr: number, memory: WebAssembly.Memory) => {
let WORKER_COUNT = 4
const createWorker = (id: number) => {
const worker = new Worker(new URL('./worker.ts', import.meta.url), {
type: "module",
name: `worker_${id}`
})
worker.postMessage({type: "init", memory} as WebWorkerMessageType)
return worker
}
let workers: [number, Worker][] = Array.from(
new Array(WORKER_COUNT).keys(),
(id) => [new_thread_local_state(schedulerPtr), createWorker(id)]
(id) => [new_thread_local_state(schedulerPtr), createWorker(id, memory)]
)
window.schedule_tile_request = (url: string, request_id: number) => {
@ -135,27 +122,29 @@ const setupLegacyWebWorker = (schedulerPtr: number, memory: WebAssembly.Memory)
request_id
} as WebWorkerMessageType)
}
}
}*/
const start = async () => {
export const startMapLibre = async (wasmPath: string | undefined, workerPath: string | undefined) => {
await checkWasmFeatures()
if (!checkRequirements()) {
return
}
registerServiceWorker()
preventDefaultTouchActions();
let MEMORY_PAGES = 16 * 1024
const memory = new WebAssembly.Memory({initial: 1024, maximum: MEMORY_PAGES, shared: true})
await init(undefined, memory)
await init(wasmPath, memory)
// TODO: Inline is not yet working
// let worker = new Worker(new URL('blob-url:./test_worker.js', import.meta.url), {type: 'module'});
const schedulerPtr = create_pool_scheduler(() => {
return new Worker(new URL('./pool_worker.ts', import.meta.url), {
return workerPath ? new Worker(workerPath, {
type: 'module'
});
}) : Worker();
})
// setupLegacyWebWorker(schedulerPtr, memory)
@ -163,6 +152,4 @@ const start = async () => {
await run(schedulerPtr)
}
start().then(() => console.log("started via wasm"))
export default "test"

View File

@ -1,4 +1,4 @@
import init, {InitOutput, tessellate_layers} from "./dist/libs/maplibre"
import init, {InitOutput, tessellate_layers} from "./wasm-pack"
import {WebWorkerMessageType} from "./types"
let module: Promise<InitOutput> = null

View File

@ -1,4 +1,4 @@
import init, {child_entry_point} from "./dist/libs/maplibre"
import init, {child_entry_point} from "./wasm-pack"
onmessage = async message => {
const initialised = init(message.data[0], message.data[1]).catch(err => {

17
web/lib/tsconfig.json Normal file
View File

@ -0,0 +1,17 @@
{
"compilerOptions": {
"outDir": "./dist/",
"module": "es2022",
"target": "es2022",
"lib": [ "es6", "dom" ],
"sourceMap": true,
"declaration": true,
"declarationMap": true,
"allowJs": true,
"skipLibCheck": true,
"moduleResolution": "node",
"types": ["maplibre", "env"],
"typeRoots": ["@types"]
},
"include": ["./src/**/*"]
}

View File

@ -1,44 +0,0 @@
{
"name": "web",
"version": "0.0.1",
"description": "A maplibre demo",
"main": "index.js",
"scripts": {
"start": "RUSTUP_TOOLCHAIN=nightly-2022-04-04-x86_64-unknown-linux-gnu webpack-dev-server --mode=development",
"build": "RUSTUP_TOOLCHAIN=nightly-2022-04-04-x86_64-unknown-linux-gnu webpack --mode=development",
"production-build": "RUSTUP_TOOLCHAIN=nightly-2022-04-04-x86_64-unknown-linux-gnu webpack --mode=production",
"webgl-start": "npm run start -- --env webgl",
"webgl-start-production": "npm run webgl-start -- --mode=production",
"webgl-build": "npm run build -- --env webgl",
"webgl-production-build": "npm run production-build -- --env webgl"
},
"repository": {
"type": "git",
"url": "https://github.com/maplibre/maplibre-rs"
},
"dependencies": {
"spectorjs": "^0.9.27",
"wasm-feature-detect": "^1.2.11",
"workbox-cacheable-response": "^6.4.2",
"workbox-routing": "^6.4.2",
"workbox-strategies": "^6.4.2"
},
"devDependencies": {
"@wasm-tool/wasm-pack-plugin": "^1.6.0",
"copy-webpack-plugin": "^10.0.0",
"html-webpack-plugin": "^5.5.0",
"ts-loader": "^9.2.6",
"typescript": "^4.5.4",
"wasm-pack": "^0.10.1",
"webpack": "^5.65.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.6.0"
},
"keywords": [
"wasm",
"webgpu",
"maps"
],
"author": "",
"license": "MIT"
}

View File

@ -1,101 +0,0 @@
const path = require("path");
const webpack = require("webpack");
const CopyPlugin = require("copy-webpack-plugin");
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
const HtmlWebpackPlugin = require('html-webpack-plugin');
let dist = path.join(__dirname, 'dist/demo');
module.exports = (env) => ({
mode: "development",
entry: {
main: "./index.ts",
},
experiments: {
syncWebAssembly: true
},
performance: {
maxEntrypointSize: 400000,
maxAssetSize: 400000000,
},
output: {
path: dist,
filename: "[name].[fullhash].js"
},
devServer: {
server: {
type: 'http',
},
allowedHosts: 'all',
host: '0.0.0.0',
static: {
directory: dist,
},
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp'
},
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
plugins: [
new webpack.DefinePlugin({
WEBGL: !!env.webgl
}),
new HtmlWebpackPlugin({
title: 'maplibre demo',
}),
new WasmPackPlugin({
crateDirectory: path.resolve(__dirname, '../'),
// Check https://rustwasm.github.io/wasm-pack/book/commands/build.html for
// the available set of arguments.
//
// Optional space delimited arguments to appear before the wasm-pack
// command. Default arguments are `--verbose`.
//args: '--log-level warn',
// Default arguments are `--typescript --target browser --mode normal`.
extraArgs: ` --target web -- . -Z build-std=std,panic_abort ${env.webgl ? '--features web-webgl' : ''} ${env.tracing ? '--features enable-tracing' : ''}`,
// Optional array of absolute paths to directories, changes to which
// will trigger the build.
// watchDirectories: [
// path.resolve(__dirname, "another-crate/src")
// ],
// The same as the `--out-dir` option for `wasm-pack`
outDir: path.resolve(__dirname, 'dist/libs/maplibre'),
// The same as the `--out-name` option for `wasm-pack`
// outName: "index",
// If defined, `forceWatch` will force activate/deactivate watch mode for
// `.rs` files.
//
// The default (not set) aligns watch mode for `.rs` files to Webpack's
// watch mode.
// forceWatch: true,
// If defined, `forceMode` will force the compilation mode for `wasm-pack`
//
// Possible values are `development` and `production`.
//
// the mode `development` makes `wasm-pack` build in `debug` mode.
// the mode `production` makes `wasm-pack` build in `release` mode.
// forceMode: "production",
// Controls plugin output verbosity, either 'info' or 'error'.
// Defaults to 'info'.
// pluginLogLevel: 'info'
}),
]
});