Skip to content

Commit

Permalink
feat: now builds with cargo-msfs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigTag committed Dec 4, 2024
1 parent b2dd233 commit 9270ca3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ lto = true
strip = true

[patch.crates-io]
rusqlite = { git = "https://github.com/navigraph/rusqlite", rev = "7921774" }
rusqlite = { git = "https://github.com/navigraph/rusqlite", rev = "f716d5c" }
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"lint:js": "eslint \"src/js/**/*.ts\"",
"build:gauge": ".\\scripts\\build_gauge.bat",
"build:js": ".\\scripts\\build_js.bat",
"build:wasm": ".\\scripts\\build.bat",
"build:wasm": ".\\scripts\\build.bat 2020",
"build:wasm:2020": ".\\scripts\\build.bat 2020",
"build:wasm:2024": ".\\scripts\\build.bat 2024",
"build:wasm-workflow": "./scripts/run_docker_cmd.sh ./scripts/build.sh",
"jest": "jest --verbose --runInBand",
"test": ".\\scripts\\test.bat",
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
profile = "default"
channel = "1.79.0"
targets = ["wasm32-wasi"]
channel = "1.83"
targets = ["wasm32-wasip1"]
3 changes: 2 additions & 1 deletion scripts/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

cd %~dp0

call .\run_docker_cmd.bat ./scripts/build.sh
call cargo-msfs build msfs%1
call wasm-opt -O1 --signext-lowering --enable-bulk-memory -o ../out/msfs_navigation_data_interface.wasm ../target/wasm32-wasip1/release/msfs_navigation_data_interface.wasm

cd %~dp0

Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Flags needed to get sqlite3 to work in the sim
export LIBSQLITE3_FLAGS="-DSQLITE_OMIT_SHARED_CACHE -D_LARGEFILE64_SOURCE"

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
cargo-msfs build msfs2020 && 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
4 changes: 2 additions & 2 deletions src/database/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rusqlite = { version = "0.30.0", features = ["bundled"] }
serde_rusqlite = "0.34.0"
rusqlite = { version = "0.32", features = ["bundled"] }
serde_rusqlite = "0.36.0"
serde = { version = "1.0.190", features = ["derive"] }
serde_json = "1.0.108"
serde_with = "3.4.0"
Expand Down

0 comments on commit 9270ca3

Please sign in to comment.