Struct interoptopus_backend_csharp::Config
source · pub struct Config {
pub file_header_comment: String,
pub class: String,
pub class_constants: Option<String>,
pub dll_name: String,
pub namespace_mappings: NamespaceMappings,
pub namespace_id: String,
pub visibility_types: CSharpVisibility,
pub unroll_struct_arrays: bool,
pub write_types: WriteTypes,
pub use_unsafe: Unsafe,
pub rename_symbols: bool,
pub debug: bool,
}
Expand description
Configures C# code generation.
Fields§
§file_header_comment: String
The file header, e.g., // (c) My Company
.
class: String
Name of static class for Interop methods, e.g., Interop
.
class_constants: Option<String>
Name of static class for Interop constants, e.g., Interop
. If None then [Self.class] is used
dll_name: String
DLL to load, e.g., my_library
.
namespace_mappings: NamespaceMappings
Maps which namespace id belongs into which FQN (e.g., “common” => “MyCompany.Common”).
namespace_id: String
Namespace ID of this namespace to write (default “”).
visibility_types: CSharpVisibility
Sets the visibility access modifiers for generated types.
unroll_struct_arrays: bool
Whether, say, a x: [u8; 3]
should become 3 x0: u8, ...
instead.
If this is not set, interop generation with arrays in structs will fail. This is a somewhat open issue w.r.t Unity-sans-unsafe support and feedback would be greatly welcome!
write_types: WriteTypes
Which types to write.
use_unsafe: Unsafe
If enabled bindings will use C# unsafe
for increased performance; but will need to be enabled in C# project settings to work.
rename_symbols: bool
Generate functions and field names matching C# conventions, instead of mapping them 1:1 with Rust.
debug: bool
Also generate markers for easier debugging