Skip to content

Commit e0712b7

Browse files
committed
workflow(cherrypick): switch to cargo-msfs
1 parent a177538 commit e0712b7

File tree

9 files changed

+45
-46
lines changed

9 files changed

+45
-46
lines changed

.cargo/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[target.wasm32-wasi]
1+
[target.wasm32-wasip1]
22
rustflags = [
33
"-Ctarget-feature=-crt-static,+bulk-memory",
44
"-Clink-self-contained=no",
@@ -21,4 +21,4 @@ rustflags = [
2121
]
2222

2323
[build]
24-
target = "wasm32-wasi"
24+
target = "wasm32-wasip1"

.github/workflows/pre-release.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ jobs:
2525
generate_release_notes: true
2626

2727
# Enable in future to automate publishing of NPM package
28-
release-js:
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v4
32-
33-
- uses: actions/setup-node@v4
34-
with:
35-
node-version: "18"
36-
registry-url: 'https://registry.npmjs.org'
37-
cache: "npm"
38-
39-
- name: Install node modules
40-
run: npm ci
41-
42-
- name: Build JS Interface
43-
run: cd src/js && npm run build
44-
45-
- name: Publish to NPM
46-
env:
47-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48-
run: cd src/js && npm publish --tag next
28+
# release-js:
29+
# runs-on: ubuntu-latest
30+
# steps:
31+
# - uses: actions/checkout@v4
32+
33+
# - uses: actions/setup-node@v4
34+
# with:
35+
# node-version: "18"
36+
# registry-url: 'https://registry.npmjs.org'
37+
# cache: "npm"
38+
39+
# - name: Install node modules
40+
# run: npm ci
41+
42+
# - name: Build JS Interface
43+
# run: cd src/js && npm run build
44+
45+
# - name: Publish to NPM
46+
# env:
47+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
# run: cd src/js && npm publish --tag next

Cargo.lock

Lines changed: 9 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ lto = true
88
strip = true
99

1010
[patch.crates-io]
11-
rusqlite = { git = "https://github.com/navigraph/rusqlite", rev = "7921774" }
11+
rusqlite = { git = "https://github.com/navigraph/rusqlite", rev = "f716d5c" }

rust-toolchain.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[toolchain]
22
profile = "default"
3-
channel = "1.79.0"
3+
channel = "1.83"
4+
targets = ["wasm32-wasip1"]

scripts/build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
cd %~dp0
44

5-
call .\run_docker_cmd.bat ./scripts/build.sh
5+
cargo-msfs build msfs2020 -i .. -o ..\out\msfs_navigation_data_interface.wasm
66

77
cd %~dp0
88

scripts/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/bin/bash
22

3+
# Required for compilation
4+
cargo install --git https://github.com/navigraph/cargo-msfs
5+
6+
cargo-msfs install msfs2020
7+
38
# Flags needed to get sqlite3 to work in the sim
49
export LIBSQLITE3_FLAGS="-DSQLITE_OMIT_SHARED_CACHE -D_LARGEFILE64_SOURCE"
510

6-
cargo build --target wasm32-wasi --release && wasm-opt -O1 --signext-lowering --enable-bulk-memory -o /out/msfs_navigation_data_interface.wasm /external/target/wasm32-wasi/release/msfs_navigation_data_interface.wasm
11+
cargo-msfs build msfs2020 -i .. -o ../out/msfs_navigation_data_interface.wasm

src/database/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
rusqlite = { version = "0.30.0", features = ["bundled"] }
10-
serde_rusqlite = "0.34.0"
9+
rusqlite = { version = "0.32.0", features = ["bundled"] }
10+
serde_rusqlite = "0.36.0"
1111
serde = { version = "1.0.190", features = ["derive"] }
1212
serde_json = "1.0.108"
1313
serde_with = "3.4.0"

src/wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "msfs-navigation-data-interface"
3-
version = "1.1.0"
3+
version = "1.1.1"
44
edition = "2021"
55

66
[lib]

0 commit comments

Comments
 (0)