alef 0.23.71

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
18
    extern "Rust" {
        type {{ service_name }};
        #[swift_bridge(init)]
        fn new() -> {{ service_name }};
{%- for config in configurators %}
        #[swift_bridge(swift_name = "{{ config.camel }}")]
        fn {{ config.name }}(&mut self);
{%- endfor %}
{%- for ep in entrypoints %}
        #[swift_bridge(swift_name = "{{ ep.camel }}")]
        fn {{ ep.snake }}(
            &mut self,
{%- for param in ep.params %}
            {{ param.name }}: {{ param.rust_type }},
{%- endfor %}
        ) -> {{ ep.return_type }};
{%- endfor %}
    }