Add support table
This commit is contained in:
parent
6a3899e622
commit
4011656805
74
README.md
74
README.md
|
|
@ -32,74 +32,64 @@ For status of what tests pass on which implementations see
|
|||
- That is no stubs, no C code generated by the library and so on
|
||||
- The pffi library itself may require compilation on installation
|
||||
|
||||
## Known issues that are worked on
|
||||
|
||||
- Passing struct does not work on Chicken
|
||||
- For example [SDL2-ttf TTF_RenderUTF8_Solid](https://wiki.libsdl.org/SDL2_ttf/TTF_RenderUTF8_Solid)
|
||||
wants the color to be passed as struct.
|
||||
- Not a problem on Guile, Sagittarius or Racket
|
||||
- Cyclone status unknown, assumed same as Chicken
|
||||
|
||||
## Status
|
||||
|
||||
Currently the interface of the library is in okay shape. It propably will not change much but no
|
||||
guarantees are being made just yet.
|
||||
|
||||
### Usable
|
||||
## Implementation table
|
||||
|
||||
- [Guile](https://www.gnu.org/software/guile/)
|
||||
- [Sagittarius](https://bitbucket.org/ktakashi/sagittarius-scheme/wiki/Home)
|
||||
- [Chicken 5](https://www.call-cc.org/)
|
||||
| Procedure | Chibi | Chicken | Cyclone | Gambit | Gauche | Gerbil | Guile | Kawa | Mosh | Racket | Sagittarius | Skint | STklos | tr7 |
|
||||
| ------------------------------- | ----- | ------- | ------- | ------- | ------ | ------ | ----- | ---- | ---- | ------ | ----------- | ----- | ------ | --- |
|
||||
| pffi-init | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-size-of | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-shared-object-auto-load | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-shared-object-load | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-pointer-null | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-pointer-null? | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-pointer-allocate | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-pointer? | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-pointer-free | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-pointer-set! | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-pointer-get | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-string->pointer | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-pointer->string | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-define | X | X | X | | | | X | X | X | X | X | | | |
|
||||
| pffi-define-callback | | X | | | | | X | | X | X | X | | | |
|
||||
| pffi-pointer-address | | X | | | | | X | | | X | X | | | |
|
||||
| pffi-pointer-dereference | | | | | | | X | | | X | X | | | |
|
||||
|
||||
### Usage notes
|
||||
|
||||
- Chibi
|
||||
- Install libffi-dev
|
||||
- Build with:
|
||||
- chibi-ffi retropikzel/r7rs-pffi/r7rs-pffi-chibi.stub
|
||||
- ${CC} -o retropikzel/r7rs-pffi/r7rs-pffi-chibi.so -fPIC -shared retropikzel/r7rs-pffi/r7rs-pffi-chibi.c -lchibi-scheme -lffi
|
||||
- Chicken 5
|
||||
- Needs [r7rs egg](https://wiki.call-cc.org/eggref/5/r7rs)
|
||||
- [Racket](https://racket-lang.org/)
|
||||
- Racket
|
||||
- Needs [racket-r7rs](https://github.com/lexi-lambda/racket-r7rs)
|
||||
|
||||
### Work in progress
|
||||
|
||||
- [Cyclone](https://justinethier.github.io/cyclone/)
|
||||
- TODO
|
||||
- pffi-define-callback
|
||||
- pffi-pointer-address
|
||||
- pffi-pointer-dereference
|
||||
- [STKlos](https://stklos.net/)
|
||||
- [Kawa](https://www.gnu.org/software/kawa/index.html)
|
||||
- TODO
|
||||
- pffi-define-callback
|
||||
- pffi-pointer-address
|
||||
- pffi-pointer-dereference
|
||||
- [STKlos](https://stklos.net/)
|
||||
- Kawa
|
||||
- Needs at least java version 22
|
||||
- Needs jvm flags:
|
||||
- --add-exports java.base/jdk.internal.foreign.abi=ALL-UNNAMED
|
||||
- --add-exports java.base/jdk.internal.foreign.layout=ALL-UNNAMED
|
||||
- --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
|
||||
- --enable-native-access=ALL-UNNAMED
|
||||
- [STKlos](https://stklos.net/)
|
||||
- [Mosh](https://mosh.monaos.org)
|
||||
- TODO
|
||||
- pffi-pointer-address
|
||||
- pffi-pointer-dereference
|
||||
- [STKlos](https://stklos.net/)
|
||||
|
||||
### Design/exploration
|
||||
### Design/exploration/waiting for implementation features
|
||||
|
||||
- [Gambit](https://gambitscheme.org)
|
||||
- [LIPS](https://lips.js.org/)
|
||||
- Will work on nodejs by using some Javascript FFI
|
||||
- Javascript side needs design
|
||||
- [Biwascheme](https://www.biwascheme.org/)
|
||||
- Will work on nodejs by using some Javascript FFI
|
||||
- Javascript side needs design
|
||||
- [Chibi](https://synthcode.com/scheme/chibi)
|
||||
- [MIT-Scheme](https://www.gnu.org/software/mit-scheme/)
|
||||
- [tr7](https://gitlab.com/jobol/tr7)
|
||||
- [Gauche](https://practical-scheme.net/gauche/)
|
||||
- [s7](https://scheme.fail://ccrma.stanford.edu/software/snd/snd/s7.html)
|
||||
- [Gerbil](https://cons.io/)
|
||||
- Should be possible as built on gambit, but makes sense to make gambit support first
|
||||
- [Ypsilon](http://www.littlewingpinball.com/doc/en/ypsilon/)
|
||||
- [Larceny](https://larcenists.org/)
|
||||
- [Skint](https://github.com/false-schemers/skint)
|
||||
- [Airship](https://gitlab.com/mbabich/airship-scheme)
|
||||
- [Other gambit targets](https://gambitscheme.org/)
|
||||
- Gambit compiles to different targets other than C too, for example Javascript. It would be cool
|
||||
|
|
|
|||
4
test.scm
4
test.scm
|
|
@ -62,6 +62,7 @@
|
|||
(assert equal? (number? size-int8) #t)
|
||||
(assert = size-int8 1)
|
||||
|
||||
#|
|
||||
(define size-uint8 (pffi-size-of 'uint8))
|
||||
(debug size-uint8)
|
||||
(assert equal? (number? size-uint8) #t)
|
||||
|
|
@ -225,7 +226,6 @@
|
|||
(pffi-pointer-free pointer-to-be-freed)
|
||||
(debug pointer-to-be-freed)
|
||||
|
||||
#|
|
||||
;; pffi-pointer-set! and pffi-pointer-get 1/2
|
||||
|
||||
(print-header "pffi-pointer-set! and pffi-pointer-get 1/2")
|
||||
|
|
@ -349,7 +349,6 @@
|
|||
(pffi-pointer-set! set-pointer 'pointer offset (pffi-string->pointer string-to-be-set))
|
||||
(assert string=? (pffi-pointer->string (pffi-pointer-get set-pointer 'pointer offset)) "FOOBAR")
|
||||
|
||||
|#
|
||||
;; pffi-define
|
||||
|
||||
(print-header 'pffi-define)
|
||||
|
|
@ -364,7 +363,6 @@
|
|||
(pffi-define atoi libc-stdlib 'atoi 'int (list 'pointer))
|
||||
(assert = (atoi (pffi-string->pointer "100")) 100)
|
||||
|
||||
#|
|
||||
;; pffi-define-callback
|
||||
|
||||
(print-header 'pffi-define-callback)
|
||||
|
|
|
|||
Loading…
Reference in New Issue