aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 11:06:46 +01:00
parent df99318392
commit 86e7c72e5f
10383 changed files with 749164 additions and 749170 deletions

View File

@@ -0,0 +1,41 @@
# akode-utils-template
Small, strict string templating for prompt and text assets.
Supported syntax:
- `{{ name }}` placeholder interpolation
- `{{{{` for a literal `{{`
- `}}}}` for a literal `}}`
The library is intentionally strict:
- parsing fails on malformed placeholders
- rendering fails on missing values
- rendering fails on duplicate values
- rendering fails on extra values not used by the template
## Example
```rust
use akode_utils_template::Template;
use akode_utils_template::render;
let template = Template::parse(
"Hello, {{ name }}.\nLiteral braces: {{{{ and }}}}.\nMode: {{ mode }}",
)?;
let rendered = template.render([
("name", "Codex"),
("mode", "strict"),
])?;
assert_eq!(
rendered,
"Hello, Codex.\nLiteral braces: {{ and }}.\nMode: strict"
);
let one_shot = render("Hi {{ who }}!", [("who", "there")])?;
assert_eq!(one_shot, "Hi there!");
# Ok::<(), Box<dyn std::error::Error>>(())
```