docs

你正在阅读 v0.1.0 的文档。Nabi 0.1.0 已不再提供支持。 最新版本:v0.1.3 →

std

API 参考只有英文版,由标准库源代码中的英文文档注释生成。

the target-dependent tier. fs, net, time, thread (OS), env, process, path, panic (the panic hook), random (the OS random source), nabion (the NABION data format), plugin (loading plugins), reload (hot reload under nabi dev), wit (the component model's async ABI under WIT bindings).

Modules

  • env arguments, environment variables, directories.
  • fs files and directories over the openat family, so a Dir handle is a capability.
  • nabion NABION (Nabi Object Notation, .nabion): one value written in Nabi literal syntax.
  • net TCP / UDP sockets, addresses, DNS.
  • os what only some OSes have.
  • panic a hook that sees every panic before the process ends (or, under #[on_panic], before the C caller gets its value back).
  • path Path, a UTF-8 path value with Python-style / joining.
  • plugin load a plugin into this program and call its functions.
  • process child processes.
  • random cryptographically secure random bytes from the OS (getrandom on Linux, getentropy on macOS, BCryptGenRandom on Windows, random_get on WASI), seedable generators (Rng) with ranges of any integer type and the common distributions, and one-call forms over a shared generator.
  • reload hot reload under nabi dev: where changes apply, code that runs around them, and state that lives through them.
  • thread OS threads, 1:1.
  • time the wall clock (SystemTime), the boot clock (BootTime), and the civil calendar: Date, Time, DateTime, Offset, TimeZone and Zoned, with ISO 8601 / RFC 3339 text and strftime-style format / parse_with.
  • wit the component model's async ABI (WASI preview 3) for the bindings ffi::wit::import / ffi::wit::export generate: it runs on the executor, so it lives above bare::ffi::wit.