Module std

Standard library for the Alumina language.

It is a collection of functions, macros, protocols and types that are essential for writing portable code. Follows a similar scope and structure as the Rust standard library.

Modules

Builtin types and their method implementations.
cmp
Equality and comparison
Heap-allocating collections.
ffi
Utilities related to FFI bindings.
fmt
String formatting
fs
Working with files and directories
Generic (non-cryptographic) hashing support
Functions implemented directly in the compiler.
io
Streams and other byte I/O functionality
Iterators.
Utilities for advanced macro usage
Math functions
mem
Working with memory (allocation, slices, copying, ...)
net
Network sockets
Optional values
Panic support macros and functions
Items available everywhere without having to use them
A module for working with processes.
Random number generation
Integer ranges
Type for operations that can fail.
Run time glue code (program entrypoint, tests, ...)
String functions
Thread synchronization primitives
Multi-threading support
Time and duration functions
Type reflection and dyn objects
Various utility functions useful in the generic context.

Macros

Causes the compilation to fail if reached.
Emits a compile-time warning.
Emits a note during compilation.
Panics if cond evaluates to false.
Panics if lhs and rhs are not equal.
Panics if lhs and rhs are equal.
Panics if cond evaluates to false when compiled in debug mode. Otherwise, does nothing.
Panics if lhs and rhs are not equal when compiled in debug mode. Otherwise, does nothing.
Panics if lhs and rhs are equal when compiled in debug mode. Otherwise, does nothing.
Aborts the compilation if cond evaluates to false during compilation.
Aborts the compilation if lhs and rhs are not equal during compilation.
Aborts the compilation if lhs and rhs are equal during compilation.
Treats the location as unreachable during program flow.
Assume that the condition is always true.
Hint to the compiler that a particular boolean expression is likely true.
Hint to the compiler that a particular boolean expression is unlikely to be true.
Returns the line in the source code at which the macro was invoked.
Returns the column in the source code at which the macro was invoked.
Returns the file in the source code at which the macro was invoked.
env
Returns the value of an environment variable during compilation.
cfg
Returns the value of a configuration flag during compilation.
Reads a file during compilation and returns its contents as a string slice.
Concatenates strings at compile time.
Stringifies an expression.
dbg
A helper for printing a value of a subexpression for debugging purposes.