interoptopus_backend_csharp 0.15.0-alpha.20

Generates C# bindings.
1
2
3
4
5
6
7
8
9
10
11
use crate::Interop;
use interoptopus_backend_utils::{Error, IndentWriter, render};

pub fn write_utf8_string(i: &Interop, w: &mut IndentWriter) -> Result<(), Error> {
    if i.write_types.write_interoptopus_globals() {
        let class_name = i.class_constants.as_ref().map_or(&i.class, |name| name);
        let extra_fn_decorations = i.fn_decorations();
        render!(w, "builtins/utf8string.cs", ("class_name", class_name), ("extra_fn_decorations", &extra_fn_decorations))?;
    }
    Ok(())
}