foreign-c/site/index.html

345 lines
13 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="None">
<link rel="shortcut icon" href="img/favicon.ico">
<title>r7rs-pffi</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<script src="js/jquery-1.10.2.min.js" defer></script>
<script src="js/bootstrap.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="homepage">
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href=".">r7rs-pffi</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem active">
<a href="." class="nav-link">Portable Foreign Function Interface for R7RS schemes</a>
</li>
<li class="navitem">
<a href="reference/" class="nav-link">Reference</a>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a rel="prev" class="nav-link disabled">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="nav-item">
<a rel="next" href="reference/" class="nav-link">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>
<div id="toc-collapse" class="navbar-collapse collapse card bg-light">
<ul class="nav flex-column">
<li class="nav-item" data-level="1"><a href="#portable-foreign-function-interface-for-r7rs-schemes" class="nav-link">Portable Foreign Function Interface for R7RS schemes</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#goals" class="nav-link">Goals</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#non-goals" class="nav-link">Non goals</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#support-tiers" class="nav-link">Support tiers</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="2"><a href="#tier-1" class="nav-link">Tier 1</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#tier-2" class="nav-link">Tier 2</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#tier-3" class="nav-link">Tier 3</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#tier-4" class="nav-link">Tier 4</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#tier-5" class="nav-link">Tier 5</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#tier-6" class="nav-link">Tier 6</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">
<h1 id="portable-foreign-function-interface-for-r7rs-schemes">Portable Foreign Function Interface for R7RS schemes</h1>
<p>Foreign function interface that is supported on multiple R7RS Sceheme implementations.</p>
<p>Note that this software is in <strong>alpha</strong> stage. That said the interface should not be changing anymore.</p>
<p>Any help in form of constructive advice and bug reports are appreciated.</p>
<p><a href="https://retropikzel.neocities.org/r7rs-pffi/">Documentation</a> or run mkdocs serve or see docs/.</p>
<p><a href="https://todo.sr.ht/~retropikzel/r7rs-pffi">Issue tracker</a></p>
<p><a href="https://sr.ht/~retropikzel/r7rs-pffi/lists">Maling lists</a></p>
<p>For documentation see <a href="retropikzel.neocities.org/r7rs-pffi">retropikzel.neocities.org/r7rs-pffi</a>
or run mkdocs serve or see or docs/ directory.</p>
<h1 id="goals">Goals</h1>
<ul>
<li>Support only R7RS implementations</li>
<li>Needs to have cond-expand and library support atleast (propably much more)</li>
<li>Same interface on all implementations</li>
<li>Some things that are procedures on one implementation are macros on other,
but they must behave the same</li>
</ul>
<h1 id="non-goals">Non goals</h1>
<ul>
<li>To support all R7RS implementations</li>
<li>To have every possible FFI feature</li>
<li>Compiling of C code at any point<ul>
<li>That is no stubs, no C code generated by the library and so on</li>
</ul>
</li>
</ul>
<h1 id="support-tiers">Support tiers</h1>
<h2 id="tier-1">Tier 1</h2>
<ul>
<li><a href="https://www.call-cc.org/">Chicken</a><ul>
<li>Still needs work</li>
</ul>
</li>
<li><a href="https://www.gnu.org/software/guile/">Guile</a><ul>
<li>Good support, recommended</li>
</ul>
</li>
<li><a href="https://www.gnu.org/software/kawa/index.html">Kawa</a><ul>
<li>Needs at least java version 22</li>
<li>Needs jvm flags:<ul>
<li>--add-exports java.base/jdk.internal.foreign.abi=ALL-UNNAMED</li>
<li>--add-exports java.base/jdk.internal.foreign.layout=ALL-UNNAMED</li>
<li>--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED</li>
<li>--enable-native-access=ALL-UNNAMED</li>
</ul>
</li>
<li>Good support (otherwise), recommended</li>
</ul>
</li>
<li><a href="https://bitbucket.org/ktakashi/sagittarius-scheme/wiki/Home">Sagittarius</a><ul>
<li>Good support, recommended</li>
</ul>
</li>
<li><a href="https://racket-lang.org/">Racket</a><ul>
<li>Good support, recommended</li>
</ul>
</li>
<li><a href="https://gambitscheme.org">Gambit</a><ul>
<li>Still needs work</li>
</ul>
</li>
</ul>
<h2 id="tier-2">Tier 2</h2>
<p>These implementations do not have callback support on their FFI. If I'm wrong please let me know!</p>
<ul>
<li><a href="https://stklos.net/">STKlos</a><ul>
<li>Still needs work</li>
</ul>
</li>
<li><a href="https://justinethier.github.io/cyclone/">Cyclone</a><ul>
<li>Still needs work</li>
</ul>
</li>
</ul>
<h2 id="tier-3">Tier 3</h2>
<p>Support waiting for the implementation.</p>
<ul>
<li><a href="https://lips.js.org/">LIPS</a><ul>
<li>Waiting for implementation to have cond-expand and library support</li>
<li>Will only work on nodejs</li>
</ul>
</li>
<li><a href="https://www.biwascheme.org/">Biwascheme</a><ul>
<li>Waiting for implementation to have cond-expand and library support</li>
<li>Will only work on nodejs</li>
</ul>
</li>
</ul>
<h2 id="tier-4">Tier 4</h2>
<p>Support needs to be investigated.</p>
<ul>
<li><a href="https://cons.io/">Gerbil</a></li>
<li><a href="http://www.littlewingpinball.com/doc/en/ypsilon/">Ypsilon</a></li>
<li><a href="https://larcenists.org/">Larceny</a></li>
<li><a href="https://mosh.monaos.org">Mosh</a></li>
<li><a href="https://github.com/false-schemers/skint">Skint</a></li>
</ul>
<h2 id="tier-5">Tier 5</h2>
<p>Support maybe possible/dreaming about.</p>
<ul>
<li><a href="https://gitlab.com/mbabich/airship-scheme">Airship</a></li>
<li><a href="https://gambitscheme.org/">Other gambit targets</a></li>
<li>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</li>
</ul>
<h2 id="tier-6">Tier 6</h2>
<p>Not supported currently, and may never be.</p>
<ul>
<li><a href="https://synthcode.com/scheme/chibi">Chibi</a><ul>
<li>FFI requires C code</li>
</ul>
</li>
<li><a href="https://www.gnu.org/software/mit-scheme/">MIT-Scheme</a><ul>
<li>FFI requires C code</li>
</ul>
</li>
<li><a href="https://gitlab.com/jobol/tr7">tr7</a><ul>
<li>FFI requires C code</li>
</ul>
</li>
<li><a href="https://practical-scheme.net/gauche/">Gauche</a><ul>
<li>FFI requires C code</li>
</ul>
</li>
<li><a href="https://scheme.fail://ccrma.stanford.edu/software/snd/snd/s7.html">s7</a><ul>
<li>No library support</li>
<li>Might have other things missing too</li>
</ul>
</li>
<li><a href="https://scheme.fail/">Loko</a><ul>
<li>Desires no C interop, I can respect that</li>
</ul>
</li>
</ul></div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = ".",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="js/base.js" defer></script>
<script src="search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>
From here you can search these documents. Enter
your search terms below.
</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>
<!--
MkDocs version : 1.1.2
Build Date UTC : 2024-09-03 12:25:23.288914+00:00
-->