https://github.com/denyncrawford/deno-printers
A simple rust ffi binding for allowing hardware printing with deno
https://github.com/denyncrawford/deno-printers
Last synced: 5 months ago
JSON representation
A simple rust ffi binding for allowing hardware printing with deno
- Host: GitHub
- URL: https://github.com/denyncrawford/deno-printers
- Owner: denyncrawford
- License: mit
- Created: 2024-05-14T16:16:06.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T13:58:59.000Z (almost 2 years ago)
- Last Synced: 2025-09-13T15:54:29.597Z (10 months ago)
- Language: Rust
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Native Printer Bindings for Deno
This is a Deno module that provides native printer bindings for Deno.
[](https://jsr.io/@/)
## Installation
```sh
deno add @denyncrawford/printers
```
> Note: This package requires the `--unstable-ffi` flag to be set.
## Usage
```ts
import { getPrinters, getPrinterByName, print, printFile } from "jsr:@denyncrawford/printers";
const printers = getPrinters();
const printer = getPrinterByName("HP OfficeJet Pro 8600");
print(printer, "Hello World!");
printFile(printer, "/path/to/file.txt");
```
## Building
To build your own lib binary, run the following command:
```sh
cargo build --release --lib
```