alef 0.85.21

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
{% if is_async %}
        val capsulePtr = withContext(Dispatchers.IO) { {{ bridge_call }} }
{% else %}
        val capsulePtr = {{ bridge_call }}
{% endif %}
{% if optional %}
        return if (capsulePtr == 0L) null else {{ construct_expr }}
{% else %}
        check(capsulePtr != 0L) { "Unexpected null return from native method" }
        return {{ construct_expr }}
{% endif %}