Create C- and Python-compatible shared libraries from Common Lisp code using SBCL.
sbcl-librarian is a toolset for creating C- and Python-compatible shared libraries from Common Lisp code using the SBCL compiler. It solves the problem of exposing Lisp functionality to other programming languages by generating native libraries that can be dynamically linked. The tool handles SBCL-specific runtime requirements like memory management and address space allocation.
Common Lisp developers who need to expose their Lisp code as reusable libraries for C or Python applications, or developers building polyglot systems that integrate Lisp with other languages.
Developers choose sbcl-librarian because it provides a streamlined, opinionated interface for shared library creation that abstracts away SBCL's runtime complexities. It offers cross-platform support and flexible API extension mechanisms not easily available with raw FFI approaches.
Dynamic library delivery tools for SBCL.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates shared libraries that seamlessly integrate with C and Python applications, bridging Lisp functionality to other languages as highlighted in the core features.
Supports adding new API symbols at link time through additional Lisp files like add-on.lisp, enabling flexible library composition without full recompilation.
Provides specific guidance for macOS, Windows, and Unix-like systems, including handling linking flags and runtime considerations, such as the Intel macOS gotcha.
Allows runtime configuration of SBCL heap size via the $SBCL_LIBRARIAN_HEAP_SIZE environment variable, optimizing performance for library contexts.
Includes Makefile examples and scripts to automate library creation and handle dependencies like libsbcl.so, streamlining the build process as shown in the libcalc example.
Requires handling of platform-specific issues, such as the mandatory '-pagezero_size 0x100000' linking flag on Intel macOS, complicating cross-platform deployment.
Introduces SBCL's garbage collector, signal handlers, and fixed address space, adding runtime overhead and potential compatibility issues in constrained environments.
Necessitates access to SBCL source code and manual steps like building libsbcl.so, increasing initial setup time and barrier to entry, as noted in the build instructions.