<div id="header" align="center">
<b>[include_tt]</b>
(Macros for ultra-flexible injection of compiler trees, literals, or binary data into Rust syntax trees from external sources.)
</br></br>
<div id="badges">
<a href="./LICENSE_MIT">
<img src="https://github.com/UlinProject/img/blob/main/short_32/mit.png?raw=true" alt="mit"/>
</a>
<a href="./LICENSE_APACHE">
<img src="https://github.com/UlinProject/img/blob/main/short_32/apache2.png?raw=true" alt="apache2"/>
</a>
<a href="https://crates.io/crates/include_tt">
<img src="https://github.com/UlinProject/img/blob/main/short_32/cratesio.png?raw=true" alt="cratesio"/>
</a>
<a href="https://docs.rs/include_tt">
<img src="https://github.com/UlinProject/img/blob/main/short_32/docrs.png?raw=true" alt="docrs"/>
</a>
<a href="https://github.com/denisandroid">
<img src="https://github.com/UlinProject/img/blob/main/short_32/uproject.png?raw=true" alt="uproject"/>
</a>
<a href="https://github.com/clucompany">
<img src="https://github.com/UlinProject/img/blob/main/short_32/clulab.png?raw=true" alt="clulab"/>
</a>
[](https://github.com/clucompany/include_tt/actions/workflows/CI.yml)
</div>
</div>
## Usage
Add this to your Cargo.toml:
```toml
[dependencies]
include_tt = "1.1.0"
```
and this to your source code:
```rust
use include_tt::inject;
```
## Example
```rust
use include_tt::inject;
use std::fmt::Write;
fn main() {
let mut buf = String::new();
inject! {
write!(
&mut buf,
"Welcome, {}. Your score is {}.",
#tt("examples/name.tt"), // `"Ferris"`
#tt("examples/" "score" ".tt") // `100500`
).unwrap();
}
assert_eq!(buf, "Welcome, Ferris. Your score is 100500.");
}
```
<a href="./examples">
See all
</a>
## License
This project has a dual license according to (LICENSE-MIT) and (LICENSE-APACHE-2-0).
<div align="left">
<a href="https://github.com/denisandroid">
<img align="left" src="https://github.com/UlinProject/img/blob/main/block_220_100/uproject.png?raw=true" alt="uproject"/>
</a>
<b> Copyright (c) 2023-2025 #UlinProject</b>
<b> (Denis Kotlyarov).</b>
</br></br></br>
</div>
### Apache License
<div align="left">
<a href="./LICENSE_APACHE">
<img align="left" src="https://github.com/UlinProject/img/blob/main/block_220_100/apache2.png?raw=true" alt="apache2"/>
</a>
<b> Licensed under the Apache License, Version 2.0.</b>
</br></br></br></br>
</div>
### MIT License
<div align="left">
<a href="./LICENSE_MIT">
<img align="left" src="https://github.com/UlinProject/img/blob/main/block_220_100/mit.png?raw=true" alt="mit"/>
</a>
<b> Licensed under the MIT License.</b>
</br></br></br></br>
</div>