alef 0.60.0

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{% for import in imports %}{{ import }}
{% endfor %}

{% if is_async %}#[tokio::main]
async fn main() {
{% else %}fn main() {
{% endif %}
{% for line in body %}    {{ line }}
{% endfor %}
{% for operation in presentation %}
{% if operation.kind == "show" %}    println!("{:?}", {{ operation.expression }});
{% else %}    for {{ operation.item }} in {{ operation.expression }}{% if operation.optional %}.iter().flatten(){% endif %} {
{% for field in operation.fields %}        println!("{% if operation.display %}{}{% else %}{:?}{% endif %}", {{ field }});
{% endfor %}    }
{% endif %}
{% endfor %}
}