Skip to content

Commit

Permalink
[doc] add note regarding C header inclusion to FFI documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBrouwersHarries authored and mattpolzin committed Dec 13, 2023
1 parent eddcbcd commit 4cb45da
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/source/ffi/ffi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ the library. In this document, we will assume the default Chez Scheme code
generator (the examples also work with the Racket or Gambit code generator) and
that the foreign language is C.

FFI declarations for C functions can also, optionally, take a C header file to
be ``#include``'d in the C code generated by the Idris2 compiler. For instance:

.. code-block:: idris
%foreign "C:idris2_resetRawMode, libidris2_support, idris_support.h"
idris2_resetRawMode : (1 x : %World) -> IORes ()
Scheme Details
---------------

Expand Down

0 comments on commit 4cb45da

Please sign in to comment.