Skip to content

idris-industry/idris-ffi-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

idris-ffi-example

This is a collection of examples of how to use the Idris FFI.

myFirstFFI

We have a C library testlib with a function int foo(int); that takes an int, adds 1 to the argument and returns the result. The Idris program calls foo with 42 as argument and then prints the result.

strings

We have two functions that return a char pointer. One of them will always return a C-string while the other always returns NULL. Note that the example doesn't work in v0.9.9.2.

About

A minimal example of the Idris C FFI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published