alef 0.25.37

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
    let {{ param }}_raw: Option<*mut _> = {{ param }}.as_ref().map(|cap| {
        let ptr = cap.bind(py);
        // SAFETY: pointer is valid for program lifetime (static registry).
        unsafe { pyo3::ffi::PyCapsule_GetPointer(ptr.as_ptr(), {{ cstr }}_NAME.as_ptr()) }
    });