alef 0.25.37

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
	var {{ c_name }} *C.uint8_t
	if len({{ go_param }}) > 0 {
		var {{ c_name }}Pinner runtime.Pinner
		{{ c_name }}Pinner.Pin(&{{ go_param }}[0])
		defer {{ c_name }}Pinner.Unpin()
		{{ c_name }} = (*C.uint8_t)(unsafe.Pointer(&{{ go_param }}[0]))
	}
	{{ c_name }}Len := C.uintptr_t(len({{ go_param }}))