edwinb / Idris2-pkg-outline

Outline of an Idris2 package which uses C glue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An Idris library with basic FFI

This is a starting point for any Idris 2 package which might need some C glue code to call external libraries.

It also shows some small examples of foreign function calls:

  • one pure function
  • one which does some IO, via PrimIO
  • one which has a callback

In order to make the FFI as easily portable across different backends as possible, it only knows how to deal with primitive types (including Ptr/AnyPtr), PrimIO, and callbacks involving primitive types.

About

Outline of an Idris2 package which uses C glue

License:Other


Languages

Language:Idris 42.2%Language:Makefile 35.4%Language:C 22.4%