Repository navigation
v0.1.2
docprims v0.1.2
Release Date: 2026-01-30
Status: Patch Release (Go dynamic libs + TypeScript validation)
Summary
This release fixes Go shared library distribution on macOS and validates TypeScript bindings for both Node.js and Bun runtimes.
Highlights
- Darwin dylib install_name fix: macOS shared library now uses
@rpathfor proper runtime linking - CI musl handling: musl targets correctly skip shared library builds (static-only)
- TypeScript Bun support: Both Node.js and Bun runtimes now work with napi-rs native addon
- TypeScript npm prep: dry-run validated; cross-platform prebuild workflow planned for future release
Go Shared Library Fix (darwin)
Issue
The macOS shared library had a hardcoded CI build path in its install_name:
/Users/runner/work/docprims/docprims/target/.../libdocprims_ffi.dylib
This caused runtime linking failures for Go docprims_shared consumers.
Fix
Post-build install_name_tool in CI:
install_name_tool -id "@rpath/libdocprims_ffi.dylib" libdocprims_ffi.dylibConsumer Usage
# Development (DYLD_LIBRARY_PATH)
DYLD_LIBRARY_PATH=./lib-shared/darwin-arm64 go run .
# Production (rpath at link time)
go build -ldflags="-r /path/to/lib-shared/darwin-arm64" .TypeScript Runtime Support
Validated Runtimes
| Runtime | Version | Status |
|---|---|---|
| Node.js | v22.x | Validated |
| Bun | v1.3.x | Validated |
Consumer Validation
Validated from external consumer project using file: protocol linking:
- Markdown, HTML, DOCX extraction all work
- Real-world 147KB DOCX successfully extracted (7,314 chars, 65 blocks)
- Error handling (
DocprimsError) works correctly - TypeScript types match runtime shape
Fix: Bun Runtime Guard Removed
The initial TypeScript bindings included a conservative guard that blocked Bun runtime. Testing confirmed napi-rs native addons work correctly in Bun, so the guard was removed.
TypeScript npm Publishing Learnings
Dry-run Results
npm notice 📦 @3leaps/docprims@0.1.1
npm notice package size: 961.4 kB
npm notice total files: 26
Only local platform binary (docprims.darwin-arm64.node) would be published.
Path Forward
npm publishing requires cross-platform prebuilds via napi-rs:
- Platform-specific optional packages (
@3leaps/docprims-linux-x64-gnu, etc.) - CI workflow to build all platforms
- First publish must be manual from pristine checkout
See .plans/active/v0.1.2/npm-publish.md for detailed implementation plan.
CI Changes
go-bindings-prep.yml: Addedinstall_name_toolpost-build for darwingo-bindings-prep.yml: musl targets skip.sopackaging (static-only)release.yml: musl platforms skip shared lib validation
Changelog
See CHANGELOG.md for detailed changes.