| Crates.io | otter-node |
| lib.rs | otter-node |
| version | 0.1.3 |
| created_at | 2026-01-15 12:38:25.866547+00 |
| updated_at | 2026-01-16 06:42:51.850751+00 |
| description | Node.js API layer for Otter |
| homepage | https://github.com/octofhir/otter |
| repository | https://github.com/octofhir/otter |
| max_upload_size | |
| id | 2045480 |
| size | 347,485 |
Node.js API compatibility layer for Otter.
otter-node provides Node.js-compatible APIs for the Otter runtime, enabling existing Node.js code to run with minimal modifications.
path - Path manipulation utilitiesbuffer - Binary data handlingfs - File system operationscrypto - Cryptographic operations (randomBytes, createHash, etc.)stream - Web Streams API (ReadableStream, WritableStream)websocket - WebSocket clientworker - Web Worker APItest - Test runner (describe, it, assert)Add to your Cargo.toml:
[dependencies]
otter-node = "0.1"
use otter_node::path;
use otter_node::buffer::Buffer;
// Path manipulation
let joined = path::join(&["foo", "bar", "baz.txt"]);
assert_eq!(joined, "foo/bar/baz.txt");
// Buffer operations
let buf = Buffer::from_string("hello", "utf8").unwrap();
assert_eq!(buf.to_string("base64", 0, buf.len()), "aGVsbG8=");
MIT