Hacker News new | ask | show | jobs
Show HN: Cross-runtime printer library for TS/JS (github.com)
1 points by esimkowitz 222 days ago
Hi all,

I needed to interface with a printer for a work project and I found myself really frustrated with the state of printer libraries for Deno (and Node for that matter) so I decided to make my own!

Getting it working cross-runtime was a real pain. I initially tried to make separate NPM and JSR packages but that proved to be really hard to validate so I switched to just publishing to NPM and being really good about runtime detection and documentation.

It's backed by the Rust `printers` library and uses NAPI-RS for FFI. I've tested it on macOS, Ubuntu/Debian, and Windows, though I think the Winspool options might not be 100% correct. I'm trying to make it more full-featured too with state subscriptions, job tracking, etc.

Let me know what you think!