Clean repo of old test scripts

This commit is contained in:
retropikzel 2024-09-03 15:27:09 +03:00
parent be49da18d2
commit 7d7730b42c
15 changed files with 144 additions and 152 deletions

View File

@ -11,10 +11,8 @@ build: retropikzel/r7rs-pffi/version/*.scm
install:
schubert install
test-all: \
test-tier1: \
test-chicken\
test-cyclone \
test-gambit \
test-guile \
test-kawa \
test-sagittarius \
@ -44,12 +42,12 @@ test-cyclone: clean build build-cyclone-libs
PACKAGES="${TEST_PACKAGES_APT}" \
scheme_runner cyclone "bash test-cyclone.sh"
GAMBIT_LIB=gsc -:r7rs,search=. -dynamic
GAMBIT_LIB=gsc -:r7rs,search=.:./schubert -dynamic
build-gambit-libs:
${SCHEME_RUNNER} gambit "${GAMBIT_LIB} retropikzel/pffi/version/gambit.scm"
${SCHEME_RUNNER} gambit "${GAMBIT_LIB} retropikzel/pffi/version/main.sld"
GAMBIT=gsc -:r7rs,search=. -ld-options -lcurl -exe
GAMBIT=gsc -:r7rs,search=.:./schubert -ld-options -lcurl -exe
test-gambit: clean build
${SCHEME_RUNNER} gambit "${GAMBIT} test.scm"
@ -84,6 +82,10 @@ STKLOS=stklos -A . -A ./schubert -f
test-stklos: build
${SCHEME_RUNNER} stklos "${STKLOS} test.scm"
documentation:
cat README.md > docs/index.md
mkdocs build
tmp:
mkdir -p tmp

View File

@ -15,7 +15,7 @@ Any help in form of constructive advice and bug reports are appreciated.
For documentation see [retropikzel.neocities.org/r7rs-pffi](retropikzel.neocities.org/r7rs-pffi)
or run mkdocs serve or see or docs/ directory.
## Goals
# Goals
- Support only R7RS implementations
- Needs to have cond-expand and library support atleast (propably much more)
@ -23,40 +23,21 @@ or run mkdocs serve or see or docs/ directory.
- Some things that are procedures on one implementation are macros on other,
but they must behave the same
## Non goals
# Non goals
- To support all R7RS implementations
- To have every possible FFI feature
- Compiling of C code at any point
- That is no stubs, no C code generated by the library and so on
## Supported implementations
# Support tiers
## Tier 1
- [Sagittarius](https://bitbucket.org/ktakashi/sagittarius-scheme/wiki/Home)
- Good support, recommended
- [Guile](https://www.gnu.org/software/guile/)
- Good support, recommended
- [Racket](https://racket-lang.org/)
- Good support, recommended
- [Chicken](https://www.call-cc.org/)
- Still needs work
- [Gambit](https://gambitscheme.org)
- Still needs work
## Supported excepts callbacks
### Callbacks not in FFI
These implementations do not have callback support on their FFI. If I'm wrong please let me know!
- [STKlos](https://stklos.net/)
- Still needs work
- [Cyclone](https://justinethier.github.io/cyclone/)
- Still needs work
### Callbacks not implemented yet
- [Guile](https://www.gnu.org/software/guile/)
- Good support, recommended
- [Kawa](https://www.gnu.org/software/kawa/index.html)
- Needs at least java version 22
- Needs jvm flags:
@ -65,17 +46,36 @@ These implementations do not have callback support on their FFI. If I'm wrong pl
- --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
- --enable-native-access=ALL-UNNAMED
- Good support (otherwise), recommended
- [Sagittarius](https://bitbucket.org/ktakashi/sagittarius-scheme/wiki/Home)
- Good support, recommended
- [Racket](https://racket-lang.org/)
- Good support, recommended
- [Gambit](https://gambitscheme.org)
- Still needs work
## Support waiting for the implementation
## Tier 2
These implementations do not have callback support on their FFI. If I'm wrong please let me know!
- [STKlos](https://stklos.net/)
- Still needs work
- [Cyclone](https://justinethier.github.io/cyclone/)
- Still needs work
## Tier 3
Support waiting for the implementation.
- [LIPS](https://lips.js.org/)
- Waiting for implementation to have cond-expand and library support
- Will only work on nodejs
- Waiting for implementation to have cond-expand and library support
- Will only work on nodejs
- [Biwascheme](https://www.biwascheme.org/)
- Waiting for implementation to have cond-expand and library support
- Will only work on nodejs
- Waiting for implementation to have cond-expand and library support
- Will only work on nodejs
## Support needs to be investigated
## Tier 4
Support needs to be investigated.
- [Gerbil](https://cons.io/)
- [Ypsilon](http://www.littlewingpinball.com/doc/en/ypsilon/)
@ -83,14 +83,18 @@ These implementations do not have callback support on their FFI. If I'm wrong pl
- [Mosh](https://mosh.monaos.org)
- [Skint](https://github.com/false-schemers/skint)
## Support maybe possible/dreaming about
## Tier 5
Support maybe possible/dreaming about.
- [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
and interesting to see if this FFI could also support some of those
## Not supported
## Tier 6
Not supported currently, and may never be.
- [Chibi](https://synthcode.com/scheme/chibi)
- FFI requires C code
@ -105,15 +109,3 @@ These implementations do not have callback support on their FFI. If I'm wrong pl
- Might have other things missing too
- [Loko](https://scheme.fail/)
- Desires no C interop, I can respect that
## Hacking
- You will need to have [scheme_testrunner](https://git.sr.ht/~retropikzel/scheme-testrunner)
installed to run tests on large scale
- You can also run them on your machine
### Pull requests
Pull requests for bug fixes, additional implementation support and additional tests are appreciated.
But please do not change the interface (library exports) and if you add support for implementation
then all exported procedures of main.scm need to be implemented and tests must pass.

View File

@ -1,6 +1,4 @@
# r7rs-pffi
Portable Foreign Function Interface for R7RS schemes
# Portable Foreign Function Interface for R7RS schemes
Foreign function interface that is supported on multiple R7RS Sceheme implementations.
@ -8,9 +6,106 @@ Note that this software is in **alpha** stage. That said the interface should no
Any help in form of constructive advice and bug reports are appreciated.
[Source](https://git.sr.ht/~retropikzel/r7rs-pffi)
[Documentation](https://retropikzel.neocities.org/r7rs-pffi/) or run mkdocs serve or see docs/.
[Issue tracker](https://todo.sr.ht/~retropikzel/r7rs-pffi)
[Maling lists](https://sr.ht/~retropikzel/r7rs-pffi/lists)
For documentation see [retropikzel.neocities.org/r7rs-pffi](retropikzel.neocities.org/r7rs-pffi)
or run mkdocs serve or see or docs/ directory.
# Goals
- Support only R7RS implementations
- Needs to have cond-expand and library support atleast (propably much more)
- Same interface on all implementations
- Some things that are procedures on one implementation are macros on other,
but they must behave the same
# Non goals
- To support all R7RS implementations
- To have every possible FFI feature
- Compiling of C code at any point
- That is no stubs, no C code generated by the library and so on
# Support tiers
## Tier 1
- [Chicken](https://www.call-cc.org/)
- Still needs work
- [Guile](https://www.gnu.org/software/guile/)
- Good support, recommended
- [Kawa](https://www.gnu.org/software/kawa/index.html)
- 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
- Good support (otherwise), recommended
- [Sagittarius](https://bitbucket.org/ktakashi/sagittarius-scheme/wiki/Home)
- Good support, recommended
- [Racket](https://racket-lang.org/)
- Good support, recommended
- [Gambit](https://gambitscheme.org)
- Still needs work
## Tier 2
These implementations do not have callback support on their FFI. If I'm wrong please let me know!
- [STKlos](https://stklos.net/)
- Still needs work
- [Cyclone](https://justinethier.github.io/cyclone/)
- Still needs work
## Tier 3
Support waiting for the implementation.
- [LIPS](https://lips.js.org/)
- Waiting for implementation to have cond-expand and library support
- Will only work on nodejs
- [Biwascheme](https://www.biwascheme.org/)
- Waiting for implementation to have cond-expand and library support
- Will only work on nodejs
## Tier 4
Support needs to be investigated.
- [Gerbil](https://cons.io/)
- [Ypsilon](http://www.littlewingpinball.com/doc/en/ypsilon/)
- [Larceny](https://larcenists.org/)
- [Mosh](https://mosh.monaos.org)
- [Skint](https://github.com/false-schemers/skint)
## Tier 5
Support maybe possible/dreaming about.
- [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
and interesting to see if this FFI could also support some of those
## Tier 6
Not supported currently, and may never be.
- [Chibi](https://synthcode.com/scheme/chibi)
- FFI requires C code
- [MIT-Scheme](https://www.gnu.org/software/mit-scheme/)
- FFI requires C code
- [tr7](https://gitlab.com/jobol/tr7)
- FFI requires C code
- [Gauche](https://practical-scheme.net/gauche/)
- FFI requires C code
- [s7](https://scheme.fail://ccrma.stanford.edu/software/snd/snd/s7.html)
- No library support
- Might have other things missing too
- [Loko](https://scheme.fail/)
- Desires no C interop, I can respect that

View File

@ -1,15 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
CHICKEN_REPOSITORY_PATH=${PWD}/retropikzel/r7rs-pffi/version
SCHEME="csc -X r7rs -R r7rs -L -lcurl"
SCHEME_LIB="csc -X r7rs -R r7rs -s -J"
SCHEME_I="csi -R r7rs"
cp retropikzel/r7rs-pffi/version/chicken.scm retropikzel.r7rs-pffi.version.chicken.scm
cp retropikzel/r7rs-pffi/version/main.scm retropikzel.r7rs-pffi.version.main.scm
${SCHEME_LIB} retropikzel.r7rs-pffi.version.chicken.scm
${SCHEME_LIB} retropikzel.r7rs-pffi.version.main.scm
source scripts/test-runs-compilers.sh

View File

@ -1,9 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="cyclone -A ."
SCHEME_LIB="cyclone -A ."
SCHEME_I="icyc -A . -s"
source scripts/test-runs-compilers.sh

View File

@ -1,14 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="gsc -v -:r7rs,search=. -ld-options -lcurl -exe"
SCHEME_LIB="gsc -v -:r7rs,search=. -obj"
SCHEME_I="gsi -:r7rs,search=."
${SCHEME_LIB} retropikzel/pffi/version/gambit.scm
${SCHEME_LIB} retropikzel/pffi/version/main.sld
source scripts/test-runs-compilers.sh

View File

@ -1,9 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="gxc -prelude :scheme/r7rs -exe"
SCHEME_LIB="gxc -prelude :scheme/r7rs"
SCHEME_I="gxi --lang r7rs"
source scripts/test-runs-compilers.sh

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="guile --fresh-auto-compile --r7rs -L ."
source scripts/test-runs-dynamic.sh

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="guile --no-auto-compile --fresh-auto-compile --r7rs -L ."
source scripts/test-runs-dynamic.sh

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="java --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 --enable-preview -jar kawa.jar --r7rs --full-tailcalls -Dkawa.import.path=.."
source scripts/test-runs-dynamic.sh

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
export WINEPATH=$(winepath ${HOME}/.wine/drive_c/Program\ Files/Racket)
SCHEME="wine64 racket.exe -I r7rs --make -S . --script"
source scripts/test-runs-dynamic.sh

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="racket -I r7rs --make -S . --script"
source scripts/test-runs-dynamic.sh

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
export WINEPATH=$(winepath ${HOME}/.wine/drive_c/Program\ Files/Sagittarius)
SCHEME="wine sash.exe -c -r7 -L ."
source scripts/test-runs-dynamic.sh

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="sash -c -r7 -L ."
source scripts/test-runs-dynamic.sh

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
source scripts/init-test.sh
SCHEME="stklos -A . -f"
source scripts/test-runs-dynamic.sh