From 5ac6c7103a8746c5b2ee79b5c99efa65bd886b8b Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Wed, 21 Aug 2024 12:12:02 +1000 Subject: [PATCH 1/2] Initial sketch for WASI targeting --- Build.ps1 | 3 +++ appveyor.yml | 3 ++- jsonarchive.exe.d.json | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Build.ps1 b/Build.ps1 index 23439f1..f4b02ec 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -29,5 +29,8 @@ if ($LASTEXITCODE) { exit 1 } cargo build --release --target=x86_64-pc-windows-msvc if ($LASTEXITCODE) { exit 1 } +cargo build --release --target=wasm32-wasip1 +if ($LASTEXITCODE) { exit 1 } + & .\tool\nuget.exe pack .\Seq.App.JsonArchive.nuspec -version $version -outputdirectory .\publish exit $LASTEXITCODE diff --git a/appveyor.yml b/appveyor.yml index 56cfbd5..921107d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ version: '{build}' skip_tags: true -image: Visual Studio 2017 +image: Visual Studio 2022 # Courtesy of https://github.com/starkat99/appveyor-rust/ install: @@ -9,6 +9,7 @@ install: - set PATH=%PATH%;%USERPROFILE%\.cargo\bin - rustup target add x86_64-unknown-linux-musl - rustup target add aarch64-unknown-linux-musl + - rustup target add wasm32-wasip1 - rustc -vV - cargo -vV diff --git a/jsonarchive.exe.d.json b/jsonarchive.exe.d.json index 6494763..95ae5c5 100644 --- a/jsonarchive.exe.d.json +++ b/jsonarchive.exe.d.json @@ -13,6 +13,10 @@ }, "linux-arm64": { "executable": "linux-arm64/jsonarchive" + }, + "hosted-wasm32-wasip1": { + "module": "wasm32-wasip1/jsonarchive.wasm", + "grant": ["dir"] } }, "settings": { From 530612159700935ffb85e7d45adbec76caf7d1dc Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Wed, 21 Aug 2024 12:15:10 +1000 Subject: [PATCH 2/2] Although it's a convention we use for .NET apps, marking the wasm target 'hosted' is redundant; dropping --- jsonarchive.exe.d.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonarchive.exe.d.json b/jsonarchive.exe.d.json index 95ae5c5..19e7db9 100644 --- a/jsonarchive.exe.d.json +++ b/jsonarchive.exe.d.json @@ -14,7 +14,7 @@ "linux-arm64": { "executable": "linux-arm64/jsonarchive" }, - "hosted-wasm32-wasip1": { + "wasm32-wasip1": { "module": "wasm32-wasip1/jsonarchive.wasm", "grant": ["dir"] }