alef 0.103.14

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
	// Build the C vtable by calling the C helper function.
	// This ensures function pointers are correctly populated in C, fixing ARM64 macOS issues.
	vtable := C.{{ vtable_constructor }}()
	if vtable == nil {
		// Every other exit deletes the handle or stores it in the registry; a
		// failed allocation must not keep the bridge reachable for the life of
		// the process (GHSA-q5pq-8g86-v9j9).
		handle.Delete()
		return fmt.Errorf("failed to allocate %s vtable", impl.Name())
	}
	defer C.free(unsafe.Pointer(vtable))