Standard library

Standard library

The standard library (Lib/std) is an ordinary Kairo library named kairo::std, spelled std. Nothing in it is implicit: write import std::io and call io::println.

PageContents
std::ioPrinting to standard output and standard error.
std::envThe process's view of its host.
std::memHeap allocation, re-exported from the core library.
std::ctypesTypes for talking to C and C++ that Kairo's primitives do not cover.
std::rt::Float8The OCP FP8 formats F8E4M3 and F8E5M2 as library structs.

Root re-exports

pub import io

The std::io module: print, println, eprint, eprintln and flush.

pub import env

The std::env module: the process's view of its host (exe_path).

pub import ctypes::*

C and C++ character types (c_char, c_wchar, c_char16, c_char8), re-exported at the std root, so they are spelled std::c_char and so on.

pub import mem::*

The allocation API from std::mem (create, destroy, AllocatorScope, ...), re-exported at the std root.

Generated from Kairo source, Apache-2.0 WITH AdditionRef-Kairo-Runtime-exception.