Skip to content

Commit 545dc8d

Browse files
Change class to readonly struct in interface.rs (#1373)
By design the `record` wit type is just a set of fields (https://component-model.bytecodealliance.org/design/wit.html#records) This PR aims to reduce the GC work changing from a `class` to a `readonly struct`.
1 parent 6a1e68a commit 545dc8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/csharp/src/interface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ impl<'a> CoreInterfaceGenerator<'a> for InterfaceGenerator<'a> {
995995
uwrite!(
996996
self.src,
997997
"
998-
{access} class {name} {{
998+
{access} readonly struct {name} {{
999999
{fields}
10001000
10011001
{access} {name}({parameters}) {{

0 commit comments

Comments
 (0)