Skip to content

Commit

Permalink
👷 enable wasm release
Browse files Browse the repository at this point in the history
  • Loading branch information
Odonno committed Apr 20, 2024
1 parent 0ebef59 commit e9ccfd6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
archive: tar.gz tar.xz tar.zst
- target: x86_64-apple-darwin
archive: zip
# - target: wasm32-wasi
# archive: zip
- target: wasm32-wasi
archive: zip

steps:
- name: Checkout repository
Expand Down
12 changes: 12 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,20 @@ mod scaffold;
mod surrealdb;
mod validate_version_order;


#[cfg(target_arch = "wasm32")]
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
sub_main().await
}

#[cfg(not(target_arch = "wasm32"))]
#[tokio::main]
async fn main() -> Result<()> {
sub_main().await
}

async fn sub_main() -> Result<()> {
color_eyre::install()?;
let args = Args::parse();

Expand Down

0 comments on commit e9ccfd6

Please sign in to comment.