Skip to content

Portals ​

Standard library interfaces.

Status: Fleshed Out ◐

Interface crates with native, mock, WASM, and portable backends. Capability audit completed. Roadmap fully completed (all checkpoints). Maturity limited primarily by ecosystem adoption rather than design/implementation gaps.

Repository: github.com/rhi-zone/portals

Overview ​

Portals provides capability-based, async-first interfaces inspired by WASI, designed to be implementable across runtimes.

Interface crates (23) ​

CategoryInterfaces
WASI-alignedclocks, filesystem, http, io, random, sockets
Storageblobstore, cache, keyvalue, sql
Networkdns, websocket, messaging
Securitycrypto (SHA2, HMAC, AES-GCM, Ed25519, Argon2)
Utilitiesconfig, cron, encoding, logging, markdown, nanoid, observe, snowflake, timezone

Backends ​

Each interface has multiple backend implementations:

TypeCountExamples
Native19tokio-based sockets, reqwest HTTP, libsql
WASM5gloo-net HTTP, web-sys console logging
Mock3Testing implementations for clocks, HTTP, random
Portable2cron, encoding (work on native + WASM)

Design principles ​

  • Capability-based: Access is granted through capability objects, not ambient authority
  • Async-first: Operations that may block return futures
  • Minimal: Define interfaces, not implementations
  • Portable: Implementable on native, WASM, and embedded targets