npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@obinexusltd/pascal-polycall

v1.0.0

Published

Free Pascal source binding for libpolycall 1.5

Downloads

75

Readme

@obinexusltd/pascal-polycall

Free Pascal source binding for libpolycall 1.5.

The package is a thin adapter. PascalPolycall.pas converts a Pascal UTF8String to a stable PAnsiChar, and the native shim makes exactly one call to polycall_ffi_run_config(config_path, 1). Configuration parsing, validation, and runtime behavior remain in libpolycall.

Install

npm install @obinexusltd/pascal-polycall

This is a native source package. The npm tarball contains the Pascal and C sources, public and generated headers, examples, tests, scripts, Makefile, manifest, configuration, and license—not platform-specific binaries.

Pascal API

program Service;

{$mode objfpc}{$H+}

uses
  PascalPolycall;

var
  Status: LongInt;

begin
  Status := PolycallRunConfig('pascal-polycallrc');
  if Status <> 0 then
    Halt(Status);
end.

For exception-oriented startup code:

try
  PolycallRunConfigOrRaise('pascal-polycallrc');
except
  on Error: EPolycallError do
    WriteLn('libpolycall status: ', Error.Status);
end;
  • PolycallRunConfig returns the libpolycall status unchanged.
  • PolycallRunConfigOrRaise raises EPolycallError for nonzero statuses.
  • Omitting the path uses pascal-polycallrc.
  • Paths cross the C boundary as NUL-terminated UTF-8 strings.

Build and test

Build the native adapter archive and run all available checks:

npm run build
npm test

The current machine has GCC and GNU Make but does not have Free Pascal (fpc) installed. npm test therefore runs the native mock contract test, boundary audit, and npm package tests, while reporting the Pascal smoke test as skipped. When fpc is on PATH, that smoke test runs automatically.

You can invoke the Pascal-specific operations directly:

npm run build:pascal
npm run test:pascal

The native test proves that paths are forwarded unchanged, validation mode is always 1, and success/failure statuses are not rewritten. The Pascal test exercises default and explicit paths plus EPolycallError through the actual Pascal/C link boundary.

Link with libpolycall

Build libpolycall first, then make its library and this package's adapter archive visible to the Free Pascal linker. A typical GNU-compatible command is:

fpc -Mobjfpc `
  -Fu./src `
  -Fl./lib `
  -FlC:/path/to/libpolycall/lib `
  -k-lpascal_polycall `
  -k-lpolycall `
  examples/basic.pas

Run npm run build first so lib/libpascal_polycall.a exists. Adjust library paths and names for the selected libpolycall build and platform.

JavaScript build-tool entry point

The CommonJS entry point indexes every published project directory:

const binding = require('@obinexusltd/pascal-polycall');

console.log(binding.pascalUnit);
console.log(binding.directories.src.relativeFiles);
console.log(binding.resolve('examples', 'basic.pas'));

Indexed relative directories are src, include, generated, dist, examples, tests, and scripts. resolve() prevents traversal outside the selected directory.

Publish

npm pack --dry-run
npm publish --access public

Publishing is never performed automatically.

License

MIT © 2026 Nnamdi Michael Okpala ([email protected]).