@obinexusltd/julia-polycall
v1.0.0
Published
Julia ccall source binding for libpolycall 1.5
Maintainers
Readme
@obinexusltd/julia-polycall
Julia ccall binding for
libpolycall 1.5. The adapter maps
Julia 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 project only marshals the configuration path across the C boundary and returns the core status unchanged.
Install the source package
npm install @obinexusltd/julia-polycallThe npm package publishes the complete Julia and C source tree. It is a native
source distribution rather than a JavaScript implementation. Calling
require('@obinexusltd/julia-polycall') returns absolute paths to the packaged
Julia project, sources, headers, configuration, manifest, and Makefile.
For Julia development from a checkout or unpacked npm package:
julia --project=. -e 'using Pkg; Pkg.instantiate()'Requirements
- Julia 1.10 or newer
- libpolycall 1.5 development library and headers
- a C11 compiler and GNU Make
Build
Build the standalone adapter archive without linking libpolycall:
makeBuild the Julia-loadable shared 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 nativePlace julia_polycall.dll, libjulia_polycall.so, or
libjulia_polycall.dylib in the platform library search path. Alternatively,
set JULIA_POLYCALL_LIBRARY to the absolute shared-library path before loading
JuliaPolycall.
API
using JuliaPolycall
status = run_config("julia-polycallrc")
run_config_or_throw("julia-polycallrc")run_configreturns the exact libpolycall status as anInt.run_config_or_throwraisesPolycallErrorfor a non-zero status.- Omitting the path uses
julia-polycallrc. - Julia's
Cstringconversion rejects embedded NUL characters.
See examples/basic.jl 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, and npm package completeness.
With Julia installed, run the end-to-end ccall smoke test:
npm run test:juliaPackage layout
Project.tomlandsrc/JuliaPolycall.jl— standard Julia packagec_src/— native adapter exported forccallinclude/— adapter C headergenerated/polycall/— minimal generated core FFI declarationexamples/— Julia example and sample configurationtest/andtests/— Julia, native, and npm package tests
Author and license
Copyright © 2026 Nnamdi Michael Okpala [email protected].
Released under the MIT License.
