Skip to content

Commit

Permalink
Bump wasm-tools deps (#990)
Browse files Browse the repository at this point in the history
* Bump wasm-tools deps

* Disable test with 64 flags

* Fix macos/go
  • Loading branch information
alexcrichton authored Jun 27, 2024
1 parent ecba1ec commit 46f4514
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 100 deletions.
66 changes: 33 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ indexmap = "2.0.0"
prettyplease = "0.2.20"
syn = { version = "2.0", features = ["printing"] }

wasmparser = "0.211.0"
wasm-encoder = "0.211.0"
wasm-metadata = "0.211.0"
wit-parser = "0.211.0"
wit-component = "0.211.0"
wasmparser = "0.212.0"
wasm-encoder = "0.212.0"
wasm-metadata = "0.212.0"
wit-parser = "0.212.0"
wit-component = "0.212.0"

wit-bindgen-core = { path = 'crates/core', version = '0.26.0' }
wit-bindgen-c = { path = 'crates/c', version = '0.26.0' }
Expand Down
12 changes: 0 additions & 12 deletions tests/codegen/flags.wit
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ interface %flags {
b24, b25, b26, b27, b28, b29, b30, b31,
}

flags flag64 {
b0, b1, b2, b3, b4, b5, b6, b7,
b8, b9, b10, b11, b12, b13, b14, b15,
b16, b17, b18, b19, b20, b21, b22, b23,
b24, b25, b26, b27, b28, b29, b30, b31,
b32, b33, b34, b35, b36, b37, b38, b39,
b40, b41, b42, b43, b44, b45, b46, b47,
b48, b49, b50, b51, b52, b53, b54, b55,
b56, b57, b58, b59, b60, b61, b62, b63,
}

flags withdashes {
with-dashes,
}
Expand All @@ -50,7 +39,6 @@ interface %flags {
roundtrip-flag8: func(x: flag8) -> flag8;
roundtrip-flag16: func(x: flag16) -> flag16;
roundtrip-flag32: func(x: flag32) -> flag32;
roundtrip-flag64: func(x: flag64) -> flag64;
}

world the-flags {
Expand Down
4 changes: 1 addition & 3 deletions tests/runtime/records.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ impl test_imports::Host for MyImports {
a: test_imports::Flag8,
b: test_imports::Flag16,
c: test_imports::Flag32,
d: test_imports::Flag64,
) -> (
test_imports::Flag8,
test_imports::Flag16,
test_imports::Flag32,
test_imports::Flag64,
) {
(a, b, c, d)
(a, b, c)
}

fn roundtrip_record1(&mut self, a: test_imports::R1) -> test_imports::R1 {
Expand Down
11 changes: 3 additions & 8 deletions tests/runtime/records/wasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ void records_test_imports() {
test_records_test_flag8_t flag8;
test_records_test_flag16_t flag16;
test_records_test_flag32_t flag32;
test_records_test_flag64_t flag64;
test_records_test_roundtrip_flags3(TEST_RECORDS_TEST_FLAG8_B0, TEST_RECORDS_TEST_FLAG16_B1, TEST_RECORDS_TEST_FLAG32_B2, TEST_RECORDS_TEST_FLAG64_B3,
&flag8, &flag16, &flag32, &flag64);
test_records_test_roundtrip_flags3(TEST_RECORDS_TEST_FLAG8_B0, TEST_RECORDS_TEST_FLAG16_B1, TEST_RECORDS_TEST_FLAG32_B2,
&flag8, &flag16, &flag32);
assert(flag8 == TEST_RECORDS_TEST_FLAG8_B0);
assert(flag16 == TEST_RECORDS_TEST_FLAG16_B1);
assert(flag32 == TEST_RECORDS_TEST_FLAG32_B2);
assert(flag64 == TEST_RECORDS_TEST_FLAG64_B3);

{
test_records_test_r1_t a, b;
Expand Down Expand Up @@ -85,15 +83,12 @@ void exports_test_records_test_roundtrip_flags3(
exports_test_records_test_flag8_t a,
exports_test_records_test_flag16_t b,
exports_test_records_test_flag32_t c,
exports_test_records_test_flag64_t d,
exports_test_records_test_flag8_t *ret0,
exports_test_records_test_flag16_t *ret1,
exports_test_records_test_flag32_t *ret2,
exports_test_records_test_flag64_t *ret3) {
exports_test_records_test_flag32_t *ret2) {
*ret0 = a;
*ret1 = b;
*ret2 = c;
*ret3 = d;
}

void exports_test_records_test_roundtrip_record1(exports_test_records_test_r1_t *a, exports_test_records_test_r1_t *ret0) {
Expand Down
11 changes: 4 additions & 7 deletions tests/runtime/records/wasm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ public static void TestImports()

{
var result = TestInterop.RoundtripFlags3(ITest.Flag8.B0, ITest.Flag16.B1,
ITest.Flag32.B2, ITest.Flag64.B3);
ITest.Flag32.B2);
Debug.Assert(result.Item1 == ITest.Flag8.B0);
Debug.Assert(result.Item2 == ITest.Flag16.B1);
Debug.Assert(result.Item3 == ITest.Flag32.B2);
Debug.Assert(result.Item4 == ITest.Flag64.B3);
}

{
Expand Down Expand Up @@ -89,14 +88,12 @@ public static ITest.F2 RoundtripFlags2(

public static (ITest.Flag8,
ITest.Flag16,
ITest.Flag32,
ITest.Flag64) RoundtripFlags3(
ITest.Flag32) RoundtripFlags3(
ITest.Flag8 a,
ITest.Flag16 b,
ITest.Flag32 c,
ITest.Flag64 d)
ITest.Flag32 c)
{
return (a, b, c, d);
return (a, b, c);
}

public static ITest.R1 RoundtripRecord1(
Expand Down
6 changes: 3 additions & 3 deletions tests/runtime/records/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (r *RecordImpl) TestImports() {
panic("TestRecordsTestRoundtripFlags2")
}

if a, b, c, d := TestRecordsTestRoundtripFlags3(TestRecordsTestFlag8_B0, TestRecordsTestFlag16_B1, TestRecordsTestFlag32_B2, TestRecordsTestFlag64_B3); a != TestRecordsTestFlag8_B0 && b != TestRecordsTestFlag16_B1 && c != TestRecordsTestFlag32_B2 && d != TestRecordsTestFlag64_B3 {
if a, b, c := TestRecordsTestRoundtripFlags3(TestRecordsTestFlag8_B0, TestRecordsTestFlag16_B1, TestRecordsTestFlag32_B2); a != TestRecordsTestFlag8_B0 && b != TestRecordsTestFlag16_B1 && c != TestRecordsTestFlag32_B2 {
panic("TestRecordsTestRoundtripFlags3")
}

Expand Down Expand Up @@ -78,8 +78,8 @@ func (r *RecordImpl) RoundtripFlags2(a ExportsTestRecordsTestF2) ExportsTestReco
return a
}

func (r *RecordImpl) RoundtripFlags3(a ExportsTestRecordsTestFlag8, b ExportsTestRecordsTestFlag16, c ExportsTestRecordsTestFlag32, d ExportsTestRecordsTestFlag64) (ExportsTestRecordsTestFlag8, ExportsTestRecordsTestFlag16, ExportsTestRecordsTestFlag32, ExportsTestRecordsTestFlag64) {
return a, b, c, d
func (r *RecordImpl) RoundtripFlags3(a ExportsTestRecordsTestFlag8, b ExportsTestRecordsTestFlag16, c ExportsTestRecordsTestFlag32) (ExportsTestRecordsTestFlag8, ExportsTestRecordsTestFlag16, ExportsTestRecordsTestFlag32) {
return a, b, c
}

func (r *RecordImpl) RoundtripRecord1(a ExportsTestRecordsTestR1) ExportsTestRecordsTestR1 {
Expand Down
13 changes: 4 additions & 9 deletions tests/runtime/records/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ impl Guest for Component {
assert_eq!(roundtrip_flags2(F2::C | F2::E), F2::C | F2::E);

assert_eq!(
roundtrip_flags3(Flag8::B0, Flag16::B1, Flag32::B2, Flag64::B3),
(Flag8::B0, Flag16::B1, Flag32::B2, Flag64::B3)
roundtrip_flags3(Flag8::B0, Flag16::B1, Flag32::B2),
(Flag8::B0, Flag16::B1, Flag32::B2)
);

let r = roundtrip_record1(R1 {
Expand Down Expand Up @@ -65,13 +65,8 @@ impl exports::test::records::test::Guest for Component {
a
}

fn roundtrip_flags3(
a: Flag8,
b: Flag16,
c: Flag32,
d: Flag64,
) -> (Flag8, Flag16, Flag32, Flag64) {
(a, b, c, d)
fn roundtrip_flags3(a: Flag8, b: Flag16, c: Flag32) -> (Flag8, Flag16, Flag32) {
(a, b, c)
}

fn roundtrip_record1(a: R1) -> R1 {
Expand Down
8 changes: 4 additions & 4 deletions tests/runtime/records/wit_exports_test_records_TestImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import wit.worlds.Records.Tuple1;
import wit.worlds.Records.Tuple2;
import wit.worlds.Records.Tuple4;
import wit.worlds.Records.Tuple3;

public class TestImpl {
public static Tuple2<Byte, Short> multipleResults() {
Expand All @@ -21,10 +21,10 @@ public static Test.F2 roundtripFlags2(Test.F2 a) {
return a;
}

public static Tuple4<Test.Flag8, Test.Flag16, Test.Flag32, Test.Flag64> roundtripFlags3
(Test.Flag8 a, Test.Flag16 b, Test.Flag32 c, Test.Flag64 d)
public static Tuple3<Test.Flag8, Test.Flag16, Test.Flag32> roundtripFlags3
(Test.Flag8 a, Test.Flag16 b, Test.Flag32 c)
{
return new Tuple4<>(a, b, c, d);
return new Tuple3<>(a, b, c);
}

public static Test.R1 roundtripRecord1(Test.R1 a) {
Expand Down
Loading

0 comments on commit 46f4514

Please sign in to comment.