alef 0.25.39

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
        {{ code }} => {
            let msg = if custom_ptr.is_null() {
                String::new()
            } else {
                // SAFETY: caller guarantees this is a valid heap CString.
                let cstr = unsafe { std::ffi::CString::from_raw(custom_ptr) };
                cstr.to_string_lossy().into_owned()
            };
            VisitorResult::{{ variant_name }}(msg)
        },