Skip to content

Commit

Permalink
Add some comments and alittle clean up
Browse files Browse the repository at this point in the history
Signed-off-by: James Sturtevant <[email protected]>
  • Loading branch information
jsturtevant committed Dec 19, 2024
1 parent 079d4a4 commit 09d861b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 3 additions & 1 deletion crates/csharp/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 0 additions & 7 deletions crates/csharp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
5 changes: 5 additions & 0 deletions crates/csharp/src/world_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 09d861b

Please sign in to comment.