From d56a4865d14153e049b22c5e406a8c8e9fcd5e46 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Tue, 21 Apr 2026 17:57:42 -0400 Subject: [PATCH 1/6] feat(csharp): add map type support Dictionary provides a familiar, zero-dependency host representation for WIT maps in C#, and unblocks runtime interop with components that use them without requiring a custom collection type. Signed-off-by: Yordis Prieto --- crates/csharp/src/function.rs | 199 +++++++++++++++++++++++++++++++- crates/csharp/src/interface.rs | 14 ++- crates/test/src/csharp.rs | 1 - tests/runtime/map/runner.cs | 203 +++++++++++++++++++++++++++++++++ tests/runtime/map/test.cs | 118 +++++++++++++++++++ 5 files changed, 526 insertions(+), 9 deletions(-) create mode 100644 tests/runtime/map/runner.cs create mode 100644 tests/runtime/map/test.cs diff --git a/crates/csharp/src/function.rs b/crates/csharp/src/function.rs index 046aa2491..4fbf737c4 100644 --- a/crates/csharp/src/function.rs +++ b/crates/csharp/src/function.rs @@ -1011,6 +1011,7 @@ impl Bindgen for FunctionBindgen<'_, '_> { results: block_results, element: block_element, base, + .. } = self.blocks.pop().unwrap(); assert!(block_results.is_empty()); @@ -1414,6 +1415,7 @@ impl Bindgen for FunctionBindgen<'_, '_> { results: block_results, base, element: _, + .. } = self.blocks.pop().unwrap(); assert!(block_results.is_empty()); @@ -1651,18 +1653,193 @@ impl Bindgen for FunctionBindgen<'_, '_> { self.interface_gen.csharp_gen.needs_async_support = true; } + Instruction::MapLower { + key, + value, + realloc, + } => { + let Block { + body, + results: block_results, + base, + map_key, + map_value, + .. + } = self.blocks.pop().unwrap(); + assert!(block_results.is_empty()); + + let map = &operands[0]; + let entry = self + .interface_gen + .csharp_gen + .sizes + .record([*key, *value].iter().copied()); + let size = entry.size.size_wasm32(); + let align = entry.align.align_wasm32(); + let key_ty = self.interface_gen.type_name_with_qualifier(key, true); + let value_ty = self.interface_gen.type_name_with_qualifier(value, true); + + let index = self.locals.tmp("index"); + let address = self.locals.tmp("address"); + let buffer_size = self.locals.tmp("bufferSize"); + let entry_var = self.locals.tmp("entry"); + + let (array_size, element_type) = + crate::world_generator::dotnet_aligned_array(size, align); + let ret_area = self.locals.tmp("retArea"); + + let array_size = if align > 1 { + format!("{array_size} * {map}.Count + 1") + } else { + format!("{array_size} * {map}.Count") + }; + + match realloc { + None => { + self.needs_cleanup = true; + self.interface_gen.csharp_gen.needs_align_stack_ptr = true; + uwrite!( + self.src, + " + void* {address}; + if (({size} * {map}.Count) < 1024) {{ + var {ret_area} = stackalloc {element_type}[{array_size}]; + {address} = MemoryHelper.AlignStackPtr({ret_area}, {align}); + }} + else + {{ + var {buffer_size} = {size} * (nuint){map}.Count; + {address} = global::System.Runtime.InteropServices.NativeMemory.AlignedAlloc({buffer_size}, {align}); + cleanups.Add(() => global::System.Runtime.InteropServices.NativeMemory.AlignedFree({address})); + }} + " + ); + } + Some(_) => { + uwrite!( + self.src, + " + var {buffer_size} = {size} * (nuint){map}.Count; + void* {address} = global::System.Runtime.InteropServices.NativeMemory.AlignedAlloc({buffer_size}, {align}); + " + ); + } + } + + uwrite!( + self.src, + " + int {index} = 0; + foreach (var {entry_var} in {map}) {{ + {key_ty} {map_key} = {entry_var}.Key; + {value_ty} {map_value} = {entry_var}.Value; + int {base} = (int){address} + ({index} * {size}); + {body} + ++{index}; + }} + " + ); + + results.push(format!("(int){address}")); + results.push(format!("{map}.Count")); + } + + Instruction::MapLift { key, value, .. } => { + let Block { + body, + results: block_results, + base, + .. + } = self.blocks.pop().unwrap(); + let address = &operands[0]; + let length = &operands[1]; + let map = self.locals.tmp("map"); + let key_ty = self.interface_gen.type_name_with_qualifier(key, true); + let value_ty = self.interface_gen.type_name_with_qualifier(value, true); + let entry = self + .interface_gen + .csharp_gen + .sizes + .record([*key, *value].iter().copied()); + let size = entry.size.size_wasm32(); + let index = self.locals.tmp("index"); + + let body_key = &block_results[0]; + let body_value = &block_results[1]; + + uwrite!( + self.src, + " + var {map} = new global::System.Collections.Generic.Dictionary<{key_ty}, {value_ty}>((int){length}); + for (int {index} = 0; {index} < {length}; ++{index}) {{ + nint {base} = {address} + ({index} * {size}); + {body} + {map}[{body_key}] = {body_value}; + }} + + if ({length} > 0) {{ + global::System.Runtime.InteropServices.NativeMemory.Free((void*){address}); + }} + " + ); + + results.push(map); + } + + Instruction::IterMapKey { .. } => { + results.push(self.block_storage.last().unwrap().map_key.clone()) + } + + Instruction::IterMapValue { .. } => { + results.push(self.block_storage.last().unwrap().map_value.clone()) + } + + Instruction::GuestDeallocateMap { key, value } => { + let Block { + body, + results: block_results, + base, + .. + } = self.blocks.pop().unwrap(); + assert!(block_results.is_empty()); + + let address = &operands[0]; + let length = &operands[1]; + let entry = self + .interface_gen + .csharp_gen + .sizes + .record([*key, *value].iter().copied()); + let size = entry.size.size_wasm32(); + + if !body.trim().is_empty() { + let index = self.locals.tmp("index"); + + uwrite!( + self.src, + " + for (int {index} = 0; {index} < {length}; ++{index}) {{ + int {base} = (int){address} + ({index} * {size}); + {body} + }} + " + ); + } + + uwriteln!( + self.src, + r#"global::System.Runtime.InteropServices.NativeMemory.Free((void*){});"#, + operands[0] + ); + } + Instruction::ErrorContextLower { .. } | Instruction::ErrorContextLift { .. } | Instruction::DropHandle { .. } | Instruction::FixedLengthListLift { .. } | Instruction::FixedLengthListLower { .. } | Instruction::FixedLengthListLowerToMemory { .. } - | Instruction::FixedLengthListLiftFromMemory { .. } - | Instruction::MapLower { .. } - | Instruction::MapLift { .. } - | Instruction::IterMapKey { .. } - | Instruction::IterMapValue { .. } - | Instruction::GuestDeallocateMap { .. } => { + | Instruction::FixedLengthListLiftFromMemory { .. } => { dbg!(inst); todo!() } @@ -1738,6 +1915,8 @@ impl Bindgen for FunctionBindgen<'_, '_> { body: mem::take(&mut self.src), element: self.locals.tmp("element"), base: self.locals.tmp("basePtr"), + map_key: self.locals.tmp("mapKey"), + map_value: self.locals.tmp("mapValue"), }); self.is_block = true; @@ -1748,6 +1927,8 @@ impl Bindgen for FunctionBindgen<'_, '_> { body, element, base, + map_key, + map_value, } = self.block_storage.pop().unwrap(); self.blocks.push(Block { @@ -1755,6 +1936,8 @@ impl Bindgen for FunctionBindgen<'_, '_> { results: mem::take(operands), element, base, + map_key, + map_value, }); self.is_block = false; } @@ -1827,6 +2010,8 @@ struct Block { results: Vec, element: String, base: String, + map_key: String, + map_value: String, } struct Fixed { @@ -1838,6 +2023,8 @@ struct BlockStorage { body: String, element: String, base: String, + map_key: String, + map_value: String, } #[derive(Clone)] diff --git a/crates/csharp/src/interface.rs b/crates/csharp/src/interface.rs index af3c36e78..9c98324d5 100644 --- a/crates/csharp/src/interface.rs +++ b/crates/csharp/src/interface.rs @@ -134,6 +134,9 @@ impl InterfaceGenerator<'_> { TypeDefKind::Option(t) => self.type_option(type_id, typedef_name, t, &type_def.docs), TypeDefKind::Record(t) => self.type_record(type_id, typedef_name, t, &type_def.docs), TypeDefKind::List(t) => self.type_list(type_id, typedef_name, t, &type_def.docs), + TypeDefKind::Map(key, value) => { + self.type_map(type_id, typedef_name, key, value, &type_def.docs) + } TypeDefKind::Variant(t) => self.type_variant(type_id, typedef_name, t, &type_def.docs), TypeDefKind::Result(t) => self.type_result(type_id, typedef_name, t, &type_def.docs), TypeDefKind::Handle(_) => { @@ -1174,6 +1177,13 @@ var {async_status_var} = {raw_name}({wasm_params}); }; return format!("StreamReader{generic_type}").to_owned(); } + TypeDefKind::Map(key, value) => { + format!( + "global::System.Collections.Generic.Dictionary<{}, {}>", + self.type_name_with_qualifier(key, qualifier), + self.type_name_with_qualifier(value, qualifier) + ) + } _ => { if let Some(name) = &ty.name { format!( @@ -1749,8 +1759,8 @@ impl<'a> CoreInterfaceGenerator<'a> for InterfaceGenerator<'a> { todo!("named fixed-length list types are not yet supported in the C# backend") } - fn type_map(&mut self, _id: TypeId, _name: &str, _key: &Type, _value: &Type, _docs: &Docs) { - todo!("map types are not yet supported in the C# backend") + fn type_map(&mut self, id: TypeId, _name: &str, _key: &Type, _value: &Type, _docs: &Docs) { + self.type_name(&Type::Id(id)); } fn type_builtin(&mut self, _id: TypeId, _name: &str, _ty: &Type, _docs: &Docs) { diff --git a/crates/test/src/csharp.rs b/crates/test/src/csharp.rs index e95adc3b3..d467bc6ef 100644 --- a/crates/test/src/csharp.rs +++ b/crates/test/src/csharp.rs @@ -50,7 +50,6 @@ impl LanguageMethods for Csharp { | "issue-1433.wit" | "issue-1598.wit" | "named-fixed-length-list.wit" - | "map.wit" ) } diff --git a/tests/runtime/map/runner.cs b/tests/runtime/map/runner.cs new file mode 100644 index 000000000..d12f93a39 --- /dev/null +++ b/tests/runtime/map/runner.cs @@ -0,0 +1,203 @@ +//@ wasmtime-flags = '-Wcomponent-model-map' + +using System.Diagnostics; +using RunnerWorld.wit.Imports.test.maps; + +namespace RunnerWorld; + +public class RunnerWorldExportsImpl : IRunnerWorldExports +{ + public static void Run() + { + TestNamedRoundtrip(); + TestBytesRoundtrip(); + TestEmptyRoundtrip(); + TestOptionRoundtrip(); + TestRecordRoundtrip(); + TestInlineRoundtrip(); + TestLargeRoundtrip(); + TestMultiParamRoundtrip(); + TestNestedRoundtrip(); + TestVariantRoundtrip(); + TestResultRoundtrip(); + TestTupleRoundtrip(); + TestSingleEntryRoundtrip(); + } + + static void TestNamedRoundtrip() + { + var input = new Dictionary + { + [1] = "uno", + [2] = "two", + }; + var ids = IToTestImports.NamedRoundtrip(input); + Debug.Assert(ids.Count == 2); + Debug.Assert(ids["uno"] == 1); + Debug.Assert(ids["two"] == 2); + } + + static void TestBytesRoundtrip() + { + var input = new Dictionary + { + ["hello"] = System.Text.Encoding.UTF8.GetBytes("world"), + ["bin"] = new byte[] { 0, 1, 2 }, + }; + var result = IToTestImports.BytesRoundtrip(input); + Debug.Assert(result.Count == 2); + Debug.Assert(result["hello"].SequenceEqual(System.Text.Encoding.UTF8.GetBytes("world"))); + Debug.Assert(result["bin"].SequenceEqual(new byte[] { 0, 1, 2 })); + } + + static void TestEmptyRoundtrip() + { + var empty = new Dictionary(); + var result = IToTestImports.EmptyRoundtrip(empty); + Debug.Assert(result.Count == 0); + } + + static void TestOptionRoundtrip() + { + var input = new Dictionary + { + ["some"] = 42, + ["none"] = null, + }; + var result = IToTestImports.OptionRoundtrip(input); + Debug.Assert(result.Count == 2); + Debug.Assert(result["some"] == 42); + Debug.Assert(result["none"] == null); + } + + static void TestRecordRoundtrip() + { + var values = new Dictionary + { + [10] = "ten", + [20] = "twenty", + }; + var entry = new IToTestImports.LabeledEntry("test-label", values); + var result = IToTestImports.RecordRoundtrip(entry); + Debug.Assert(result.label == "test-label"); + Debug.Assert(result.values.Count == 2); + Debug.Assert(result.values[10] == "ten"); + Debug.Assert(result.values[20] == "twenty"); + } + + static void TestInlineRoundtrip() + { + var input = new Dictionary + { + [1] = "one", + [2] = "two", + }; + var result = IToTestImports.InlineRoundtrip(input); + Debug.Assert(result.Count == 2); + Debug.Assert(result["one"] == 1); + Debug.Assert(result["two"] == 2); + } + + static void TestLargeRoundtrip() + { + var input = new Dictionary(); + for (uint i = 0; i < 100; i++) + { + input[i] = $"value-{i}"; + } + var result = IToTestImports.LargeRoundtrip(input); + Debug.Assert(result.Count == 100); + for (uint i = 0; i < 100; i++) + { + Debug.Assert(result[i] == $"value-{i}"); + } + } + + static void TestMultiParamRoundtrip() + { + var names = new Dictionary + { + [1] = "one", + [2] = "two", + }; + var bytes = new Dictionary + { + ["key"] = new byte[] { 42 }, + }; + var (ids, bytesOut) = IToTestImports.MultiParamRoundtrip(names, bytes); + Debug.Assert(ids.Count == 2); + Debug.Assert(ids["one"] == 1); + Debug.Assert(ids["two"] == 2); + Debug.Assert(bytesOut.Count == 1); + Debug.Assert(bytesOut["key"].SequenceEqual(new byte[] { 42 })); + } + + static void TestNestedRoundtrip() + { + var innerA = new Dictionary + { + [1] = "one", + [2] = "two", + }; + var innerB = new Dictionary + { + [10] = "ten", + }; + var outer = new Dictionary> + { + ["group-a"] = innerA, + ["group-b"] = innerB, + }; + var result = IToTestImports.NestedRoundtrip(outer); + Debug.Assert(result.Count == 2); + Debug.Assert(result["group-a"][1] == "one"); + Debug.Assert(result["group-a"][2] == "two"); + Debug.Assert(result["group-b"][10] == "ten"); + } + + static void TestVariantRoundtrip() + { + var map = new Dictionary { [1] = "one" }; + var asMap = IToTestImports.VariantRoundtrip(IToTestImports.MapOrString.AsMap(map)); + Debug.Assert(asMap.Tag == IToTestImports.MapOrString.Tags.AsMap); + Debug.Assert(asMap.AsAsMap[1] == "one"); + + var asStr = IToTestImports.VariantRoundtrip(IToTestImports.MapOrString.AsString("hello")); + Debug.Assert(asStr.Tag == IToTestImports.MapOrString.Tags.AsString); + Debug.Assert(asStr.AsAsString == "hello"); + } + + static void TestResultRoundtrip() + { + var map = new Dictionary { [5] = "five" }; + var ok = IToTestImports.ResultRoundtrip(Result, string>.Ok(map)); + Debug.Assert(ok[5] == "five"); + + try + { + IToTestImports.ResultRoundtrip(Result, string>.Err("bad input")); + Debug.Assert(false, "expected exception"); + } + catch (WitException e) + { + Debug.Assert(e.TypedValue == "bad input"); + } + } + + static void TestTupleRoundtrip() + { + var map = new Dictionary { [7] = "seven" }; + var (resultMap, resultNum) = IToTestImports.TupleRoundtrip((map, 42UL)); + Debug.Assert(resultMap.Count == 1); + Debug.Assert(resultMap[7] == "seven"); + Debug.Assert(resultNum == 42UL); + } + + static void TestSingleEntryRoundtrip() + { + var input = new Dictionary { [99] = "ninety-nine" }; + var result = IToTestImports.SingleEntryRoundtrip(input); + Debug.Assert(result.Count == 1); + Debug.Assert(result[99] == "ninety-nine"); + } +} diff --git a/tests/runtime/map/test.cs b/tests/runtime/map/test.cs new file mode 100644 index 000000000..cd735924b --- /dev/null +++ b/tests/runtime/map/test.cs @@ -0,0 +1,118 @@ +//@ wasmtime-flags = '-Wcomponent-model-map' + +using System.Diagnostics; +using TestWorld; + +namespace TestWorld.wit.Exports.test.maps +{ + public class ToTestExportsImpl : IToTestExports + { + public static Dictionary NamedRoundtrip(Dictionary a) + { + Debug.Assert(a[1] == "uno"); + Debug.Assert(a[2] == "two"); + var result = new Dictionary(); + foreach (var entry in a) + { + result[entry.Value] = entry.Key; + } + return result; + } + + public static Dictionary BytesRoundtrip(Dictionary a) + { + Debug.Assert(a["hello"].SequenceEqual(System.Text.Encoding.UTF8.GetBytes("world"))); + Debug.Assert(a["bin"].SequenceEqual(new byte[] { 0, 1, 2 })); + return a; + } + + public static Dictionary EmptyRoundtrip(Dictionary a) + { + Debug.Assert(a.Count == 0); + return a; + } + + public static Dictionary OptionRoundtrip(Dictionary a) + { + Debug.Assert(a["some"] == 42); + Debug.Assert(a["none"] == null); + return a; + } + + public static IToTestExports.LabeledEntry RecordRoundtrip(IToTestExports.LabeledEntry a) + { + Debug.Assert(a.label == "test-label"); + Debug.Assert(a.values.Count == 2); + Debug.Assert(a.values[10] == "ten"); + Debug.Assert(a.values[20] == "twenty"); + return a; + } + + public static Dictionary InlineRoundtrip(Dictionary a) + { + var result = new Dictionary(); + foreach (var entry in a) + { + result[entry.Value] = entry.Key; + } + return result; + } + + public static Dictionary LargeRoundtrip(Dictionary a) + { + return a; + } + + public static (Dictionary, Dictionary) MultiParamRoundtrip( + Dictionary a, + Dictionary b) + { + Debug.Assert(a.Count == 2); + Debug.Assert(b.Count == 1); + var ids = new Dictionary(); + foreach (var entry in a) + { + ids[entry.Value] = entry.Key; + } + return (ids, b); + } + + public static Dictionary> NestedRoundtrip( + Dictionary> a) + { + Debug.Assert(a.Count == 2); + Debug.Assert(a["group-a"][1] == "one"); + Debug.Assert(a["group-a"][2] == "two"); + Debug.Assert(a["group-b"][10] == "ten"); + return a; + } + + public static IToTestExports.MapOrString VariantRoundtrip(IToTestExports.MapOrString a) + { + return a; + } + + public static Dictionary ResultRoundtrip(Result, string> a) + { + if (a.IsOk) + { + return a.AsOk; + } + throw new WitException(a.AsErr, 0); + } + + public static (Dictionary, ulong) TupleRoundtrip((Dictionary, ulong) a) + { + Debug.Assert(a.Item1.Count == 1); + Debug.Assert(a.Item1[7] == "seven"); + Debug.Assert(a.Item2 == 42UL); + return a; + } + + public static Dictionary SingleEntryRoundtrip(Dictionary a) + { + Debug.Assert(a.Count == 1); + return a; + } + } +} From 1388017d0b4a7878e0ee0f994db3abb4003c83dc Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Wed, 22 Apr 2026 00:47:01 -0400 Subject: [PATCH 2/6] fix(csharp): emit component_type.o for linker The `map` WIT syntax is a gated feature that the default wit-parser used by wasm-component-ld's `--component-type` flag cannot parse, so the text-based component type path was blocking any world that uses maps. Switching to the same object-file approach already used by the C and C++ backends lets the component type flow through as a custom section without round-tripping through the text parser. Signed-off-by: Yordis Prieto --- Cargo.lock | 349 +++++++++++++++++---------- crates/csharp/Cargo.toml | 1 + crates/csharp/src/csproj.rs | 2 +- crates/csharp/src/world_generator.rs | 12 + 4 files changed, 241 insertions(+), 123 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 018b2d15e..ac799bf25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,6 +35,21 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse 0.2.7", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + [[package]] name = "anstream" version = "1.0.0" @@ -42,7 +57,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", - "anstyle-parse", + "anstyle-parse 1.0.0", "anstyle-query", "anstyle-wincon", "colorchoice", @@ -52,9 +67,18 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.14" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] [[package]] name = "anstyle-parse" @@ -71,7 +95,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -82,7 +106,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -123,15 +147,15 @@ checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "bumpalo" -version = "3.20.2" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "bytes" -version = "1.11.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "cfg-if" @@ -155,7 +179,7 @@ version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ - "anstream", + "anstream 1.0.0", "anstyle", "clap_lex", "strsim", @@ -190,9 +214,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.5" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "crc32fast" @@ -225,9 +249,9 @@ dependencies = [ [[package]] name = "env_filter" -version = "1.0.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" dependencies = [ "log", "regex", @@ -235,11 +259,11 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.10" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ - "anstream", + "anstream 0.6.21", "anstyle", "env_filter", "jiff", @@ -259,7 +283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] @@ -276,9 +300,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.1.9" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", "miniz_oxide", @@ -313,9 +337,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -328,9 +352,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -338,15 +362,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -355,15 +379,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -372,21 +396,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -396,6 +420,7 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", + "pin-utils", "slab", ] @@ -447,13 +472,12 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "icu_collections" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", - "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -461,9 +485,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -474,9 +498,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -488,15 +512,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.2.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ "icu_collections", "icu_locale_core", @@ -508,15 +532,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.2.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", @@ -574,15 +598,15 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itoa" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jiff" -version = "0.2.23" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" +checksum = "e67e8da4c49d6d9909fe03361f9b620f58898859f5c7aded68351e85e71ecf50" dependencies = [ "jiff-static", "log", @@ -593,9 +617,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.23" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" +checksum = "e0c84ee7f197eca9a86c6fd6cb771e55eb991632f15f2bc3ca6ec838929e6e78" dependencies = [ "proc-macro2", "quote", @@ -616,17 +640,17 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.185" +version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libtest-mimic" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e6ba06f0ade6e504aff834d7c34298e5155c6baca353cc6a4aaff2f9fd7f33" +checksum = "5297962ef19edda4ce33aaa484386e0a5b3d7f2f4e037cbeee00503ef6b29d33" dependencies = [ - "anstream", + "anstream 0.6.21", "anstyle", "clap", "escape8259", @@ -634,15 +658,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "log" @@ -696,9 +720,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.8.0" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "miette" @@ -763,30 +787,36 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.17" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "portable-atomic" -version = "1.13.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" +checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" [[package]] name = "portable-atomic-util" -version = "0.2.7" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" dependencies = [ "portable-atomic", ] [[package]] name = "potential_utf" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ "zerovec", ] @@ -839,9 +869,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.3" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -851,9 +881,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.14" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -862,9 +892,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.10" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "rustc-std-workspace-alloc" @@ -880,22 +910,22 @@ checksum = "aa9c45b374136f52f2d6311062c7146bff20fec063c3f5d46a410bd937746955" [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.61.2", ] [[package]] name = "semver" -version = "1.0.28" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" dependencies = [ "serde", "serde_core", @@ -966,15 +996,15 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "slab" -version = "0.4.12" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" @@ -1027,12 +1057,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.4.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874" +checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ "rustix", - "windows-sys", + "windows-sys 0.60.2", ] [[package]] @@ -1068,9 +1098,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", @@ -1129,9 +1159,9 @@ checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-ident" -version = "1.0.24" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-width" @@ -1153,9 +1183,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "url" -version = "2.5.8" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", @@ -1366,6 +1396,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.61.2" @@ -1375,11 +1414,76 @@ dependencies = [ "windows-link", ] +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winnow" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" +checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" [[package]] name = "wit-bindgen" @@ -1461,6 +1565,7 @@ dependencies = [ "heck", "indexmap", "wasm-metadata 0.247.0", + "wit-bindgen-c", "wit-bindgen-core", "wit-component", "wit-parser", @@ -1602,9 +1707,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "yaml-rust2" @@ -1619,9 +1724,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -1630,9 +1735,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", @@ -1662,18 +1767,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", @@ -1683,9 +1788,9 @@ dependencies = [ [[package]] name = "zerotrie" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", "yoke", @@ -1694,9 +1799,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.6" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", @@ -1705,9 +1810,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", @@ -1716,6 +1821,6 @@ dependencies = [ [[package]] name = "zmij" -version = "1.0.21" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8" diff --git a/crates/csharp/Cargo.toml b/crates/csharp/Cargo.toml index 47dfa7d5d..8b1b56022 100644 --- a/crates/csharp/Cargo.toml +++ b/crates/csharp/Cargo.toml @@ -21,6 +21,7 @@ test = false [dependencies] wit-bindgen-core = { workspace = true } +wit-bindgen-c = { workspace = true } wit-component = { workspace = true } wit-parser = { workspace = true } wasm-metadata = { workspace = true } diff --git a/crates/csharp/src/csproj.rs b/crates/csharp/src/csproj.rs index 76b8c5d57..e33d4f8a7 100644 --- a/crates/csharp/src/csproj.rs +++ b/crates/csharp/src/csproj.rs @@ -94,7 +94,7 @@ impl CSProjectLLVMBuilder { - + " ); diff --git a/crates/csharp/src/world_generator.rs b/crates/csharp/src/world_generator.rs index 21f6a52b9..6ee6b6758 100644 --- a/crates/csharp/src/world_generator.rs +++ b/crates/csharp/src/world_generator.rs @@ -856,6 +856,18 @@ impl WorldGenerator for CSharp { ); } + files.push( + &format!("{world_namespace}_component_type.o"), + wit_bindgen_c::component_type_object::object( + resolve, + id, + &world.name, + self.opts.string_encoding, + None, + )? + .as_slice(), + ); + // TODO: remove when we switch to dotnet 9 let mut wasm_import_linakge_src = String::new(); From af8b7cb7f79b2ad37d29929567e520a8e8442721 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Wed, 22 Apr 2026 03:23:31 -0400 Subject: [PATCH 3/6] fix(csharp): embed component type via binary WIT package Earlier attempt used `NativeFileReference` on the component-type object, but NativeAOT's LLVM pipeline did not propagate the custom section into the final module, leaving every C# component import unresolvable. Using a binary-encoded WIT package (which `wasm-component-ld --component-type` accepts alongside the text form) preserves the existing linker path and also lets map round-trip since decoding skips the default WIT parser that rejects gated features. Signed-off-by: Yordis Prieto --- crates/csharp/src/csproj.rs | 2 +- crates/csharp/src/world_generator.rs | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/crates/csharp/src/csproj.rs b/crates/csharp/src/csproj.rs index e33d4f8a7..3347fe69d 100644 --- a/crates/csharp/src/csproj.rs +++ b/crates/csharp/src/csproj.rs @@ -94,7 +94,7 @@ impl CSProjectLLVMBuilder { - + " ); diff --git a/crates/csharp/src/world_generator.rs b/crates/csharp/src/world_generator.rs index 6ee6b6758..9986130a5 100644 --- a/crates/csharp/src/world_generator.rs +++ b/crates/csharp/src/world_generator.rs @@ -9,7 +9,6 @@ use std::fmt::Write; use std::ops::Deref; use std::{iter, mem}; use wit_bindgen_core::{Direction, Files, InterfaceGenerator as _, Types, WorldGenerator, uwrite}; -use wit_component::WitPrinter; use wit_parser::abi::WasmType; use wit_parser::{ Function, InterfaceId, Resolve, SizeAlign, Type, TypeDefKind, TypeId, TypeOwner, WorldId, @@ -839,20 +838,9 @@ impl WorldGenerator for CSharp { )?; let pkg = resolve.worlds[world].package.unwrap(); - let mut printer = WitPrinter::default(); - printer.emit_docs(false); - printer.print( - &resolve, - pkg, - &resolve - .packages - .iter() - .filter_map(|(id, _)| if id == pkg { None } else { Some(id) }) - .collect::>(), - )?; files.push( - &format!("{world_namespace}_component_type.wit"), - String::from(printer.output).as_bytes(), + &format!("{world_namespace}_component_type.wasm"), + wit_component::encode(&resolve, pkg)?.as_slice(), ); } From f97c9d285bada379cec9e7423c245db2490265a8 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Wed, 22 Apr 2026 03:54:22 -0400 Subject: [PATCH 4/6] fix(csharp): force-link component-type object for NativeAOT Signed-off-by: Yordis Prieto --- crates/csharp/src/csproj.rs | 3 ++- crates/csharp/src/world_generator.rs | 40 +++++++--------------------- 2 files changed, 11 insertions(+), 32 deletions(-) diff --git a/crates/csharp/src/csproj.rs b/crates/csharp/src/csproj.rs index 3347fe69d..d01bcba03 100644 --- a/crates/csharp/src/csproj.rs +++ b/crates/csharp/src/csproj.rs @@ -94,7 +94,8 @@ impl CSProjectLLVMBuilder { - + + " ); diff --git a/crates/csharp/src/world_generator.rs b/crates/csharp/src/world_generator.rs index 9986130a5..ae92361fe 100644 --- a/crates/csharp/src/world_generator.rs +++ b/crates/csharp/src/world_generator.rs @@ -813,37 +813,15 @@ impl WorldGenerator for CSharp { ); } - // For the time being, we generate both a .wit file and a .o file to - // represent the component type. Newer releases of the .NET runtime - // will be able to use the former, but older ones will need the - // latter. - // - // TODO: stop generating the .o file once a new-enough release is - // available for us to test using only the .wit file. - - { - // When generating a WIT file, we first round-trip through the - // binary encoding. This has the effect of flattening any - // `include`d worlds into the specified world and excluding - // unrelated worlds, ensuring the output WIT contains no extra - // information beyond what the binary representation contains. - // - // This is important because including more than one world in - // the output would make it ambigious, and since this file is - // intended to be used non-interactively at link time, the - // linker will have no additional information to resolve such - // ambiguity. - let (resolve, world) = wit_parser::decoding::decode_world( - &wit_component::metadata::encode(resolve, id, self.opts.string_encoding, None)?, - )?; - let pkg = resolve.worlds[world].package.unwrap(); - - files.push( - &format!("{world_namespace}_component_type.wasm"), - wit_component::encode(&resolve, pkg)?.as_slice(), - ); - } - + // Embed component-type metadata as a wasm object file with a + // `component-type:` custom section and a linking symbol. + // The symbol is force-linked via a `--undefined` linker arg in the + // generated csproj so the object is retained after GC, which makes + // the custom section available to `wasm-component-ld` for + // component synthesis. This path is independent of the bundled + // `wasm-component-ld`'s WIT parser and therefore works for WIT + // features (e.g. `map`) that the bundled version does not yet + // understand when fed a textual or binary WIT package. files.push( &format!("{world_namespace}_component_type.o"), wit_bindgen_c::component_type_object::object( From 00b67da3aa1ec320e0704332183da88370c83fb8 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Wed, 22 Apr 2026 04:16:38 -0400 Subject: [PATCH 5/6] fix(csharp): defer map runtime tests until toolchain support lands Signed-off-by: Yordis Prieto --- crates/csharp/src/csproj.rs | 3 +- crates/csharp/src/world_generator.rs | 52 +++++-- tests/runtime/map/runner.cs | 203 --------------------------- tests/runtime/map/test.cs | 118 ---------------- 4 files changed, 44 insertions(+), 332 deletions(-) delete mode 100644 tests/runtime/map/runner.cs delete mode 100644 tests/runtime/map/test.cs diff --git a/crates/csharp/src/csproj.rs b/crates/csharp/src/csproj.rs index d01bcba03..76b8c5d57 100644 --- a/crates/csharp/src/csproj.rs +++ b/crates/csharp/src/csproj.rs @@ -94,8 +94,7 @@ impl CSProjectLLVMBuilder { - - + " ); diff --git a/crates/csharp/src/world_generator.rs b/crates/csharp/src/world_generator.rs index ae92361fe..6ee6b6758 100644 --- a/crates/csharp/src/world_generator.rs +++ b/crates/csharp/src/world_generator.rs @@ -9,6 +9,7 @@ use std::fmt::Write; use std::ops::Deref; use std::{iter, mem}; use wit_bindgen_core::{Direction, Files, InterfaceGenerator as _, Types, WorldGenerator, uwrite}; +use wit_component::WitPrinter; use wit_parser::abi::WasmType; use wit_parser::{ Function, InterfaceId, Resolve, SizeAlign, Type, TypeDefKind, TypeId, TypeOwner, WorldId, @@ -813,15 +814,48 @@ impl WorldGenerator for CSharp { ); } - // Embed component-type metadata as a wasm object file with a - // `component-type:` custom section and a linking symbol. - // The symbol is force-linked via a `--undefined` linker arg in the - // generated csproj so the object is retained after GC, which makes - // the custom section available to `wasm-component-ld` for - // component synthesis. This path is independent of the bundled - // `wasm-component-ld`'s WIT parser and therefore works for WIT - // features (e.g. `map`) that the bundled version does not yet - // understand when fed a textual or binary WIT package. + // For the time being, we generate both a .wit file and a .o file to + // represent the component type. Newer releases of the .NET runtime + // will be able to use the former, but older ones will need the + // latter. + // + // TODO: stop generating the .o file once a new-enough release is + // available for us to test using only the .wit file. + + { + // When generating a WIT file, we first round-trip through the + // binary encoding. This has the effect of flattening any + // `include`d worlds into the specified world and excluding + // unrelated worlds, ensuring the output WIT contains no extra + // information beyond what the binary representation contains. + // + // This is important because including more than one world in + // the output would make it ambigious, and since this file is + // intended to be used non-interactively at link time, the + // linker will have no additional information to resolve such + // ambiguity. + let (resolve, world) = wit_parser::decoding::decode_world( + &wit_component::metadata::encode(resolve, id, self.opts.string_encoding, None)?, + )?; + let pkg = resolve.worlds[world].package.unwrap(); + + let mut printer = WitPrinter::default(); + printer.emit_docs(false); + printer.print( + &resolve, + pkg, + &resolve + .packages + .iter() + .filter_map(|(id, _)| if id == pkg { None } else { Some(id) }) + .collect::>(), + )?; + files.push( + &format!("{world_namespace}_component_type.wit"), + String::from(printer.output).as_bytes(), + ); + } + files.push( &format!("{world_namespace}_component_type.o"), wit_bindgen_c::component_type_object::object( diff --git a/tests/runtime/map/runner.cs b/tests/runtime/map/runner.cs deleted file mode 100644 index d12f93a39..000000000 --- a/tests/runtime/map/runner.cs +++ /dev/null @@ -1,203 +0,0 @@ -//@ wasmtime-flags = '-Wcomponent-model-map' - -using System.Diagnostics; -using RunnerWorld.wit.Imports.test.maps; - -namespace RunnerWorld; - -public class RunnerWorldExportsImpl : IRunnerWorldExports -{ - public static void Run() - { - TestNamedRoundtrip(); - TestBytesRoundtrip(); - TestEmptyRoundtrip(); - TestOptionRoundtrip(); - TestRecordRoundtrip(); - TestInlineRoundtrip(); - TestLargeRoundtrip(); - TestMultiParamRoundtrip(); - TestNestedRoundtrip(); - TestVariantRoundtrip(); - TestResultRoundtrip(); - TestTupleRoundtrip(); - TestSingleEntryRoundtrip(); - } - - static void TestNamedRoundtrip() - { - var input = new Dictionary - { - [1] = "uno", - [2] = "two", - }; - var ids = IToTestImports.NamedRoundtrip(input); - Debug.Assert(ids.Count == 2); - Debug.Assert(ids["uno"] == 1); - Debug.Assert(ids["two"] == 2); - } - - static void TestBytesRoundtrip() - { - var input = new Dictionary - { - ["hello"] = System.Text.Encoding.UTF8.GetBytes("world"), - ["bin"] = new byte[] { 0, 1, 2 }, - }; - var result = IToTestImports.BytesRoundtrip(input); - Debug.Assert(result.Count == 2); - Debug.Assert(result["hello"].SequenceEqual(System.Text.Encoding.UTF8.GetBytes("world"))); - Debug.Assert(result["bin"].SequenceEqual(new byte[] { 0, 1, 2 })); - } - - static void TestEmptyRoundtrip() - { - var empty = new Dictionary(); - var result = IToTestImports.EmptyRoundtrip(empty); - Debug.Assert(result.Count == 0); - } - - static void TestOptionRoundtrip() - { - var input = new Dictionary - { - ["some"] = 42, - ["none"] = null, - }; - var result = IToTestImports.OptionRoundtrip(input); - Debug.Assert(result.Count == 2); - Debug.Assert(result["some"] == 42); - Debug.Assert(result["none"] == null); - } - - static void TestRecordRoundtrip() - { - var values = new Dictionary - { - [10] = "ten", - [20] = "twenty", - }; - var entry = new IToTestImports.LabeledEntry("test-label", values); - var result = IToTestImports.RecordRoundtrip(entry); - Debug.Assert(result.label == "test-label"); - Debug.Assert(result.values.Count == 2); - Debug.Assert(result.values[10] == "ten"); - Debug.Assert(result.values[20] == "twenty"); - } - - static void TestInlineRoundtrip() - { - var input = new Dictionary - { - [1] = "one", - [2] = "two", - }; - var result = IToTestImports.InlineRoundtrip(input); - Debug.Assert(result.Count == 2); - Debug.Assert(result["one"] == 1); - Debug.Assert(result["two"] == 2); - } - - static void TestLargeRoundtrip() - { - var input = new Dictionary(); - for (uint i = 0; i < 100; i++) - { - input[i] = $"value-{i}"; - } - var result = IToTestImports.LargeRoundtrip(input); - Debug.Assert(result.Count == 100); - for (uint i = 0; i < 100; i++) - { - Debug.Assert(result[i] == $"value-{i}"); - } - } - - static void TestMultiParamRoundtrip() - { - var names = new Dictionary - { - [1] = "one", - [2] = "two", - }; - var bytes = new Dictionary - { - ["key"] = new byte[] { 42 }, - }; - var (ids, bytesOut) = IToTestImports.MultiParamRoundtrip(names, bytes); - Debug.Assert(ids.Count == 2); - Debug.Assert(ids["one"] == 1); - Debug.Assert(ids["two"] == 2); - Debug.Assert(bytesOut.Count == 1); - Debug.Assert(bytesOut["key"].SequenceEqual(new byte[] { 42 })); - } - - static void TestNestedRoundtrip() - { - var innerA = new Dictionary - { - [1] = "one", - [2] = "two", - }; - var innerB = new Dictionary - { - [10] = "ten", - }; - var outer = new Dictionary> - { - ["group-a"] = innerA, - ["group-b"] = innerB, - }; - var result = IToTestImports.NestedRoundtrip(outer); - Debug.Assert(result.Count == 2); - Debug.Assert(result["group-a"][1] == "one"); - Debug.Assert(result["group-a"][2] == "two"); - Debug.Assert(result["group-b"][10] == "ten"); - } - - static void TestVariantRoundtrip() - { - var map = new Dictionary { [1] = "one" }; - var asMap = IToTestImports.VariantRoundtrip(IToTestImports.MapOrString.AsMap(map)); - Debug.Assert(asMap.Tag == IToTestImports.MapOrString.Tags.AsMap); - Debug.Assert(asMap.AsAsMap[1] == "one"); - - var asStr = IToTestImports.VariantRoundtrip(IToTestImports.MapOrString.AsString("hello")); - Debug.Assert(asStr.Tag == IToTestImports.MapOrString.Tags.AsString); - Debug.Assert(asStr.AsAsString == "hello"); - } - - static void TestResultRoundtrip() - { - var map = new Dictionary { [5] = "five" }; - var ok = IToTestImports.ResultRoundtrip(Result, string>.Ok(map)); - Debug.Assert(ok[5] == "five"); - - try - { - IToTestImports.ResultRoundtrip(Result, string>.Err("bad input")); - Debug.Assert(false, "expected exception"); - } - catch (WitException e) - { - Debug.Assert(e.TypedValue == "bad input"); - } - } - - static void TestTupleRoundtrip() - { - var map = new Dictionary { [7] = "seven" }; - var (resultMap, resultNum) = IToTestImports.TupleRoundtrip((map, 42UL)); - Debug.Assert(resultMap.Count == 1); - Debug.Assert(resultMap[7] == "seven"); - Debug.Assert(resultNum == 42UL); - } - - static void TestSingleEntryRoundtrip() - { - var input = new Dictionary { [99] = "ninety-nine" }; - var result = IToTestImports.SingleEntryRoundtrip(input); - Debug.Assert(result.Count == 1); - Debug.Assert(result[99] == "ninety-nine"); - } -} diff --git a/tests/runtime/map/test.cs b/tests/runtime/map/test.cs deleted file mode 100644 index cd735924b..000000000 --- a/tests/runtime/map/test.cs +++ /dev/null @@ -1,118 +0,0 @@ -//@ wasmtime-flags = '-Wcomponent-model-map' - -using System.Diagnostics; -using TestWorld; - -namespace TestWorld.wit.Exports.test.maps -{ - public class ToTestExportsImpl : IToTestExports - { - public static Dictionary NamedRoundtrip(Dictionary a) - { - Debug.Assert(a[1] == "uno"); - Debug.Assert(a[2] == "two"); - var result = new Dictionary(); - foreach (var entry in a) - { - result[entry.Value] = entry.Key; - } - return result; - } - - public static Dictionary BytesRoundtrip(Dictionary a) - { - Debug.Assert(a["hello"].SequenceEqual(System.Text.Encoding.UTF8.GetBytes("world"))); - Debug.Assert(a["bin"].SequenceEqual(new byte[] { 0, 1, 2 })); - return a; - } - - public static Dictionary EmptyRoundtrip(Dictionary a) - { - Debug.Assert(a.Count == 0); - return a; - } - - public static Dictionary OptionRoundtrip(Dictionary a) - { - Debug.Assert(a["some"] == 42); - Debug.Assert(a["none"] == null); - return a; - } - - public static IToTestExports.LabeledEntry RecordRoundtrip(IToTestExports.LabeledEntry a) - { - Debug.Assert(a.label == "test-label"); - Debug.Assert(a.values.Count == 2); - Debug.Assert(a.values[10] == "ten"); - Debug.Assert(a.values[20] == "twenty"); - return a; - } - - public static Dictionary InlineRoundtrip(Dictionary a) - { - var result = new Dictionary(); - foreach (var entry in a) - { - result[entry.Value] = entry.Key; - } - return result; - } - - public static Dictionary LargeRoundtrip(Dictionary a) - { - return a; - } - - public static (Dictionary, Dictionary) MultiParamRoundtrip( - Dictionary a, - Dictionary b) - { - Debug.Assert(a.Count == 2); - Debug.Assert(b.Count == 1); - var ids = new Dictionary(); - foreach (var entry in a) - { - ids[entry.Value] = entry.Key; - } - return (ids, b); - } - - public static Dictionary> NestedRoundtrip( - Dictionary> a) - { - Debug.Assert(a.Count == 2); - Debug.Assert(a["group-a"][1] == "one"); - Debug.Assert(a["group-a"][2] == "two"); - Debug.Assert(a["group-b"][10] == "ten"); - return a; - } - - public static IToTestExports.MapOrString VariantRoundtrip(IToTestExports.MapOrString a) - { - return a; - } - - public static Dictionary ResultRoundtrip(Result, string> a) - { - if (a.IsOk) - { - return a.AsOk; - } - throw new WitException(a.AsErr, 0); - } - - public static (Dictionary, ulong) TupleRoundtrip((Dictionary, ulong) a) - { - Debug.Assert(a.Item1.Count == 1); - Debug.Assert(a.Item1[7] == "seven"); - Debug.Assert(a.Item2 == 42UL); - return a; - } - - public static Dictionary SingleEntryRoundtrip(Dictionary a) - { - Debug.Assert(a.Count == 1); - return a; - } - } -} From 2b1654f7c9379c8e48b9d08d5c67e8b313a03636 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Wed, 22 Apr 2026 23:17:41 -0400 Subject: [PATCH 6/6] refactor(csharp): drop unused component-type object plumbing Signed-off-by: Yordis Prieto --- Cargo.lock | 1 - crates/csharp/Cargo.toml | 1 - crates/csharp/src/world_generator.rs | 20 -------------------- 3 files changed, 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac799bf25..0837f0c37 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1565,7 +1565,6 @@ dependencies = [ "heck", "indexmap", "wasm-metadata 0.247.0", - "wit-bindgen-c", "wit-bindgen-core", "wit-component", "wit-parser", diff --git a/crates/csharp/Cargo.toml b/crates/csharp/Cargo.toml index 8b1b56022..47dfa7d5d 100644 --- a/crates/csharp/Cargo.toml +++ b/crates/csharp/Cargo.toml @@ -21,7 +21,6 @@ test = false [dependencies] wit-bindgen-core = { workspace = true } -wit-bindgen-c = { workspace = true } wit-component = { workspace = true } wit-parser = { workspace = true } wasm-metadata = { workspace = true } diff --git a/crates/csharp/src/world_generator.rs b/crates/csharp/src/world_generator.rs index 6ee6b6758..95265d341 100644 --- a/crates/csharp/src/world_generator.rs +++ b/crates/csharp/src/world_generator.rs @@ -814,14 +814,6 @@ impl WorldGenerator for CSharp { ); } - // For the time being, we generate both a .wit file and a .o file to - // represent the component type. Newer releases of the .NET runtime - // will be able to use the former, but older ones will need the - // latter. - // - // TODO: stop generating the .o file once a new-enough release is - // available for us to test using only the .wit file. - { // When generating a WIT file, we first round-trip through the // binary encoding. This has the effect of flattening any @@ -856,18 +848,6 @@ impl WorldGenerator for CSharp { ); } - files.push( - &format!("{world_namespace}_component_type.o"), - wit_bindgen_c::component_type_object::object( - resolve, - id, - &world.name, - self.opts.string_encoding, - None, - )? - .as_slice(), - ); - // TODO: remove when we switch to dotnet 9 let mut wasm_import_linakge_src = String::new();