alef 0.84.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
                    if ({{ ok_binding }} == null) {
                        if (out_result) |ptr| ptr.* = null;
                        return 0;
                    }
                    const _owned_result = std.heap.c_allocator.dupeZ(u8, std.mem.span({{ ok_binding }})) catch {
{% if has_out_error %}
                        if (out_error) |ptr| ptr.* = null;
{% endif %}
                        return 1;
                    };
                    if (out_result) |ptr| {
                        ptr.* = @ptrCast(_owned_result.ptr);
                    } else {
                        std.heap.c_allocator.free(_owned_result);
                    }
                    return 0;