urma-io
Small I/O primitives for bounded input and deliberate output.
crates.io · API reference · Source · URMA
Use urma-io for the file operations shared by URMA components: reading with an explicit size limit, writing through a temporary file, and hashing streams.
Get started
Hash bytes from a reader
use Cursor;
digest reads from the stream's current position; it does not rewind it.
API guide
| Entry point | Use it for |
|---|---|
read_bounded |
Read a file with a caller-selected byte limit. |
write_new |
Write atomically without replacing an existing destination. |
write_replace |
Atomically replace a destination. |
digest |
Compute a SHA-256 digest from a reader. |
Where it fits
For sensitive inputs on supported native targets, see read_private, read_regular and create_private_directory in the API. These are used by urma-identity, urma-runtime and higher-level workflows.
Boundaries
Native private-file helpers rely on Unix filesystem semantics. A WASM build does not imply browser access to native filesystem operations. Choose the helper appropriate to the target and handle its errors.
License
0BSD. Part of the URMA workspace, maintained by Zmole Cristian. Project contact.