@obinexusltd/lisp-polycall
v1.0.0
Published
Common Lisp CFFI source binding for libpolycall 1.5
Maintainers
Readme
@obinexusltd/lisp-polycall
Common Lisp CFFI binding for libpolycall 1.5. The adapter maps Lisp calls to the single core entry point:
polycall_ffi_run_config(config_path, 1)Configuration parsing, validation, networking, and runtime policy remain in libpolycall. This package only marshals a UTF-8 configuration path and returns the core status unchanged.
Install the source package
npm install @obinexusltd/lisp-polycallThe npm package publishes the complete ASDF system, Common Lisp sources,
native adapter, headers, configuration, examples, and tests. Calling
require('@obinexusltd/lisp-polycall') returns absolute paths to the packaged
files.
Requirements
- an ANSI Common Lisp implementation such as SBCL
- ASDF and CFFI
- libpolycall 1.5 development library and headers
- a C11 compiler and GNU Make
Build
Build the standalone adapter archive without linking libpolycall:
makeBuild the shared CFFI library by supplying the linker flags for libpolycall:
export POLYCALL_LDFLAGS='-L/path/to/lib -lpolycall'
make nativePowerShell uses the same variable:
$env:POLYCALL_LDFLAGS = '-LC:\path\to\lib -lpolycall'
make nativeAdd this checkout to ASDF's source registry and load the system:
(ql:quickload :cffi)
(asdf:load-asd #p"/path/to/lisp-polycall/lisp-polycall.asd")
(asdf:load-system "lisp-polycall")Place the native library on the platform search path, or load it explicitly:
(lisp-polycall:load-library #p"/absolute/path/to/liblisp_polycall.so")API
(lisp-polycall:run-config "lisp-polycallrc")
(lisp-polycall:run-config-or-error "lisp-polycallrc")run-configreturns the exact libpolycall status.run-config-or-errorsignalspolycall-errorfor a non-zero status.- Omitting the path uses
lisp-polycallrc. polycall-error-statusandpolycall-error-config-pathexpose condition data.
See examples/basic.lisp for a runnable example.
Verification
The default suite needs only a C compiler, Make, Node.js, and PowerShell on Windows:
npm testIt verifies exact path forwarding, the required validation flag, status propagation, thin-adapter constraints, ASDF metadata, and npm package completeness.
With SBCL, ASDF, and CFFI installed, run the end-to-end smoke test:
npm run test:lispPackage layout
lisp-polycall.asd— ASDF system and test systemsrc/*.lisp— public Common Lisp API and CFFI definitionssrc/lisp_polycall.c— native forwarding adapterinclude/— adapter C headergenerated/polycall/— minimal generated core FFI declarationexamples/andtests/— usage and verification
Author and license
Copyright © 2026 Nnamdi Michael Okpala [email protected].
Released under the MIT License.
