Open
Description
At present, jextract-swift
only exposes Swift classes to Java. We should also be able to expose Swift value types like structs and enums. We'll need to create a memory layout for the type on the Java side (which requires size/alignment) and will wrap the value type in a Java class. Destruction will require calls into the value witness table. If we want to implement the java.lang.Cloneable
interface, we'll need to do so by calling the appropriate value witness to copy.
Anything we do here needs to start with getting access to the type metadata (we can use the mangled name of the witness table or its accessor for this), and the witness table from there.