alef 0.25.0

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
    /// Run the service entrypoint '{{ ep_method }}'.
    pub fn {{ method_name }}(self: *{{ service_name }}{{ params_decl }}) {{ return_type }} {
        const owner_ptr = self.owner orelse return {{ null_return }};
{% if returns_opaque %}
        return @ptrCast(c.{{ c_fn }}(
            @ptrCast(owner_ptr){{ args }}
        ));
{% else %}
        return c.{{ c_fn }}(
            @ptrCast(owner_ptr){{ args }}
        );
{% endif %}
    }