From 47622482815d985967413f2a7b4030d29ed73e81 Mon Sep 17 00:00:00 2001 From: Michael-F-Bryan Date: Tue, 10 Oct 2023 21:36:55 +0800 Subject: [PATCH] Upgraded to wasmer-toml v0.9.2 and switched to CommandV2 syntax --- Cargo.toml | 2 +- lib/cli/src/commands/init.rs | 6 +++--- tests/integration/cli/tests/fixtures/init1.toml | 1 + tests/integration/cli/tests/fixtures/init4.toml | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 85a8e55bb81..0508e5de946 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -85,7 +85,7 @@ version = "4.2.3" [workspace.dependencies] memoffset = "0.9.0" -wasmer-toml = "0.9.1" +wasmer-toml = "0.9.2" webc = { version = "5.6.0", default-features = false, features = ["package"] } [build-dependencies] diff --git a/lib/cli/src/commands/init.rs b/lib/cli/src/commands/init.rs index 15d2e26fe45..b81babc12ca 100644 --- a/lib/cli/src/commands/init.rs +++ b/lib/cli/src/commands/init.rs @@ -250,13 +250,13 @@ impl Init { BinOrLib::Bin => modules .iter() .map(|m| { - wasmer_toml::Command::V1(wasmer_toml::CommandV1 { + wasmer_toml::Command::V2(wasmer_toml::CommandV2 { name: m.name.clone(), module: wasmer_toml::ModuleReference::CurrentPackage { module: m.name.clone(), }, - main_args: None, - package: None, + runner: "wasi".to_string(), + annotations: None, }) }) .collect(), diff --git a/tests/integration/cli/tests/fixtures/init1.toml b/tests/integration/cli/tests/fixtures/init1.toml index 517a1201f9a..6ff92fe0cf4 100644 --- a/tests/integration/cli/tests/fixtures/init1.toml +++ b/tests/integration/cli/tests/fixtures/init1.toml @@ -16,3 +16,4 @@ wasi = '0.1.0-unstable' [[command]] name = 'testfirstproject' module = 'testfirstproject' +runner = 'wasi' diff --git a/tests/integration/cli/tests/fixtures/init4.toml b/tests/integration/cli/tests/fixtures/init4.toml index a3e5cb93bc8..f013412b008 100644 --- a/tests/integration/cli/tests/fixtures/init4.toml +++ b/tests/integration/cli/tests/fixtures/init4.toml @@ -16,3 +16,4 @@ wasi = '0.1.0-unstable' [[command]] name = 'wasmer' module = 'wasmer' +runner = 'wasi'