Skip to content

Commit 0a587ce

Browse files
Copilot0xrinegade
andcommitted
Fix WASM binary naming and update CI workflow
Co-authored-by: 0xrinegade <[email protected]>
1 parent 8d79b73 commit 0a587ce

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
if: ${{ matrix.platform == 'web' }}
7373
run: |
7474
cd opensvm-dioxus
75-
cargo build --target wasm32-unknown-unknown --features web --release --no-default-features
75+
cargo build --release --target wasm32-unknown-unknown --bin opensvm_dioxus --features web --no-default-features
7676
7777
# Optimize WASM binary with wasm-opt
7878
echo "Original WASM size:"
@@ -93,36 +93,36 @@ jobs:
9393
if: ${{ matrix.platform == 'desktop' && matrix.os == 'macos-latest' }}
9494
run: |
9595
cd opensvm-dioxus
96-
RUSTFLAGS="-C target-cpu=native" cargo build --features desktop --release --no-default-features
96+
RUSTFLAGS="-C target-cpu=native" cargo build --features desktop --release --no-default-features --bin opensvm_dioxus
9797
shell: bash
9898

9999
- name: Build for Desktop (Linux)
100100
if: ${{ matrix.platform == 'desktop' && matrix.os == 'ubuntu-22.04' }}
101101
run: |
102102
cd opensvm-dioxus
103-
RUSTFLAGS="-C target-cpu=native" cargo build --features desktop --release --no-default-features
103+
RUSTFLAGS="-C target-cpu=native" cargo build --features desktop --release --no-default-features --bin opensvm_dioxus
104104
shell: bash
105105

106106
- name: Build for Desktop (Windows)
107107
if: ${{ matrix.platform == 'desktop' && matrix.os == 'windows-latest' }}
108108
run: |
109109
cd opensvm-dioxus
110110
$env:RUSTFLAGS="-C target-cpu=native"
111-
cargo build --features desktop --release --no-default-features
111+
cargo build --features desktop --release --no-default-features --bin opensvm_dioxus
112112
shell: pwsh
113113

114114
- name: Run tests
115115
run: |
116116
cd opensvm-dioxus
117-
cargo test --features ${{ matrix.platform }} --no-default-features
117+
cargo test --features ${{ matrix.platform }} --no-default-features --bin opensvm_dioxus
118118
119119
- name: Upload artifacts
120120
uses: actions/upload-artifact@v4
121121
with:
122122
name: opensvm-dioxus-${{ matrix.os }}-${{ matrix.platform }}
123123
path: |
124-
opensvm-dioxus/target/*/release/opensvm-dioxus*
125-
opensvm-dioxus/target/release/opensvm-dioxus*
124+
opensvm-dioxus/target/*/release/opensvm_dioxus*
125+
opensvm-dioxus/target/release/opensvm_dioxus*
126126
127127
release:
128128
name: Create Release
@@ -370,10 +370,10 @@ jobs:
370370
- name: Build for Android
371371
run: |
372372
cd opensvm-dioxus
373-
RUSTFLAGS="-C opt-level=3 -C lto=thin" cargo build --target aarch64-linux-android --features android --release --no-default-features
373+
RUSTFLAGS="-C opt-level=3 -C lto=thin" cargo build --target aarch64-linux-android --features android --release --no-default-features --bin opensvm_dioxus
374374
375375
- name: Upload Android artifact
376376
uses: actions/upload-artifact@v4
377377
with:
378378
name: opensvm-dioxus-android
379-
path: opensvm-dioxus/target/aarch64-linux-android/release/opensvm-dioxus
379+
path: opensvm-dioxus/target/aarch64-linux-android/release/opensvm_dioxus

opensvm-dioxus/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name = "opensvm-dioxus"
33
version = "0.1.0"
44
edition = "2021"
55

6+
[[bin]]
7+
name = "opensvm_dioxus"
8+
path = "src/main.rs"
9+
610
[dependencies]
711
dioxus = "0.4.0"
812
dioxus-router = "0.4.0"

opensvm-dioxus/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn main() {
7373
// Initialize logger for Android
7474
android_logger::init_once(
7575
android_logger::Config::default()
76-
.with_min_level(log::Level::Debug)
76+
.with_max_level(log::LevelFilter::Debug)
7777
.with_tag("opensvm-dioxus"),
7878
);
7979

0 commit comments

Comments
 (0)