← All projects
Project record1 mention
Originally shared on Hacker News

libffi Fil-C port

A port of the libffi foreign function interface library to Fil-C, rewriting it to use the Fil-C zcall API for reflectively crafting calls instead of assembly and the Fil-C zclosure_new API for closures instead of JITing.

Last shared
01 / The problem

What it addresses

Unlike most programs, which work in Fil-C with zero or no changes, libffi needs to be basically rewritten to run under Fil-C.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. libffi Fil-C port

    A port of the libffi foreign function interface library to Fil-C, rewriting it to use the Fil-C zcall API for reflectively crafting calls instead of assembly and the Fil-C zclosure_new API for closures instead of JITing.

    Problem: Unlike most programs, which work in Fil-C with zero or no changes, libffi needs to be basically rewritten to run under Fil-C.

    Posted by @pizlonator · Original source ↗

    Source text · @pizlonator · · Source ↗

    About to port libffi to Fil-C. Unlike most programs, which just work in Fil-C with zero or no changes, libffi needs to basically be rewritten. Instead of using assembly for reflectively crafting calls it needs to use the Fil-C zcall api. And instead of JITing closures it needs to use the Fil-C zclosure_new api.