- self.bindings_header = self.wasm_import_header(target) + """
-export class VecOrSliceDef {
- public dataptr: number;
- public datalen: number;
- public stride: number;
- public constructor(dataptr: number, datalen: number, stride: number) {
- this.dataptr = dataptr;
- this.datalen = datalen;
- this.stride = stride;
- }
-}
-
-/*
-TODO: load WASM file
-static {
- System.loadLibrary(\"lightningjni\");
- init(java.lang.Enum.class, VecOrSliceDef.class);
- init_class_cache();
-}
-
-static native void init(java.lang.Class c, java.lang.Class slicedef);
-static native void init_class_cache();
-
-public static native boolean deref_bool(long ptr);
-public static native long deref_long(long ptr);
-public static native void free_heap_ptr(long ptr);
-public static native byte[] read_bytes(long ptr, long len);
-public static native byte[] get_u8_slice_bytes(long slice_ptr);
-public static native long bytes_to_u8_vec(byte[] bytes);
-public static native long new_txpointer_copy_data(byte[] txdata);
-public static native void txpointer_free(long ptr);
-public static native byte[] txpointer_get_buffer(long ptr);
-public static native long vec_slice_len(long vec);
-public static native long new_empty_slice_vec();
-*/
-
-"""