interoptopus_csharp 0.16.0-alpha.12

The C# backend for Interoptopus.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#![doc(hidden)]
//! Loads the embedded Tera templates used for C# code generation.

use interoptopus_backends::template::TemplateEngine;

// Include the tar file that was created by build.rs
const ASSET_BYTES: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/templates.tar"));

/// Returns the built-in C# template engine with all embedded `.cs` templates loaded.
#[must_use]
pub fn templates() -> TemplateEngine {
    TemplateEngine::from_bytes(ASSET_BYTES).expect("Assets must exist")
}