okuoku / yuni

R7RS/R6RS/Generic Scheme portability platform
Other
32 stars 3 forks source link

yuniffi: Migrate to new API set #149

Open okuoku opened 4 years ago

okuoku commented 4 years ago

Move (yuni ffi *) functionalities to separate libraries because some of these are not FFI-specific.

Unified structure APIs (yuni core)

We don't see any performance benefit over defining core ref/set! as syntax; future Yuni will use inline-hints.

Buffer APIs (yuni buffers)

Transient buffer is alloca equivalent. MIT/GNU Scheme 10 or later has real FFI thus we no longer need special handling for them.

Structure pack/unpack (yuni pack)

C calling primitives (yuni ffi nccc)

(NCCCv0)

void some_api(uint64_t* in, int in_len, uint64_t* out, int out_len);

(NCCCv1 - TBD)