diff --git a/crates/csharp/src/interface.rs b/crates/csharp/src/interface.rs index 29a3c578d..98beb0b5a 100644 --- a/crates/csharp/src/interface.rs +++ b/crates/csharp/src/interface.rs @@ -38,7 +38,9 @@ impl InterfaceTypeAndFragments { } } -/// FunctionBindgen generates the C# code for calling functions defined in wit +/// InterfaceGenerator generates the C# code for wit interfaces. +/// It produces types by interface in wit and then generates the interop code +/// by calling out to FunctionGenerator pub(crate) struct InterfaceGenerator<'a> { pub(crate) src: String, pub(crate) csharp_interop_src: String, diff --git a/crates/csharp/src/lib.rs b/crates/csharp/src/lib.rs index eee946a9b..06b3dea10 100644 --- a/crates/csharp/src/lib.rs +++ b/crates/csharp/src/lib.rs @@ -48,10 +48,3 @@ pub enum CSharpRuntime { NativeAOT, Mono, } - -/// Indicates if we are generating for functions in an interface or free standing. -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum FunctionLevel { - Interface, - FreeStanding, -} diff --git a/crates/csharp/src/world_generator.rs b/crates/csharp/src/world_generator.rs index ee54ffd19..7a9ef781d 100644 --- a/crates/csharp/src/world_generator.rs +++ b/crates/csharp/src/world_generator.rs @@ -16,6 +16,11 @@ use wit_parser::{ WorldKey, }; +/// CSharp is the world generator for wit files. It coordinates all the generated code. +/// It will call out to interfaceGenerator (and in turn FunctionGenerator) +/// to get the source to put in each file. It will then assemble those files +/// adding boilerplate, c# import decorations, and the source generated by +/// the Interface and Function generators. #[derive(Default)] pub struct CSharp { pub(crate) opts: Opts,