HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
rpav
cl-autowrap
Python2017–2024
rpav / cl-autowrap

cl-autowrap

(c-include "file.h") => complete FFI wrapper

7Distinct people
8Mentions
0Explicit recommenders
239GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

(c-include "file.h") => complete FFI wrapper

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year8 dated mentions

Observed mentions: 2017-08-22 16:03:52 UTC to 2024-05-08 17:55:10 UTC.

01232017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202

What Hacker News says

8 sources
Some Common Lisp FFIs have opted to coax this information out of the compiler. https://github.com/rpav/c2ffi is a C++ tool that links to libclang-cpp and literally outputs JSON with sizes and alignments. (It is then used by https://github.com/rpav/cl-autowrap to autogenerate a Lisp wrapper.) The older CFFI Groveller [1] works by generating C code which is compiled by the system C compiler (e.g. GCC or Clang) and, when executed, prints Lisp code that contains resolved values of constants, sizes, alignments, etc. [1] https://cffi.common-lisp.dev/manual/html_node/The-Groveller....
In Pair Your Compilers at the ABI Café
> Lack of access to the C libraries. ??? I recently started learning Common Lisp for fun (and fun it is!) and the ease of accessing C libraries was one of the things that surprised me in a positive way. Using https://github.com/rpav/cl-autowrap one can simply write (c-include "file.h") and the API defined in "file.h" is accessible from Lisp. I can't think of a simpler way. Even without cl-autowrap, FFI using https://cffi.common-lisp.dev/ seems simple enough.
In Why is Common Lisp not the most popular programming language?
> C compiler based tool that outputs DWARF or DWARF-like debug output that actually lays out everything That sounds like C2FFI: https://github.com/rpav/c2ffi The only language ecosystem where I've seen it used is Common Lisp, in the CL-Autowrap library (https://github.com/rpav/cl-autowrap). But C2FFI emits plain JSON, so I don't see any reason why you couldn't build e.g. a Python auto-binding library on top of it. It depends on LLVM to generate the spec file, but end users don't need to have that.
In C isn't a programming language anymore
Q: is there any game dev happening in Lisp? A: https://kandria.com/ and https://itch.io/jam/lisp-game-jam-2022 Q: how do I write a website with Lisp? A: https://lispcookbook.github.io/cl-cookbook/web.html#easy-rou... and https://www.gnu.org/software/guile/manual/html_node/Web-Exam... Q: do I have to use emacs for developing Lisp? A: No, https://github.com/vlime/vlime and https://github.com/nobody-famous/alive Q: is there a lisp with a more familiar standard library? A: https://docs.hylang.org/en/stable/ Q: How can I write scripts with Lisp? A: See above or https://github.com/roswell/roswell#scripting-with-roswell Q: it looks like Common Lisp doesn't support (software with a C library) but it needs to if I want to do it at work. A: https://github.com/rpav/cl-autowrap
In Why Lisp?
Common lisp has a "pretty OK" story for calling C code whenever some speed is needed [0,1]. In my opinion, they suffer from some of the documentation/quick start problems that common lisp has, but they're otherwise usable. Some of Naughty Dog's late 90's/early 2000's games (Jak and Daxter, Jak II) were written in a lisp called GOAL, Game Oriented Assembly Lisp [2] [0] https://github.com/rpav/cl-autowrap [1] https://github.com/cffi/cffi#cffic2ffi [2] https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp
In Functional programming should be the future of software
If you're interested in FFI, then yeah CFFI is the standard. The other comments addressed speed, I also wanted to point out https://github.com/rpav/cl-autowrap which is built on top of CFFI and can help get a wrapper up and running faster. After using autowrap's c-include you can then use CFFI basically like normal or some useful autowrap/plus-c's helper functions -- e.g. in one project, I have an SDL_Event (https://wiki.libsdl.org/SDL_Event) and to access event.key.keysym.scancode I have a helper function that's just (plus-c:c-ref event sdl2-ffi:sdl-event :key :keysym :scancode). Last year I wanted to try out using FMOD, and even though it's closed source and has a (to me) "interesting" API things worked easily: https://gist.github.com/Jach/dc2ec7b9402d0ec5836a935384cacdc... More work would be needed to make a nice wrapper, type things m
Read the rest
ore fully, etc. but depending on the C library you might find someone's already done that (or made a start) and made it available from quicklisp.
In Common Lisp
For Common Lisp, there's ABCL ( https://abcl.org ) which is a CL on the JVM and, otherwise, LispWorks bundles a nice Java FFI. But, additionally, CL makes binding to C libraries really easy via CFFI and things like cl-autowrap ( https://github.com/rpav/cl-autowrap ) so, when there isn't a native lisp library, it's often easy enough to just use a C library in your program (or, I suppose, anything that can compile to something compatible with C like `extern C` in C++ and the equivalent constructs in Rust)
In SBCL – Past, Present, Future [pdf]

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.