Skip to content

Commit a98ed6d

Browse files
authored
C#: make imported functions public by default (bytecodealliance#1027)
This allows them to be called from other assemblies. Signed-off-by: Joel Dice <[email protected]>
1 parent 2114c76 commit a98ed6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/csharp/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,8 @@ impl InterfaceGenerator<'_> {
978978
}
979979
};
980980

981+
let access = self.gen.access_modifier();
982+
981983
let extra_modifiers = extra_modifiers(func, &camel_name);
982984

983985
let interop_camel_name = func.item_name().to_upper_camel_case();
@@ -1106,7 +1108,7 @@ impl InterfaceGenerator<'_> {
11061108
uwrite!(
11071109
target,
11081110
r#"
1109-
internal {extra_modifiers} {modifiers} unsafe {result_type} {camel_name}({params})
1111+
{access} {extra_modifiers} {modifiers} unsafe {result_type} {camel_name}({params})
11101112
{{
11111113
{src}
11121114
//TODO: free alloc handle (interopString) if exists

0 commit comments

Comments
 (0)