No description
  • Pony 43.6%
  • C 38.5%
  • Makefile 17.9%
Find a file
2022-03-24 12:12:35 +01:00
jch Update jch example 2022-03-24 12:12:35 +01:00
jch_c Update jch example 2022-03-24 12:12:35 +01:00
.gitignore Inital commit 2021-02-25 10:47:35 +01:00
Makefile Option to customize ponyc 2022-03-21 10:15:42 +01:00
README.md Inital commit 2021-02-25 10:47:35 +01:00

This project mirrors the code used for C FFI section of the Pony tutorial.

  • Linking to C libraries covers how to make Pony link the desired libraries using the use "lib:XXX" and use "path:XXX" statements.

  • C ABI covers how to compiler your C code to a shared library so you can use it from Pony code.

There are two ways of letting the compiler know where to find your libraries:

  • Using the use "path:XXX" statement on your Pony files.
  • Using the --path <path> option for the Pony compiler.

The key is to first build your C code into a shared library, and put the resulting .so / .dylib etc somewhere that you can specify via use "path:..." or supply to the compiler using the --path flag.

If you use the --path flag on the compiler, you don't need to specify the path to your C library from Pony code.