# Rux Programming Language > Rux is a compiled, statically typed systems programming language. This site holds the Learn Rux course, the language reference, the CLI and packaging guides, and the standard-package API. ## Documentation Sets - [Rux Programming Language — full documentation](https://rux-lang.dev/llms-full.txt): Every course lesson, reference, CLI, packaging and API page of rux-lang.dev as Markdown. ## Learn Rux The course: getting started, 25 parts from Basics to Projects, one runnable program per lesson. - [Learn Rux](https://rux-lang.dev/raw/docs/learn.md): A free, hands-on course that takes you from installing Rux to writing complete programs — 231 short lessons in 25 parts, each one a runnable package you can read, run and change. - [Install on FreeBSD](https://rux-lang.dev/raw/docs/learn/install/freebsd.md): This guide explains how to install the Rux compiler on FreeBSD from the prebuilt release tarball. There is no native pkg package yet. - [Install on Linux](https://rux-lang.dev/raw/docs/learn/install/linux.md): This guide explains how to install the Rux compiler on Linux — using the universal install script, your distribution's package manager, or the prebuilt release tarball. - [Install on macOS](https://rux-lang.dev/raw/docs/learn/install/macos.md) - [Install on Windows](https://rux-lang.dev/raw/docs/learn/install/windows.md): This guide explains how to install the Rux compiler on Windows, either with the MSI installer or using Scoop, a command-line package manager for Windows. - [Build From Source](https://rux-lang.dev/raw/docs/learn/build.md): This guide explains how to build the Rux compiler from source with CMake, Ninja, and Clang. It works on every platform Rux supports, including platforms without a prebuilt package. - [Visual Studio Code](https://rux-lang.dev/raw/docs/learn/editors/vscode.md): Visual Studio Code is the recommended editor for Rux. The official Rux Language extension adds syntax highlighting for .rux source files. - [Sublime Text](https://rux-lang.dev/raw/docs/learn/editors/sublime.md): The official Rux package for Sublime Text adds syntax highlighting for .rux source files. - [Zed Editor](https://rux-lang.dev/raw/docs/learn/editors/zed.md): Zed is a fast, multiplayer code editor for macOS and Linux. The official Rux extension adds syntax highlighting for .rux source files. - [Your First Project](https://rux-lang.dev/raw/docs/learn/first-project.md): Create a Rux package with rux new, print Hello, World, build and run it, read your first compiler error, and clone the Examples repository the course is built on. - [Learn Rux with AI](https://rux-lang.dev/raw/docs/learn/ai.md): Use Claude Code, Codex or a chat assistant as a study partner for the Rux course — set them up with the right context, use ready-made prompts, and let the compiler check every answer. - [Rux Cheat Sheet](https://rux-lang.dev/raw/docs/learn/cheatsheet.md): The syntax taught across the Learn Rux course on one page — bindings, types, control flow, functions, structs, variants, optionals, errors, generics, ownership and pointers — with a link to the lesson for each. - [Basics](https://rux-lang.dev/raw/docs/learn/basics.md): First programs: printing, values and their types. Twelve short lessons that take you from Hello, World to every primitive type and how to convert between them. - [Hello, World](https://rux-lang.dev/raw/docs/learn/hello.md): Print one line of text — the smallest complete Rux program. - [Comment](https://rux-lang.dev/raw/docs/learn/comment.md): Write the three kinds of comment — //, /* */ and /// — and see that block comments nest. - [Variable](https://rux-lang.dev/raw/docs/learn/variable.md): Name a value with let, and let the compiler infer its type from the value. - [Mutable](https://rux-lang.dev/raw/docs/learn/mutable.md): Declare a variable that can change with var, and give it new values with =. - [Integer](https://rux-lang.dev/raw/docs/learn/integer.md): Meet the integer types — signed and unsigned, from 8 to 512 bits, plus the machine-sized int and uint — and print the range each one holds. - [Float](https://rux-lang.dev/raw/docs/learn/float.md): Store fractional numbers in float64, float32 and the float alias, and see why a float is only ever an approximation. - [Boolean](https://rux-lang.dev/raw/docs/learn/boolean.md): Hold a yes-or-no value with true, false and bool, and meet the sized boolean types. - [Character](https://rux-lang.dev/raw/docs/learn/character.md): Write single characters with 'A', escapes and \u{...}, and meet char and the sized character types char8 to char64. - [Literal](https://rux-lang.dev/raw/docs/learn/literal.md): Spell numbers in other bases, with digit separators, exponents and suffixes, and see how an unsuffixed literal takes the type of the value beside it. - [Console](https://rux-lang.dev/raw/docs/learn/console.md): Write to the console with Print and PrintLine, and fill {} placeholders with values. - [Const](https://rux-lang.dev/raw/docs/learn/const.md): Name a value the compiler works out before the program runs, and see where const differs from let. - [Convert](https://rux-lang.dev/raw/docs/learn/convert.md): Convert between numeric, character and boolean types with as, and see what a value that does not fit becomes. - [Operators](https://rux-lang.dev/raw/docs/learn/operators.md): Combining values into new ones: arithmetic, comparison, logic and compound assignment, and the precedence that decides which operator applies first. - [Arithmetic](https://rux-lang.dev/raw/docs/learn/arithmetic.md): Calculate with + - * / %, and see why 17 / 5 is 3 for integers but 3.4 for floats. - [Comparison](https://rux-lang.dev/raw/docs/learn/comparison.md): Compare two values with == != < <= > >= and get a bool back. - [Logical](https://rux-lang.dev/raw/docs/learn/logical.md): Combine bools with && || !, and watch short-circuiting skip the right side once the left has decided. - [Assignment](https://rux-lang.dev/raw/docs/learn/assignment.md): Update a variable in place with += and friends, and step it by one with ++ and --. - [Precedence](https://rux-lang.dev/raw/docs/learn/precedence.md): Predict which operator applies first, how same-rank operators group left to right, and when to add parentheses. - [Control flow](https://rux-lang.dev/raw/docs/learn/control-flow.md): Choosing and repeating: if and else if chains, the conditional operator, while, do-while, loop, for over ranges, break, continue, labels and match. - [If](https://rux-lang.dev/raw/docs/learn/if.md): Run a block only when a condition holds, and pick between two blocks with else. - [Else if](https://rux-lang.dev/raw/docs/learn/else-if.md): Choose among several cases with an else if chain, where the first condition that holds wins. - [Ternary](https://rux-lang.dev/raw/docs/learn/ternary.md): Choose between two values inside an expression with condition ? a : b. - [While](https://rux-lang.dev/raw/docs/learn/while.md): Repeat a block while a condition holds, testing it before every pass, so the body may run zero times. - [Do-while](https://rux-lang.dev/raw/docs/learn/do-while.md): Run a loop body first and test afterwards with do { } while condition;, so the body runs at least once. - [Loop](https://rux-lang.dev/raw/docs/learn/loop.md): Repeat with loop, which has no condition and ends only through break. - [Break](https://rux-lang.dev/raw/docs/learn/break.md): Leave a loop early with break, and tell afterwards whether it ran. - [Continue](https://rux-lang.dev/raw/docs/learn/continue.md): Skip the rest of one pass with continue, without leaving the loop. - [Range](https://rux-lang.dev/raw/docs/learn/range.md): Describe a run of integers with a..b or a..=b, read its bounds, and spot an empty range. - [For](https://rux-lang.dev/raw/docs/learn/for.md): Walk every value of a range with for name in range. - [Label](https://rux-lang.dev/raw/docs/learn/label.md): Aim break and continue at an outer loop by giving it a label. - [Match](https://rux-lang.dev/raw/docs/learn/match.md): Choose what to run by comparing one value against a list of arms, with else for the rest. - [Match expression](https://rux-lang.dev/raw/docs/learn/match-expression.md): Use match as an expression whose arms produce the value. - [Functions](https://rux-lang.dev/raw/docs/learn/functions.md): Naming a piece of work and reusing it: parameters and results, early return, recursion, overloads, default arguments, generic functions and callbacks. - [Function](https://rux-lang.dev/raw/docs/learn/function.md): Write functions that take typed parameters and give back a result, and call them from Main. - [Return](https://rux-lang.dev/raw/docs/learn/return.md): Leave a function early with return, and write functions that have no result at all. - [Recursion](https://rux-lang.dev/raw/docs/learn/recursion.md): Solve a problem with a function that calls itself, stopping at a base case. - [Overload](https://rux-lang.dev/raw/docs/learn/overload.md): Give several functions one name and let each call's arguments choose between them. - [Default argument](https://rux-lang.dev/raw/docs/learn/default-argument.md): Give a parameter a default value so calls can leave that argument out. - [Generic](https://rux-lang.dev/raw/docs/learn/generic.md): Write one function with a type parameter that works for many types, inferred or given explicitly. - [Callback](https://rux-lang.dev/raw/docs/learn/callback.md): Pass a named function to another function as a value, typed by its shape like func(int32) -> int32. - [Sequences](https://rux-lang.dev/raw/docs/learn/sequences.md): Many values of one type and small groups of different ones: arrays, nested arrays, read-only and writable slices, variadic functions, tuples and destructuring. - [Array](https://rux-lang.dev/raw/docs/learn/array.md): Store a fixed number of values inline in an int32[4], index them from zero, and see that copying an array copies every element. - [Array repeat](https://rux-lang.dev/raw/docs/learn/array-repeat.md): Build an array of many equal elements with [0; 16], and see that the repeated value is evaluated only once. - [Array nested](https://rux-lang.dev/raw/docs/learn/array-nested.md): Build a two-dimensional grid as an array of arrays, int32[4][3], and walk it by rows and by columns. - [Slice](https://rux-lang.dev/raw/docs/learn/slice.md): Pass arrays of any length to one function through a read-only view, int32[..], and take views of part of an array with ranges. - [Writable slice](https://rux-lang.dev/raw/docs/learn/writable-slice.md): Change an array's elements through a writable view, var int32[..], and see that a view's writability is separate from its binding's mutability. - [Variadic](https://rux-lang.dev/raw/docs/learn/variadic.md): Write a function that takes any number of arguments with args: int32..., and spread a slice back into arguments with args.... - [Tuple](https://rux-lang.dev/raw/docs/learn/tuple.md): Group values without declaring a type, (int32, bool), reach the members with .0 and .1, and return several results from one function. - [Destructure](https://rux-lang.dev/raw/docs/learn/destructure.md): Unpack a tuple into named bindings in one step with let (x, y) = pair;, including nested patterns and _. - [Types](https://rux-lang.dev/raw/docs/learn/types.md): Declare types of your own: structs with named fields, references that borrow instead of copying, methods and constructors, enums, variants that carry data, aliases and function fields. - [Struct](https://rux-lang.dev/raw/docs/learn/struct.md): Group named fields into a type of your own, and build values of it with a struct literal. - [Reference](https://rux-lang.dev/raw/docs/learn/reference.md): Borrow a value with &T, so a function can read it without copying it. - [Mutable reference](https://rux-lang.dev/raw/docs/learn/mutable-reference.md): Lend a value with &var T, so a function can change the caller's value in place. - [Method](https://rux-lang.dev/raw/docs/learn/method.md): Give a type its own functions with extend, and call them on a value as value.Method(). - [Mutating method](https://rux-lang.dev/raw/docs/learn/mutating-method.md): Write methods that change the value they are called on, with self: &var T. - [Constructor](https://rux-lang.dev/raw/docs/learn/constructor.md): Build values through a function named after the type, which can check or compute the fields. - [Extension](https://rux-lang.dev/raw/docs/learn/extension.md): Add methods to a type you did not write, from int to the slice int[..]. - [Enum](https://rux-lang.dev/raw/docs/learn/enum.md): Declare a type whose values are a fixed list of named cases. - [Enum value](https://rux-lang.dev/raw/docs/learn/enum-value.md): Give enum cases chosen numbers, and convert between a case and its number with as. - [Variant](https://rux-lang.dev/raw/docs/learn/variant.md): Declare and build cases that carry data of their own. - [Variant match](https://rux-lang.dev/raw/docs/learn/variant-match.md): Match a variant and bind the data its case carries. - [Type alias](https://rux-lang.dev/raw/docs/learn/type-alias.md): Give an existing type a second name with type, and see why that name is not a new type. - [Function field](https://rux-lang.dev/raw/docs/learn/function-field.md): Store a function in a struct field, so a value carries its behaviour with it. - [Patterns](https://rux-lang.dev/raw/docs/learn/patterns.md): Everything a match arm can say: guards, ranges, tuples, named fields and characters, and why the compiler insists that a match covers every case. - [Guard](https://rux-lang.dev/raw/docs/learn/guard.md): Add a condition to a match arm with pattern if condition =>, and fall through to the next arm when it is false. - [Range pattern](https://rux-lang.dev/raw/docs/learn/range-pattern.md): Match a whole run of integers in one arm with 1..=9 => and 0..10 =>, and narrow a range with a guard. - [Tuple pattern](https://rux-lang.dev/raw/docs/learn/tuple-pattern.md): Decide on several values at once by matching a tuple, with arms such as (0, 0) =>, (x, 0) => and (_, y) =>. - [Struct pattern](https://rux-lang.dev/raw/docs/learn/struct-pattern.md): Take apart a variant case with named fields — .Circle { radius } => — binding, renaming, ignoring or testing each field. - [Character pattern](https://rux-lang.dev/raw/docs/learn/character-pattern.md): Match character literals and escapes such as 'w' and '\n', and use a guard for a class of characters. - [Exhaustive](https://rux-lang.dev/raw/docs/learn/exhaustive.md): See why a match on a variant must name every case, and why an integer match needs else. - [Optionals](https://rux-lang.dev/raw/docs/learn/optionals.md): A value that may be absent: T?. Six lessons on none, presence patterns, fallbacks with ??, early exits with ?? return, passing absence up with ?, and int??. - [Optional](https://rux-lang.dev/raw/docs/learn/optional.md): Write a value that may be absent as T?, with none for absence and a plain value becoming present on its own. - [Presence](https://rux-lang.dev/raw/docs/learn/presence.md): Open an optional with match: value? for a present value and none for absence. - [Coalesce](https://rux-lang.dev/raw/docs/learn/coalesce.md): Replace absence with a fallback value using ??, which runs the fallback only when it is needed. - [Coalesce exit](https://rux-lang.dev/raw/docs/learn/coalesce-exit.md): Leave a function or loop with ?? return, ?? continue or ?? break when an optional is absent. - [Optional propagate](https://rux-lang.dev/raw/docs/learn/optional-propagate.md): Pass absence up to the caller with ? in a function that returns an optional. - [Nested optional](https://rux-lang.dev/raw/docs/learn/nested-optional.md): Tell two kinds of absence apart with int??, an optional of an optional. - [Errors](https://rux-lang.dev/raw/docs/learn/errors.md): Operations that can fail: T ! E. Sixteen lessons on reporting a failure with fail, handling it with match and catch, passing it on with ?, designing error types, and stopping the program with Panic and Assert when only a bug could be to blame. - [Fallible](https://rux-lang.dev/raw/docs/learn/fallible.md): Return a value or an error with T ! E, where return value; is the success, and tell the two apart with .Success and .Failure. - [Fail](https://rux-lang.dev/raw/docs/learn/fail.md): Leave a fallible function through its failure channel with fail, carrying an error that says what went wrong. - [Unit fallible](https://rux-lang.dev/raw/docs/learn/unit-fallible.md): Write a fallible function with no success value, -> ! E, which succeeds by reaching its end. - [Outcome](https://rux-lang.dev/raw/docs/learn/outcome.md): Store, pass, build and match a fallible's outcome through .Success and .Failure. - [Discard](https://rux-lang.dev/raw/docs/learn/discard.md): See why a fallible result cannot be silently ignored, and how to discard one on purpose. - [Catch](https://rux-lang.dev/raw/docs/learn/catch.md): Recover from a failure with catch, giving one arm per error case. - [Catch fallback](https://rux-lang.dev/raw/docs/learn/catch-fallback.md): Use catch { else => fallback } to get the success or a default value. - [Propagate](https://rux-lang.dev/raw/docs/learn/propagate.md): Hand a failure to the caller with postfix ?, which keeps the success and passes the error on unchanged. - [Error variant](https://rux-lang.dev/raw/docs/learn/error-variant.md): Design an error as a variant whose cases carry exactly the details each failure needs. - [Error mapping](https://rux-lang.dev/raw/docs/learn/error-mapping.md): Pass a failure to the caller with ? else, turning it into your own error and adding context such as a line number. - [Error sum](https://rux-lang.dev/raw/docs/learn/error-sum.md): Let one function fail with either of two error types, ! (DigitError | RangeError), and tell them apart with typed patterns. - [Fallible main](https://rux-lang.dev/raw/docs/learn/fallible-main.md): Declare func Main() -> ! E so ? works at the top level, and see that a failure ends the program with exit status 1 without printing anything. - [Absence to error](https://rux-lang.dev/raw/docs/learn/absence-to-error.md): Turn a missing value into a failure that says what was missing, with option ?? fail. - [Nested fallible](https://rux-lang.dev/raw/docs/learn/nested-fallible.md): Keep two meanings apart by nesting: int? ! E for "the next value, the end, or a failure", and (int ! E1) ! E2 for an answer that can itself be a failure. - [Panic](https://rux-lang.dev/raw/docs/learn/panic.md): Stop the program at once with Core::Panic when something that cannot happen has happened. - [Assert](https://rux-lang.dev/raw/docs/learn/assert.md): Check what the program relies on with Assert, kept in every build, and DebugAssert, which a release build removes. - [Sum types](https://rux-lang.dev/raw/docs/learn/sum-types.md): A value that is one of several types: A | B. Five lessons on building sums, matching them by type and by subset, asking which member is active with is, and passing a smaller sum where a larger one is expected. - [Sum type](https://rux-lang.dev/raw/docs/learn/sum-type.md): Store a value that is one of several types — int32 | bool — and see that a sum is a set of types, where order and duplicates do not matter. - [Typed pattern](https://rux-lang.dev/raw/docs/learn/typed-pattern.md): Match a sum by the type it holds — n: int32 => — and use the member as an ordinary value. - [Subset pattern](https://rux-lang.dev/raw/docs/learn/subset-pattern.md): Match several members of a sum in one arm — box: Square | Rectangle => — and get a smaller sum to pass on. - [The is operator](https://rux-lang.dev/raw/docs/learn/is.md): Ask which member a sum holds — token is Number, token is (Plus | Minus) — and get a bool back, without unpacking anything. - [Sum widening](https://rux-lang.dev/raw/docs/learn/sum-widening.md): Pass a smaller sum — Square | Rectangle — where a larger one — Circle | Square | Rectangle — is expected, and see that the value keeps its member. - [Ownership](https://rux-lang.dev/raw/docs/learn/ownership.md): Who owns a value, and when it is cleaned up. Ten lessons on exclusive borrows, copies and moves with <-, destructors, move-only and custom-copy types, partial moves, defer, and variables that start empty. - [Exclusivity](https://rux-lang.dev/raw/docs/learn/exclusivity.md): Hold one &var borrow of a value at a time, and see that a borrow ends at its last use. - [Copy](https://rux-lang.dev/raw/docs/learn/copy.md): See that a by-value copy is a separate value: changing it never changes its source. - [Move](https://rux-lang.dev/raw/docs/learn/move.md): Hand a value on with <- in a binding, an argument and a return, and see the old name become unusable. - [Destructor](https://rux-lang.dev/raw/docs/learn/destructor.md): Write a destructor, func ~T(self: &var T), and watch when the compiler runs it. - [Non-copyable types](https://rux-lang.dev/raw/docs/learn/no-copy.md): Prohibit copying a type with a bodyless func =, so that it can only be moved. - [Custom copy](https://rux-lang.dev/raw/docs/learn/custom-copy.md): Give = a body so that every copy of a type runs your own code. - [Partial move](https://rux-lang.dev/raw/docs/learn/partial-move.md): See why a single field cannot be moved out of a struct, and take the struct apart with <- to move it out instead. - [Defer](https://rux-lang.dev/raw/docs/learn/defer.md): Register cleanup with defer right where the work starts, and see it run in reverse order on every way out. - [Defer return](https://rux-lang.dev/raw/docs/learn/defer-return.md): See that return keeps its value before deferred code runs, and use that to hand out a value and then advance. - [Initialization](https://rux-lang.dev/raw/docs/learn/initialization.md): Declare a var without a value, and see the compiler insist that every path assigns it before a read. - [Interfaces](https://rux-lang.dev/raw/docs/learn/interfaces.md): Behaviour that many types share: declare an interface, hold any implementing type in one value, and plug your own types into printing, comparison, operators, indexing and for loops. - [Interface](https://rux-lang.dev/raw/docs/learn/interface.md): Declare an interface and make a type keep its promise with extend T : I. - [Interface value](https://rux-lang.dev/raw/docs/learn/interface-value.md): Hold values of different types in one interface-typed variable, and let dynamic dispatch pick the method. - [Interface parameter](https://rux-lang.dev/raw/docs/learn/interface-parameter.md): Pass any implementing type to a function through a borrowed &I or &var I parameter. - [Display](https://rux-lang.dev/raw/docs/learn/display.md): Make a type of your own printable with {} by implementing Display, whose WriteDisplay returns ! FormatError. - [Equatable](https://rux-lang.dev/raw/docs/learn/equatable.md): State what equality means for a type by implementing Core's Equatable and its Equals method. - [Comparable](https://rux-lang.dev/raw/docs/learn/comparable.md): Order values of a type by implementing Core's Comparable, whose Compare answers with an Ordering. - [Structural equality](https://rux-lang.dev/raw/docs/learn/structural-equality.md): Compare structs, tuples, arrays and variants with ==, field by field, without writing any code. - [Operator overload](https://rux-lang.dev/raw/docs/learn/operator-overload.md): Define +, == and other operators for a type of your own. - [Derived operator](https://rux-lang.dev/raw/docs/learn/derived-operator.md): Declare == and <, and get !=, >, <= and >= derived from them. - [Indexer](https://rux-lang.dev/raw/docs/learn/indexer.md): Read and write a type of your own with square brackets by declaring func [] and func []=. - [Iterator](https://rux-lang.dev/raw/docs/learn/iterator.md): Make a type walkable by for with a Next method that returns T?. - [Iterable](https://rux-lang.dev/raw/docs/learn/iterable.md): Give a collection an Iterate method so every for loop gets a fresh iterator. - [Generics](https://rux-lang.dev/raw/docs/learn/generics.md): Types and functions that work for many types: six lessons on generic structs and variants, their methods, interface bounds, and helpers that work for every optional, fallible or sum. - [Generic type](https://rux-lang.dev/raw/docs/learn/generic-type.md): Declare a struct and a variant that take a type parameter — Pair, Reading — and use them at several types. - [Generic method](https://rux-lang.dev/raw/docs/learn/generic-method.md): Give a generic type methods with extend Labeled, including a method with a type parameter of its own. - [Generic bound](https://rux-lang.dev/raw/docs/learn/generic-bound.md): Bound a type parameter by an interface — — so the generic can call its methods, and see that a primitive qualifies only through an implementation. - [Multiple bounds](https://rux-lang.dev/raw/docs/learn/multiple-bounds.md): Require two interfaces at once with , so a generic can both compare and print its values. - [Generic outcome](https://rux-lang.dev/raw/docs/learn/generic-outcome.md): Write reusable helpers over T ! E and T? as generic functions, since optionals and fallibles cannot be extended. - [Generic sum](https://rux-lang.dev/raw/docs/learn/generic-sum.md): Build a sum from type parameters — T | U — see it collapse when T and U are the same type, and end its match in else. - [Text](https://rux-lang.dev/raw/docs/learn/text.md): Strings, formatting, parsing and input: thirteen lessons on what a literal really is, UTF-8 and Unicode, views, Strings and builders, placeholder specs, Render, ParseInt32 and ReadLine. - [String literal](https://rux-lang.dev/raw/docs/learn/string-literal.md): See that a string literal is a read-only char8[..] slice: its length counts bytes, escapes write awkward characters, and changing text means copying it first. - [Encoding](https://rux-lang.dev/raw/docs/learn/encoding.md): Write the same text as UTF-8, UTF-16 and UTF-32 with the c8, c16 and c32 prefixes, and see that lengths count code units, not characters. - [String view](https://rux-lang.dev/raw/docs/learn/string-view.md): Borrow text with StringView, checked once to be UTF-8, then trim, search, cut and split it without copying a byte. - [String](https://rux-lang.dev/raw/docs/learn/string.md): Own text with String, which keeps its bytes in allocated memory, and copy it with Clone, which returns String ! TextError. - [String builder](https://rux-lang.dev/raw/docs/learn/string-builder.md): Build text a piece at a time in one growing buffer with StringBuilder, then hand it over as a String with IntoString. - [UTF-8](https://rux-lang.dev/raw/docs/learn/utf8.md): Check bytes with Validate, which fails with a Utf8Failure saying what is wrong and where, and walk text one character at a time with DecodeAt. - [Unicode](https://rux-lang.dev/raw/docs/learn/unicode.md): Count the same text three ways — bytes, scalars and graphemes — and find text where all three counts differ. - [Unicode case](https://rux-lang.dev/raw/docs/learn/unicode-case.md): Change case beyond ASCII, where the full mapping can turn one character into several and the text grows. - [Format](https://rux-lang.dev/raw/docs/learn/format.md): Give a placeholder a width, an alignment and a fill character, so output lines up in columns. - [Format number](https://rux-lang.dev/raw/docs/learn/format-number.md): Spell numbers with a placeholder spec: digits after the point, rounding, scientific notation, number bases, zero padding and an explicit sign. - [Render](https://rux-lang.dev/raw/docs/learn/render.md): Format into a String you keep with Render, which returns String ! FormatError and refuses a wrong pattern before writing anything. - [Parse](https://rux-lang.dev/raw/docs/learn/parse.md): Read a number from text with ParseInt32, which returns int32 ! ParseError and says where malformed or overflowing text went wrong. - [Input](https://rux-lang.dev/raw/docs/learn/input.md): Read lines from standard input with ReadLine, where reaching the end of the input is an IoError whose kind is EndOfStream. - [Memory](https://rux-lang.dev/raw/docs/learn/memory.md): Pointers, raw memory and allocators: reach values by address, ask for memory while the program runs, and choose where it comes from — from Alloc and Free to Box, Arena, FixedBuffer and Pool. - [Pointer](https://rux-lang.dev/raw/docs/learn/pointer.md): Take an address with @, then read through a *T and write through a *var T. - [Out parameter](https://rux-lang.dev/raw/docs/learn/out-parameter.md): Return an answer through a *var T parameter, and see why a fallible T ! E is usually the better choice. - [Raw memory](https://rux-lang.dev/raw/docs/learn/raw-memory.md): Allocate a block with Alloc, clear it with Zero and give it back with Free, checking for null first. - [Pointer arithmetic](https://rux-lang.dev/raw/docs/learn/pointer-arithmetic.md): Move a pointer with + and -, which count whole elements rather than bytes, and walk an array up to an end pointer. - [Pointer slice](https://rux-lang.dev/raw/docs/learn/pointer-slice.md): Turn a pointer and a count into an ordinary slice with p[..n], so raw storage works with for and slice parameters. - [Optional pointer](https://rux-lang.dev/raw/docs/learn/optional-pointer.md): Tell an optional pointer (*T)? from a pointer to an optional *T?, and use each for its own job. - [Layout](https://rux-lang.dev/raw/docs/learn/layout.md): Measure a type's size and alignment with sizeof and alignof, and see the padding that field order puts inside a struct. - [Union](https://rux-lang.dev/raw/docs/learn/union.md): Lay several members over one piece of storage, and keep track yourself of which member holds a value. - [Allocator](https://rux-lang.dev/raw/docs/learn/allocator.md): Allocate through the Allocator interface with SystemAllocator, handling an AllocError before the block is ever used. - [Box](https://rux-lang.dev/raw/docs/learn/box.md): Own one allocated value with Box, which destroys the value and returns its memory when the box's life ends. - [Arena](https://rux-lang.dev/raw/docs/learn/arena.md): Allocate a round of work from an Arena and release all of it at once with Reset. - [Fixed buffer](https://rux-lang.dev/raw/docs/learn/fixed-buffer.md): Allocate from storage you already own with FixedBuffer, which refuses with OutOfMemory once the storage is full. - [Pool](https://rux-lang.dev/raw/docs/learn/pool.md): Reuse fixed-size blocks from a Pool, where a released block goes straight back to the next request of its size. - [Zeroize](https://rux-lang.dev/raw/docs/learn/zeroize.md): Wipe a secret with Zeroize, a clear that the compiler promises never to optimize away. - [Numbers](https://rux-lang.dev/raw/docs/learn/numbers.md): Numbers in depth: integers past 64 bits, the limits of every type, infinity and NaN, working with bits, overflow you can detect or plan for, byte order, and the Math package. - [Wide integer](https://rux-lang.dev/raw/docs/learn/wide-integer.md): Count past 64 bits with int128, int256 and int512 and their unsigned twins: wide literals, silent widening, explicit narrowing, and the same wrap-around at the edges. - [Number limit](https://rux-lang.dev/raw/docs/learn/number-limit.md): Read a type's limits as associated constants — Min, Max, Bits, Lowest, Epsilon — and ask Core for them inside a generic function. - [Float special](https://rux-lang.dev/raw/docs/learn/float-special.md): See where infinity and NaN come from, why NaN == NaN is false, and how to test for them with IsNaN and IsInfinite. - [Bitwise](https://rux-lang.dev/raw/docs/learn/bitwise.md): Work on individual bits with & | ^ ~, and use masks to set, clear, flip and test flags packed into one byte. - [Shift](https://rux-lang.dev/raw/docs/learn/shift.md): Slide bits with <<, >> and >>>, see how the two right shifts differ on a negative number, and pack three fields into one integer. - [Checked arithmetic](https://rux-lang.dev/raw/docs/learn/checked-arithmetic.md): Detect overflow with AddChecked, SubChecked and MulChecked, which return true on overflow and the result through an out-parameter. - [Wrapping arithmetic](https://rux-lang.dev/raw/docs/learn/wrapping-arithmetic.md): Choose what overflow produces: AddWrapping and friends wrap around on purpose, AddSaturating and friends stop at the limit. - [Checked convert](https://rux-lang.dev/raw/docs/learn/checked-convert.md): Convert between number types with ConvertChecked, which reports when the value did not survive, and clamp with ConvertSaturating. - [Bit operation](https://rux-lang.dev/raw/docs/learn/bit-operation.md): Ask questions about bits with CountOnes, LeadingZeros and TrailingZeros, and turn them around with RotateLeft and RotateRight. - [Endian](https://rux-lang.dev/raw/docs/learn/endian.md): Store and load integers as bytes in an explicit order, big endian or little endian, and see what reading them in the wrong order does. - [Math](https://rux-lang.dev/raw/docs/learn/math.md): Tour the Math package — roots, powers, logarithms, trigonometry and rounding — with the domain of each and the limits of floating-point answers. - [Collections](https://rux-lang.dev/raw/docs/learn/collections.md): Containers from the Collections package: vectors that grow, arrays sized at run time, double-ended queues, and hash and tree maps and sets — and how to choose between them. - [Vector](https://rux-lang.dev/raw/docs/learn/vector.md): Push values into a Vector and watch its length and capacity grow apart. - [Dynamic array](https://rux-lang.dev/raw/docs/learn/dynamic-array.md): Make a Collections::Array whose length is chosen at run time, and compare it with an inline int32[4]. - [Deque](https://rux-lang.dev/raw/docs/learn/deque.md): Run a queue with a Deque, adding and removing values at both ends. - [Hash map](https://rux-lang.dev/raw/docs/learn/hash-map.md): Store values under text keys in a HashMap, then look them up, replace them and remove them. - [Hash set](https://rux-lang.dev/raw/docs/learn/hash-set.md): Track which values have been seen with a HashSet, whose Insert reports whether a value was new. - [Tree map](https://rux-lang.dev/raw/docs/learn/tree-map.md): Insert keys into a TreeMap out of order, then walk them in order and ask for a range. - [Tree set](https://rux-lang.dev/raw/docs/learn/tree-set.md): Keep a set of words in a TreeSet, walk it in alphabetical order, and ask which member comes next. - [Algorithms](https://rux-lang.dev/raw/docs/learn/algorithms.md): Sorting, searching and folding slices with the Algorithms package: five lessons on sorting in place, linear and binary search, the smallest and largest element, and collapsing a slice into one answer. - [Sort](https://rux-lang.dev/raw/docs/learn/sort.md): Sort a slice in place with Sort, SortDescending and SortBy, through a writable view var T[..]. - [Search](https://rux-lang.dev/raw/docs/learn/search.md): Find a value with a linear search: IndexOf returns a uint? that is none when the value is absent, and Contains returns a bool. - [Binary search](https://rux-lang.dev/raw/docs/learn/binary-search.md): Search sorted data in logarithmic time with BinarySearch, and bracket duplicates with LowerBound and UpperBound. - [Min and max](https://rux-lang.dev/raw/docs/learn/min-max.md): Pick the smaller or larger of two values with Min and Max, and find the extremes of a slice with MinIndex and MaxIndex, which return none for an empty one. - [Fold](https://rux-lang.dev/raw/docs/learn/fold.md): Collapse a slice into one answer with Fold and FoldRight, passing the step as a named function. - [Files](https://rux-lang.dev/raw/docs/learn/files.md): Paths, files and directories with the Path and FileSystem packages: ten lessons on taking paths apart and building them, reading and writing text and binary files, listing directories, buffering, and replacing files safely. - [Path](https://rux-lang.dev/raw/docs/learn/path.md): Walk a path's components and named parts, and see why a path is not a string. - [Path join](https://rux-lang.dev/raw/docs/learn/path-join.md): Join paths with Join and Push, which place separators correctly, instead of gluing strings. - [Path normalize](https://rux-lang.dev/raw/docs/learn/path-normalize.md): Tidy a path with Normalize, and learn what a purely lexical rewrite cannot know. - [File](https://rux-lang.dev/raw/docs/learn/file.md): Write a text file and read it back, handling every IoError along the way. - [Directory](https://rux-lang.dev/raw/docs/learn/directory.md): Create a scratch directory, list what is in it, and remove it again. - [Metadata](https://rux-lang.dev/raw/docs/learn/metadata.md): Ask the filesystem what a path names with MetadataOf: its kind, size, permissions and times. - [Binary](https://rux-lang.dev/raw/docs/learn/binary.md): Write and read fixed-width binary values, and refuse a record that the file cut short. - [Buffered I/O](https://rux-lang.dev/raw/docs/learn/buffered-io.md): Gather small writes in a BufferedWriter, and watch them reach the file when it fills or flushes. - [Atomic file](https://rux-lang.dev/raw/docs/learn/atomic-file.md): Replace a file whole with WriteAtomically, so a reader never sees it half-written. - [Temporary file](https://rux-lang.dev/raw/docs/learn/temporary-file.md): Create a scratch file with an unguessable name that is deleted when you are done with it. - [Utilities](https://rux-lang.dev/raw/docs/learn/utilities.md): Durations, clocks and calendar dates, repeatable and unguessable random numbers, fast hashes and UUIDs: nine lessons on the small standard packages most programs reach for. - [Duration](https://rux-lang.dev/raw/docs/learn/duration.md): Build a Duration from any unit and do arithmetic on it, where FromHours, Plus and Times return Duration? because they can overflow. - [Stopwatch](https://rux-lang.dev/raw/docs/learn/stopwatch.md): Measure elapsed time with Instant, a clock that only moves forward, and Since, which refuses a reading pair given the wrong way round. - [Date](https://rux-lang.dev/raw/docs/learn/date.md): Read calendar dates with ParseDate, which returns Date ! TimeParseError and says what was wrong and where, and see how leap years shape the calendar. - [Date and time](https://rux-lang.dev/raw/docs/learn/date-time.md): Pair a DateTime with a UtcOffset to name one moment, and read and write it as RFC 3339 text with ParseRfc3339. - [Random](https://rux-lang.dev/raw/docs/learn/random.md): Build a Pcg64Dxsm generator from a fixed seed and see that the same seed always replays the same numbers. - [Distribution](https://rux-lang.dev/raw/docs/learn/distribution.md): Shape a generator's raw numbers into die rolls with UniformInRange, a random order with Shuffle, and a bell curve with NormalWith. - [Entropy](https://rux-lang.dev/raw/docs/learn/entropy.md): Ask the operating system for unpredictable numbers with NextUint64 and Fill, which return ! EntropyError, and check every failure rather than replacing it with a fixed value. - [Hash](https://rux-lang.dev/raw/docs/learn/hash.md): Fingerprint bytes with Fnv1a64Of, XxHash64Of and Crc32Of, fast hashes that catch accidents but are not cryptographic. - [UUID](https://rux-lang.dev/raw/docs/learn/uuid.md): Make a random identifier with Random, which returns Uuid ! EntropyError, and read and write its strict text form with Parse and {}. - [Data formats](https://rux-lang.dev/raw/docs/learn/data-formats.md): Read and write JSON and TOML: parse a document into a tree, build one and write it out, stream a large one event by event, and report a bad document by where it went wrong. - [JSON](https://rux-lang.dev/raw/docs/learn/json.md): Parse a JSON document, read typed values out of it, and see malformed input refused with a reason and a position. - [Writing JSON](https://rux-lang.dev/raw/docs/learn/json-write.md): Build a JSON value by hand, write it compact and pretty with WriteValue, and parse the output back to the same text. - [Streaming JSON](https://rux-lang.dev/raw/docs/learn/json-stream.md): Read JSON as a stream of events with JsonEventReader, keeping only the fields you want and stopping cleanly on a broken document. - [TOML](https://rux-lang.dev/raw/docs/learn/toml.md): Parse a TOML document, read integers, floats, dates and arrays from its tables, and see a bad document refused by line and column. - [Writing TOML](https://rux-lang.dev/raw/docs/learn/toml-write.md): Read a TOML document, add a key, write it back with TomlWriteDocument, and check that writing is stable across a round trip. - [Packages](https://rux-lang.dev/raw/docs/learn/packages.md): Split a program into modules and packages, depend on libraries from the registry and from disk, build source, static and shared libraries, and keep it all tidy with rux fmt, lint, test and doc. - [Module](https://rux-lang.dev/raw/docs/learn/module.md): Split one package across several source files, group their contents with module A::B { }, and import items or whole modules. - [Visibility](https://rux-lang.dev/raw/docs/learn/visibility.md): Use pub to choose what a library package shows to the packages that depend on it, and see a private item refused across that boundary. - [Package](https://rux-lang.dev/raw/docs/learn/package.md): Read a Rux.toml manifest section by section, and see which of the four package types it declares. - [Dependency](https://rux-lang.dev/raw/docs/learn/dependency.md): Declare registry dependencies, which come from the package cache, beside a path dependency, which is compiled from a directory next to the program. - [Workspace](https://rux-lang.dev/raw/docs/learn/workspace.md): Keep a program and its library in one tree, listed as explicit members of a root [Workspace] manifest. - [Source library](https://rux-lang.dev/raw/docs/learn/source-library.md): Write a library that is compiled into the program using it, so its generic code serves that program's own types. - [Static library](https://rux-lang.dev/raw/docs/learn/static-library.md): Compile a package ahead of time into a native archive, where each pub function becomes a global symbol. - [Shared library](https://rux-lang.dev/raw/docs/learn/shared-library.md): Build a library that programs load at run time, and see that only its pub functions are exported. - [Documentation](https://rux-lang.dev/raw/docs/learn/documentation.md): Describe a public API with /// and /** */ comments and their tags, and generate reference pages from them with rux doc. - [Tooling](https://rux-lang.dev/raw/docs/learn/tooling.md): Keep a package tidy with the other rux commands: format, lint, test and document it, without publishing anything. - [Compile time](https://rux-lang.dev/raw/docs/learn/compile-time.md): Decide what a program contains before it ever runs. Seven lessons on when, the target and build mode, source locations, #Error and #Warn, your own defines, and the intrinsic declarations behind Core. - [When](https://rux-lang.dev/raw/docs/learn/when.md): Choose code while compiling with when and else when, and see that the branches it skips are never even resolved. - [Target](https://rux-lang.dev/raw/docs/learn/target.md): Branch on the operating system and processor a build is for, with #target.os and #target.arch. - [Build mode](https://rux-lang.dev/raw/docs/learn/build-mode.md): Tell a debug build from a release build with #build.mode, and watch DebugAssert disappear from a release build. - [Source location](https://rux-lang.dev/raw/docs/learn/source-location.md): Read the file, line, column and function an expression is written in with #source, and see why a helper reports its own line rather than its caller's. - [Compile error](https://rux-lang.dev/raw/docs/learn/compile-error.md): Stop a build with #Error, raise a warning with #Warn, and silence one lint rule with #Allow. - [Define](https://rux-lang.dev/raw/docs/learn/define.md): Hand a build your own named values with --define, and read them while compiling with #config.Has and #config.Get. - [Intrinsic](https://rux-lang.dev/raw/docs/learn/intrinsic.md): See that int8, #target and Assert reach a program through intrinsic declarations, by taking them from a small provider package of your own instead of Core. - [Platform](https://rux-lang.dev/raw/docs/learn/platform.md): Step outside Rux to the operating system and the processor. Five lessons on extern and #Link, the C runtime and its types, calling conventions with #Abi, and function bodies written in x86-64 and AArch64 assembly. - [Extern](https://rux-lang.dev/raw/docs/learn/extern.md): Call a function from a system library by declaring it with extern and naming its library with #Link. - [C interop](https://rux-lang.dev/raw/docs/learn/c-interop.md): Call the C runtime through the C package. The program uses C's own types, turns an opaque pointer into a typed one, reads a C struct, makes a variadic call and checks every result for failure. - [ABI](https://rux-lang.dev/raw/docs/learn/abi.md): Give a foreign function a Rux name of your own with #Link's second argument, and state a calling convention with #Abi. - [Assembly](https://rux-lang.dev/raw/docs/learn/asm.md): Write a function body in x86-64 assembly with asm func, and pin the calling convention it reads its arguments from with #Abi. - [ARM assembly](https://rux-lang.dev/raw/docs/learn/asm-arm.md): Write the AArch64 version of an asm func, and use when #target.arch to pick the body that matches the machine being built for. - [Projects](https://rux-lang.dev/raw/docs/learn/projects.md): Sixteen complete small programs that double as checkpoints: each one can be built as soon as you finish the part it follows, from a FizzBuzz after Control flow to a JSON notes file and a tune played through Windows. - [Thanks](https://rux-lang.dev/raw/docs/learn/thanks.md): Print an ASCII banner and a thank-you to everyone who helps build Rux, using nothing but loops, match expressions and PrintLine. - [FizzBuzz](https://rux-lang.dev/raw/docs/learn/fizz-buzz.md): Count to 100, saying Fizz for multiples of 3, Buzz for multiples of 5 and FizzBuzz for both. - [Temperature](https://rux-lang.dev/raw/docs/learn/temperature.md): Print Celsius and Fahrenheit conversion tables, each column and word produced by a small function. - [Prime](https://rux-lang.dev/raw/docs/learn/prime.md): Find every prime below 100 with the sieve of Eratosthenes, crossing out multiples in an inline array of flags. The limit itself is excluded. - [Calculator](https://rux-lang.dev/raw/docs/learn/calculator.md): Evaluate a list of sums and two tapes of key presses, where every way a sum can fail is a case of an error variant. - [Circle](https://rux-lang.dev/raw/docs/learn/circle.md): Read a radius and print the circle's circumference and area, telling apart the end of input, a read error, text that is not a number, and a number that is not a valid radius. - [Quadratic](https://rux-lang.dev/raw/docs/learn/quadratic.md): Read three coefficients and solve a x² + b x + c = 0, telling apart two real roots, a repeated root, a complex pair, a linear equation, an inconsistent one and an identity. - [Word count](https://rux-lang.dev/raw/docs/learn/word-count.md): Count how often each word appears in a tongue twister, and print the counts in alphabetical order. - [Inventory](https://rux-lang.dev/raw/docs/learn/inventory.md): Keep a shop's stock as structs in a vector and apply a day of orders, refusing the ones that cannot be carried out. - [Statistics](https://rux-lang.dev/raw/docs/learn/statistics.md): Summarise slices of numbers — count, extremes, mean, population and sample variance, and median — including an even count with repeated values, a single value and no values at all. - [Guess](https://rux-lang.dev/raw/docs/learn/guess.md): A number guessing game: find a number from 1 to 100 in seven guesses, with a hint after each one. - [Age](https://rux-lang.dev/raw/docs/learn/age.md): Work out an age in completed years, months and days, where a month that is missing its day ends on its last day. - [Password](https://rux-lang.dev/raw/docs/learn/password.md): Make a 16-character password from 57 easy-to-read characters, drawing every one from the system's entropy with rejection sampling so that no character is favoured. - [Launch](https://rux-lang.dev/raw/docs/learn/launch.md): Run a mission checklist, ask for a countdown from 1 to 10, count down and launch a rocket up the terminal. - [Notes](https://rux-lang.dev/raw/docs/learn/notes.md): Keep a to-do list as JSON in a file: save it, load it back, add to it, and handle a damaged or missing file. - [Melody](https://rux-lang.dev/raw/docs/learn/melody.md): Play the opening of Ode to Joy through the console speaker by calling the Windows Beep function directly. ## Language reference The precise rules of the Rux language as rux 0.4.0 implements them, chapter by chapter. - [Introduction](https://rux-lang.dev/raw/docs/lang/introduction.md): What the Rux Reference covers, how to read its grammar notation, and how it differs from the Learn Rux course. - [Source Files](https://rux-lang.dev/raw/docs/lang/lexical/source-files.md): How Rux source files are named, encoded and split into tokens: UTF-8 text, whitespace, and the longest-match rule. - [Comments](https://rux-lang.dev/raw/docs/lang/lexical/comments.md): Line, block and documentation comments in Rux: their exact markers, nesting, attachment to declarations, and structured tags. - [Identifiers](https://rux-lang.dev/raw/docs/lang/lexical/identifiers.md): The spelling of Rux identifiers, the names they may not take, and the PascalCase and camelCase conventions rux lint checks. - [Keywords](https://rux-lang.dev/raw/docs/lang/lexical/keywords.md): The 38 reserved words of Rux, what each one introduces, and the contextual words that have a meaning only in certain positions. - [Literals](https://rux-lang.dev/raw/docs/lang/lexical/literals.md): Integer, floating-point, boolean, character and string literals in Rux: their spellings, suffixes and prefixes, escapes, and how each gets its type. - [Operators and Punctuation](https://rux-lang.dev/raw/docs/lang/lexical/operators.md): Every operator and punctuation token in Rux, what each one means, and where its full rules are described. - [Types](https://rux-lang.dev/raw/docs/lang/types/overview.md): The kinds of type in Rux, how type expressions are written and grouped, and which conversions happen implicitly. - [Integers](https://rux-lang.dev/raw/docs/lang/types/integers.md): Rux's signed and unsigned integer types from 8 to 512 bits: ranges, constants, wrapping arithmetic, division rules and conversions. - [Floating-Point](https://rux-lang.dev/raw/docs/lang/types/floating-point.md): The float32 and float64 types in Rux: IEEE 754 formats, constants, special values, arithmetic rules, conversions and reserved widths. - [Booleans](https://rux-lang.dev/raw/docs/lang/types/booleans.md): The bool type and its 16-, 32- and 64-bit widths in Rux: literals, logical operators, conditions, and conversions to and from numbers. - [Characters](https://rux-lang.dev/raw/docs/lang/types/characters.md): Rux's character types: char8 and char16 code units, char32 and char64 Unicode scalar values, literals, comparison and conversions. - [Text](https://rux-lang.dev/raw/docs/lang/types/text.md): How Rux represents text: string literals as read-only char8, char16 and char32 slices, their length, indexing, iteration, storage and limits. - [Type Aliases](https://rux-lang.dev/raw/docs/lang/types/aliases.md): Declaring a second name for a type with type Name = T, what an alias does and does not change, and the built-in aliases bool, byte, char and float. - [Bindings](https://rux-lang.dev/raw/docs/lang/bindings/overview.md): How let and var bind a name to a value, how its type is chosen, the difference between = and <-, mutability, and the scope of a name. - [Constants](https://rux-lang.dev/raw/docs/lang/bindings/constants.md): const declarations: values the compiler computes once, what their initializer may contain, where they may appear, and their use as array sizes. - [Initialization](https://rux-lang.dev/raw/docs/lang/bindings/initialization.md): How a var declared without a value is initialized: a default constructor, or storage the compiler tracks until every path has assigned it. - [Destructuring](https://rux-lang.dev/raw/docs/lang/bindings/destructuring.md): Binding several names at once with tuple and structure patterns in let and var, discarding with _, and why such patterns must be irrefutable. - [Expressions](https://rux-lang.dev/raw/docs/lang/expressions/overview.md): How Rux expressions are built: every operator, its 17 precedence levels and associativity, evaluation order, and how operand types combine. - [Arithmetic](https://rux-lang.dev/raw/docs/lang/expressions/arithmetic.md): The arithmetic operators + - * / % and unary -: operand types, wrapping integer overflow, division by zero, and floating-point results. - [Comparison](https://rux-lang.dev/raw/docs/lang/expressions/comparison.md): The comparison operators == != < <= > >=: which types can be compared, how operand types must agree, NaN, and why comparisons do not chain. - [Logical](https://rux-lang.dev/raw/docs/lang/expressions/logical.md): The logical operators && || and !: bool operands only, short-circuit evaluation, precedence, and the non-short-circuiting & | ^ on bool. - [Bitwise](https://rux-lang.dev/raw/docs/lang/expressions/bitwise.md): The bitwise operators & | ^ and ~: operand types, masks and flags, their low precedence against comparisons, and compound forms. - [Shift](https://rux-lang.dev/raw/docs/lang/expressions/shift.md): The shift operators << >> and >>>: the type of the result, arithmetic and logical right shifts, the range of a shift count, and compound forms. - [Assignment](https://rux-lang.dev/raw/docs/lang/expressions/assignment.md): Assignment with = and <-, the compound operators, ++ and --, what may be assigned to, and why an assignment produces no value. - [Conditional](https://rux-lang.dev/raw/docs/lang/expressions/conditional.md): The conditional operator c ? a : b: the whitespace rule that separates it from propagation, branch types, laziness, nesting and precedence. - [Casts](https://rux-lang.dev/raw/docs/lang/expressions/casts.md): Explicit conversion with as: numeric, bool, character and enum casts, truncation and saturation, constant checks, and casts that are refused. - [Statements](https://rux-lang.dev/raw/docs/lang/statements/overview.md): The statements of a Rux function body, blocks as bodies rather than statements, and the rules every condition follows. - [if](https://rux-lang.dev/raw/docs/lang/statements/if.md): The if statement: conditions, else if chains, a final else, and what to use when a choice must produce a value. - [Loops](https://rux-lang.dev/raw/docs/lang/statements/loops.md): The four loops — while, do while, loop and for — and what for can iterate: arrays, slices, ranges and any type with an iterator. - [break and continue](https://rux-lang.dev/raw/docs/lang/statements/break-continue.md): Leaving a loop with break, skipping to the next pass with continue, loop labels for nested loops, and break and continue inside expressions. - [return](https://rux-lang.dev/raw/docs/lang/statements/return.md): The return statement: returning a value or nothing, the check that every path returns, moving a value out, and return inside expressions. - [match](https://rux-lang.dev/raw/docs/lang/patterns/match.md): The match statement and expression: arms, else, arm bodies, typing the result, and the exhaustiveness rules for each kind of subject. - [Patterns](https://rux-lang.dev/raw/docs/lang/patterns/patterns.md): Every pattern form — literals, ranges, bindings, _, tuples, structures, enum and variant cases, typed patterns, none and presence — and guards. - [Function declarations](https://rux-lang.dev/raw/docs/lang/functions/declaration.md): Declaring a function with func: its name, typed parameters and result type, where functions may be declared, and how a call is checked. - [Parameters](https://rux-lang.dev/raw/docs/lang/functions/parameters.md): How arguments reach a function: read-only by-value parameters, references, default values evaluated at each call, and variadic parameters with spread. - [Overloading](https://rux-lang.dev/raw/docs/lang/functions/overloading.md): Several functions sharing one name: how overloads must differ, the ranking that picks one for a call, and when a call is ambiguous. - [Function types](https://rux-lang.dev/raw/docs/lang/functions/function-types.md): Functions as values: the func(T, U) -> R type, passing functions to parameters, storing them in locals and fields, and what a function value cannot be. - [The Main function](https://rux-lang.dev/raw/docs/lang/functions/main.md): The entry point of an executable package: the three forms of Main, how each sets the exit status, and DllMain in a Windows shared library. - [Structs](https://rux-lang.dev/raw/docs/lang/structs/overview.md): Declaring a struct, its fields and their visibility, building values with struct literals, reading and writing fields, value semantics and equality. - [Methods](https://rux-lang.dev/raw/docs/lang/structs/methods.md): Adding functions to a type with extend: the three receiver forms self: &T, self: &var T and self: T, static functions, and how each is called. - [Constructors](https://rux-lang.dev/raw/docs/lang/structs/constructors.md): Constructors in Rux: a receiverless function named after its type that returns the type, called as T(...), overloaded, and run by var x: T;. - [Extensions](https://rux-lang.dev/raw/docs/lang/structs/extensions.md): Adding methods to built-in types with extend: integers, slices and writable slices, aliases, and the types that cannot be extended. - [Enums](https://rux-lang.dev/raw/docs/lang/enums/overview.md): Scalar enumerations: declaring enum cases, the backing integer type and explicit values, naming cases, as conversions in both directions, and matching. - [Variants](https://rux-lang.dev/raw/docs/lang/variants/overview.md): Tagged unions with variant: unit, positional and named cases, generic variants, building a case, structural equality, and the private tag. - [Matching variants](https://rux-lang.dev/raw/docs/lang/variants/matching.md): Taking a variant apart with match: case patterns for unit, positional and named cases, binding payloads, nesting, guards and exhaustiveness. - [Unions](https://rux-lang.dev/raw/docs/lang/unions/overview.md): Untagged overlapping storage with union: declaring members, building a union by naming one member, reading another as a reinterpretation, and layout. - [Tuples](https://rux-lang.dev/raw/docs/lang/tuples/overview.md): Tuple types and values: positional elements read with .0, the unit type (), structural equality without ordering, and when to choose a struct instead. - [Arrays](https://rux-lang.dev/raw/docs/lang/arrays/overview.md): The fixed-size array type T[N]: literals, repeated literals, value semantics, length, bounds-checked indexing, iteration, slicing and flexible tails. - [Slices](https://rux-lang.dev/raw/docs/lang/slices/overview.md): The slice types T[..] and var T[..]: views of contiguous elements, slicing with ranges, .length and .data, writability and lifetimes. - [Ranges](https://rux-lang.dev/raw/docs/lang/ranges/overview.md): The six range forms and their types, .start and .end, and ranges in for loops, slicing and match patterns. - [References](https://rux-lang.dev/raw/docs/lang/references/overview.md): The reference types &T and &var T: implicit borrows, automatic dereference, writing through &var, and where a reference may live. - [Exclusivity](https://rux-lang.dev/raw/docs/lang/references/exclusivity.md): The shared-or-exclusive rule for references: how long a borrow lasts, what counts as overlapping, and the errors that enforce it. - [Pointers](https://rux-lang.dev/raw/docs/lang/pointers/overview.md): Raw pointers *T and *var T: taking an address with @, dereferencing with *, fields through a pointer, null, *opaque and conversions. - [Pointer arithmetic](https://rux-lang.dev/raw/docs/lang/pointers/arithmetic.md): Offsetting a pointer by whole elements with + and -, unchecked indexing p[i], walking a buffer, and what pointer arithmetic does not allow. - [Pointer slicing](https://rux-lang.dev/raw/docs/lang/pointers/slicing.md): Turning a pointer and a count into a slice with p[..n], p[a..b] and p[..=n]: writability, the required end bound, and precedence. - [Optionals](https://rux-lang.dev/raw/docs/lang/optionals/overview.md): The optional type T?: a present value or absence, how optionals are written with a plain value, .Some and none, and how they are matched. - [Coalescing](https://rux-lang.dev/raw/docs/lang/optionals/coalescing.md): The ?? operator: take the value of an optional, or evaluate a fallback — a value, or a jump out with return, break, continue, fail or Panic. - [Optional Propagation](https://rux-lang.dev/raw/docs/lang/optionals/propagation.md): Postfix ? on an optional: continue with the present value, or return none from the enclosing function at once. - [Errors](https://rux-lang.dev/raw/docs/lang/errors/overview.md): The fallible type T ! E: a success or a failure in the return type, written with return, fail, .Success and .Failure. - [Handling Failures](https://rux-lang.dev/raw/docs/lang/errors/handling.md): Inspecting a fallible with match, recovering with postfix catch, and the rules that stop a failure from being discarded silently. - [Error Propagation](https://rux-lang.dev/raw/docs/lang/errors/propagation.md): Postfix ? on a fallible passes a failure to the caller; ? else (e => …) converts it on the way; ?? fail turns absence into a failure. - [Panics](https://rux-lang.dev/raw/docs/lang/errors/panics.md): Stopping the program on a bug: Panic, Assert, DebugAssert, #NoReturn functions, the run-time checks that panic, and what a panic does not do. - [Sum Types](https://rux-lang.dev/raw/docs/lang/sums/overview.md): The sum type A | B: one value of a set of distinct types, normalized as a set, built by injection and widening, and collapsed after generic substitution. - [Sum Patterns](https://rux-lang.dev/raw/docs/lang/sums/patterns.md): Selecting a member of a sum with typed patterns v: T, subset patterns v: A | B, _: T and qualified variant cases, and how coverage is checked. - [Type Tests](https://rux-lang.dev/raw/docs/lang/sums/type-tests.md): The is operator: which member of a sum is active, whether an optional is present, or a static check of a value's exact type. It never narrows. - [Ownership](https://rux-lang.dev/raw/docs/lang/ownership/overview.md): Every value has one owner. = copies a value, <- moves it, and the compiler rejects any read of a name whose value has moved away. - [Copy and Move](https://rux-lang.dev/raw/docs/lang/ownership/copy-and-move.md): Copy and move are generated field by field. A type can replace either with its own body, or prohibit it with a bodyless declaration. - [Destructors](https://rux-lang.dev/raw/docs/lang/ownership/destructors.md): A destructor, func ~T(self: &var T), runs exactly once for each value that still owns its state, newest value first. Panics do not unwind. - [Defer](https://rux-lang.dev/raw/docs/lang/ownership/defer.md): defer registers one statement to run when the enclosing scope ends — last registered, first run, after the return value is captured. - [Interfaces](https://rux-lang.dev/raw/docs/lang/interfaces/overview.md): An interface names a set of method requirements. A type implements it in an extend block, and is then usable as an interface value or a bound. - [Interface Values](https://rux-lang.dev/raw/docs/lang/interfaces/interface-values.md): An interface type holds or borrows any implementing value, and a call through it runs the method of the value inside: dynamic dispatch. - [Core Interfaces](https://rux-lang.dev/raw/docs/lang/interfaces/core-interfaces.md): The interfaces the standard packages build on: Equatable, Comparable and Ordering, Hashable, Iterator and Iterable in Core; Display and Debug in Text. - [Operators](https://rux-lang.dev/raw/docs/lang/interfaces/operators.md): A type overloads a binary operator by declaring a function named after it. Comparisons derive from == and <, and structures compare field by field. - [Indexers](https://rux-lang.dev/raw/docs/lang/interfaces/indexers.md): A type is indexed by declaring func [] to read one element and func []= to write one. The index may be of any type, and overloads are separated by it. - [Iteration](https://rux-lang.dev/raw/docs/lang/interfaces/iteration.md): for walks arrays, slices and ranges directly, and any other type through Next(self: &var T) -> Item? or an Iterate method that hands out an iterator. - [Generics](https://rux-lang.dev/raw/docs/lang/generics/overview.md): Functions, structures and variants take type parameters. Each use is compiled separately, with type arguments written out or inferred from the arguments. - [Generic Types](https://rux-lang.dev/raw/docs/lang/generics/types.md): Structures and variants take type parameters. Every use names its type arguments, and each instantiation is a distinct type with its own layout. - [Generic Methods](https://rux-lang.dev/raw/docs/lang/generics/methods.md): Methods of a generic type use its parameters, and any method may declare type parameters of its own, inferred or written after the method name. - [Bounds](https://rux-lang.dev/raw/docs/lang/generics/bounds.md): A bound, T: A + B, admits only type arguments that provide the interfaces' methods, and lets the generic body call them. It is checked at each use. - [Packages and Modules](https://rux-lang.dev/raw/docs/lang/modules/overview.md): How a Rux package is organised: source files, the package root, and named module A::B { } namespaces nested inside it. - [Imports](https://rux-lang.dev/raw/docs/lang/modules/imports.md): The import declaration: bringing a package's items, modules, compile-time values and primitive constants into scope by path, list or glob. - [Visibility](https://rux-lang.dev/raw/docs/lang/modules/visibility.md): pub and package privacy: what a package shows to dependent packages, member visibility, private modules, and public signatures. - [Compile-Time Evaluation](https://rux-lang.dev/raw/docs/lang/comptime/overview.md): What Rux decides while compiling: constants, sizeof and alignof, when, the # compile-time values, defines, intrinsics and build diagnostics. - [Conditional Compilation](https://rux-lang.dev/raw/docs/lang/comptime/conditional.md): The when construct: compile-time chains and match arms that keep one branch, where when may appear, and what its conditions can read. - [Compile-Time Context](https://rux-lang.dev/raw/docs/lang/comptime/context.md): The compiler-supplied values #target, #build, #compiler and #source: every field, query and enum variant, and how they are read. - [Build Configuration](https://rux-lang.dev/raw/docs/lang/comptime/config.md): #config.Has and #config.Get: user-defined compile-time values from the [Build.Defines] table in Rux.toml and the --define option. - [Intrinsics](https://rux-lang.dev/raw/docs/lang/comptime/intrinsics.md): intrinsic declarations: binding a type, constant, compile-time value or function to what the compiler implements, and the supported set. - [Build Diagnostics](https://rux-lang.dev/raw/docs/lang/comptime/diagnostics.md): The #Error and #Warn directives: stopping or annotating a build from source, where they may be written, and why they belong inside when. - [Attributes](https://rux-lang.dev/raw/docs/lang/attributes/overview.md): Attribute syntax: #Name(...) calls before a declaration or a parameter, where each attribute is allowed, stacking, and the errors for misuse. - [#Link](https://rux-lang.dev/raw/docs/lang/attributes/link.md): The #Link attribute: naming the shared library an extern function or extern block is imported from, and optionally the exported symbol. - [#Abi](https://rux-lang.dev/raw/docs/lang/attributes/abi.md): The #Abi attribute: fixing the calling convention of a function, asm func or extern to .C, .SysV or .Win64, and the default for each target. - [#NoReturn](https://rux-lang.dev/raw/docs/lang/attributes/noreturn.md): The #NoReturn attribute: declaring that a function or extern function never returns to its caller, and what the compiler concludes from it. - [#Warn](https://rux-lang.dev/raw/docs/lang/attributes/warn.md): The #Warn attribute: a compiler warning reported at every call of a function, method or extern function, typically for deprecation. - [#Error](https://rux-lang.dev/raw/docs/lang/attributes/error.md): The #Error attribute: a compile error reported at every call of a function, so a removed or unsupported API explains where to go instead. - [#Allow](https://rux-lang.dev/raw/docs/lang/attributes/allow.md): The #Allow attribute: switching off one rux lint rule — naming.type, naming.const or docs.missing — for a single declaration. - [#Format](https://rux-lang.dev/raw/docs/lang/attributes/format.md): The #Format parameter attribute: marking a format string so the compiler counts its placeholders against the variadic arguments. - [Foreign Function Interface](https://rux-lang.dev/raw/docs/lang/ffi/overview.md): extern declarations: calling C functions from Rux, extern blocks and variables, C variadics, type mapping, C strings, pointers and callbacks. - [Linking Libraries](https://rux-lang.dev/raw/docs/lang/ffi/linking.md): Binding extern declarations to shared libraries with #Link, choosing a library per platform with when, and renaming imported symbols. - [Assembly Functions](https://rux-lang.dev/raw/docs/lang/ffi/assembly.md): asm func: functions whose body is x86-64 or AArch64 instructions, their operands and labels, calling conventions, and per-architecture bodies. - [Layout](https://rux-lang.dev/raw/docs/lang/memory/layout.md): sizeof and alignof, alignment and padding, field order, flexible tails, zero-sized types, and the layout of views, optionals, fallibles, sums and unions. - [Primitive Types](https://rux-lang.dev/raw/docs/lang/appendix/primitives.md): Every primitive type name in Rux in one table: width, size, family, literal suffix or prefix, and whether rux 0.4.0 implements it. - [Token Reference](https://rux-lang.dev/raw/docs/lang/appendix/tokens.md): Every token kind the Rux lexer produces, with the compiler's name for it and its source spelling. - [Rux Compiled Unit](https://rux-lang.dev/raw/docs/lang/appendix/rcu.md): The RCU object format: header, sections, symbols, relocations, string table and metadata of the units both Rux back ends hand to the linker. - [Rux Language Reference](https://rux-lang.dev/raw/docs/lang.md): The complete reference for the Rux language as implemented by rux 0.4.0 — lexical structure, types, expressions, functions, data types, optionals, errors, ownership, interfaces, generics, modules, compile-time programming and FFI. ## CLI - [Global options](https://rux-lang.dev/raw/docs/cli/global.md): Options accepted before or after every Rux CLI command. - [rux add](https://rux-lang.dev/raw/docs/cli/add.md): Add a dependency to the manifest - [rux build](https://rux-lang.dev/raw/docs/cli/build.md): Build the current package - [rux check](https://rux-lang.dev/raw/docs/cli/check.md): Check package source code for errors without building - [rux clean](https://rux-lang.dev/raw/docs/cli/clean.md): Remove build artifacts - [rux doc](https://rux-lang.dev/raw/docs/cli/doc.md): Generate package documentation - [rux fmt](https://rux-lang.dev/raw/docs/cli/fmt.md): Format source files and manifests - [rux help](https://rux-lang.dev/raw/docs/cli/help.md): Show help information - [rux info](https://rux-lang.dev/raw/docs/cli/info.md): Show package metadata and manifest information - [rux init](https://rux-lang.dev/raw/docs/cli/init.md): Initialize a Rux package in the current directory - [rux install](https://rux-lang.dev/raw/docs/cli/install.md): Install dependencies - [rux lint](https://rux-lang.dev/raw/docs/cli/lint.md): Lint package source files - [rux list](https://rux-lang.dev/raw/docs/cli/list.md): List dependencies - [rux login](https://rux-lang.dev/raw/docs/cli/login.md): Store a registry token for publishing - [rux logout](https://rux-lang.dev/raw/docs/cli/logout.md): Remove a stored registry token - [rux new](https://rux-lang.dev/raw/docs/cli/new.md): Create a new Rux package - [rux pack](https://rux-lang.dev/raw/docs/cli/pack.md): Build the publishable package archive - [rux publish](https://rux-lang.dev/raw/docs/cli/publish.md): Publish the package to the registry - [rux remove](https://rux-lang.dev/raw/docs/cli/remove.md): Remove a dependency from the manifest - [rux run](https://rux-lang.dev/raw/docs/cli/run.md): Build and run the main executable - [rux test](https://rux-lang.dev/raw/docs/cli/test.md): Run all test targets - [rux uninstall](https://rux-lang.dev/raw/docs/cli/uninstall.md): Uninstall dependencies - [rux update](https://rux-lang.dev/raw/docs/cli/update.md): Update dependencies - [rux version](https://rux-lang.dev/raw/docs/cli/version.md): Show version information - [CLI Reference](https://rux-lang.dev/raw/docs/cli.md): Verified reference for the Rux compiler and package-manager command line. ## Packaging - [Package Types](https://rux-lang.dev/raw/docs/packaging/types.md): Manifest Version 1 accepts exactly four case-sensitive package types: - [Yanking](https://rux-lang.dev/raw/docs/packaging/yanking.md): Yanking withdraws a published version from new dependency resolution while leaving it available to builds that already depend on it. It is the way to retire a release that turned out to be broken, insecure, or published by mistake. - [Directory Layout](https://rux-lang.dev/raw/docs/packaging/layout.md): Every package follows a predictable directory layout. The exact contents depend on the package type. - [Package Manifest](https://rux-lang.dev/raw/docs/packaging/manifest.md): Every Rux package is described by a Rux.toml file at its root. It carries the package's identity, metadata, build settings, and dependencies, and it is required for anything that takes part in the build system or a workspace. - [Dependencies](https://rux-lang.dev/raw/docs/packaging/dependencies.md): Dependencies are other packages your project builds against. They are declared in the [Dependencies] table of Rux.toml and managed with the rux command-line tool. - [The Registry](https://rux-lang.dev/raw/docs/packaging/registry.md): The Rux registry hosts published packages. It is browsable at rux-lang.dev/packages and served programmatically from https://api.rux-lang.dev. Reading from it — browsing, searching, downloading, installing — needs no account. - [Namespaces](https://rux-lang.dev/raw/docs/packaging/namespaces.md): A published package is identified by two parts: a namespace and a name. The namespace is the account or organisation that owns the package, so Rux/Io and Acme/Io are different packages that happen to share a name. - [API Tokens](https://rux-lang.dev/raw/docs/packaging/tokens.md): An API token lets the rux command line act on your registry account without a browser. Publishing needs one; browsing and installing do not. - [Publishing](https://rux-lang.dev/raw/docs/packaging/publishing.md): Publishing uploads a package release to the registry, where anyone can depend on it. A published version is permanent. - [Versioning](https://rux-lang.dev/raw/docs/packaging/versioning.md): Every release carries a version in Package.Version. Rux uses strict Semantic Versioning 2.0.0, without a leading v. - [Packaging](https://rux-lang.dev/raw/docs/packaging.md): How Rux packages are built, described, published, and consumed — package types, the Rux.toml manifest, dependencies, namespaces, API tokens, publishing to the registry, versioning, and yanking. ## Standard packages API - [Introduction](https://rux-lang.dev/raw/docs/api/introduction.md): This reference documents the packages that ship with Rux: what each function does, what it returns, and where its behavior differs from the platform underneath. It is a lookup reference rather than a tutorial — if you are new to the language, start with the Get Started guide or the Rux Language Reference. - [Brk](https://rux-lang.dev/raw/docs/api/bsd/brk.md): Changes the process program break. - [ClockGetTime](https://rux-lang.dev/raw/docs/api/bsd/clockgettime.md): Reads the current value of a BSD clock. - [Close](https://rux-lang.dev/raw/docs/api/bsd/close.md): Closes a file descriptor. - [Errno](https://rux-lang.dev/raw/docs/api/bsd/errno.md): Extracts the positive errno from a raw syscall result. - [Exit](https://rux-lang.dev/raw/docs/api/bsd/exit.md): Terminates the process immediately. - [GetPid](https://rux-lang.dev/raw/docs/api/bsd/getpid.md): Returns the calling process ID. - [Bsd Package](https://rux-lang.dev/raw/docs/api/bsd.md) - [IsError](https://rux-lang.dev/raw/docs/api/bsd/iserror.md): Tests whether a raw syscall result is an error. - [Mmap](https://rux-lang.dev/raw/docs/api/bsd/mmap.md): Creates a virtual-memory mapping through the target-specific BSD thunk. - [Munmap](https://rux-lang.dev/raw/docs/api/bsd/munmap.md): Removes a virtual-memory mapping. - [Nanosleep](https://rux-lang.dev/raw/docs/api/bsd/nanosleep.md): Suspends execution for a relative interval. - [Read](https://rux-lang.dev/raw/docs/api/bsd/read.md): Reads bytes from a file descriptor. - [Raw Syscalls](https://rux-lang.dev/raw/docs/api/bsd/syscalls.md): Invoke arbitrary BSD x86-64 syscalls and inspect raw results. - [Types and Constants](https://rux-lang.dev/raw/docs/api/bsd/types.md): Types and constants exported by the Bsd package. - [Write](https://rux-lang.dev/raw/docs/api/bsd/write.md): Writes bytes to a file descriptor. - [abort](https://rux-lang.dev/raw/docs/api/c/abort.md): Causes abnormal program termination without cleaning up. - [abs](https://rux-lang.dev/raw/docs/api/c/abs.md): Computes the absolute value of an integer value. - [acos](https://rux-lang.dev/raw/docs/api/c/acos.md): Computes arc cosine. - [acosf](https://rux-lang.dev/raw/docs/api/c/acosf.md): Computes arc cosine. - [acosh](https://rux-lang.dev/raw/docs/api/c/acosh.md): Computes inverse hyperbolic cosine. - [acoshf](https://rux-lang.dev/raw/docs/api/c/acoshf.md): Computes inverse hyperbolic cosine. - [asctime](https://rux-lang.dev/raw/docs/api/c/asctime.md): Converts a tm object to a textual representation. - [asin](https://rux-lang.dev/raw/docs/api/c/asin.md): Computes arc sine. - [asinf](https://rux-lang.dev/raw/docs/api/c/asinf.md): Computes arc sine. - [asinh](https://rux-lang.dev/raw/docs/api/c/asinh.md): Computes inverse hyperbolic sine. - [asinhf](https://rux-lang.dev/raw/docs/api/c/asinhf.md): Computes inverse hyperbolic sine. - [atan](https://rux-lang.dev/raw/docs/api/c/atan.md): Computes arc tangent. - [atan2](https://rux-lang.dev/raw/docs/api/c/atan2.md): Computes arc tangent, using signs to determine quadrants. - [atan2f](https://rux-lang.dev/raw/docs/api/c/atan2f.md): Computes arc tangent, using signs to determine quadrants. - [atanf](https://rux-lang.dev/raw/docs/api/c/atanf.md): Computes arc tangent. - [atanh](https://rux-lang.dev/raw/docs/api/c/atanh.md): Computes inverse hyperbolic tangent. - [atanhf](https://rux-lang.dev/raw/docs/api/c/atanhf.md): Computes inverse hyperbolic tangent. - [atof](https://rux-lang.dev/raw/docs/api/c/atof.md): Converts a byte string to a floating point value. - [atoi](https://rux-lang.dev/raw/docs/api/c/atoi.md): Converts a byte string to an integer value. - [atol](https://rux-lang.dev/raw/docs/api/c/atol.md): Converts a byte string to a long integer value. - [atoll](https://rux-lang.dev/raw/docs/api/c/atoll.md): Converts a byte string to a long long integer value. - [calloc](https://rux-lang.dev/raw/docs/api/c/calloc.md): Allocates memory for an array of num objects of size and zero-initializes it. - [cbrt](https://rux-lang.dev/raw/docs/api/c/cbrt.md): Computes cube root. - [cbrtf](https://rux-lang.dev/raw/docs/api/c/cbrtf.md): Computes cube root. - [ceil](https://rux-lang.dev/raw/docs/api/c/ceil.md): Computes smallest integer not less than the given value. - [ceilf](https://rux-lang.dev/raw/docs/api/c/ceilf.md): Computes smallest integer not less than the given value. - [clearerr](https://rux-lang.dev/raw/docs/api/c/clearerr.md): Clears the end-of-file and error indicators for the given stream. - [clock](https://rux-lang.dev/raw/docs/api/c/clock.md): Returns the approximate processor time used by the program. - [copysign](https://rux-lang.dev/raw/docs/api/c/copysign.md): Copies the sign of a floating-point value. - [copysignf](https://rux-lang.dev/raw/docs/api/c/copysignf.md): Copies the sign of a floating-point value. - [cos](https://rux-lang.dev/raw/docs/api/c/cos.md): Computes cosine. - [cosf](https://rux-lang.dev/raw/docs/api/c/cosf.md): Computes cosine. - [cosh](https://rux-lang.dev/raw/docs/api/c/cosh.md): Computes hyperbolic cosine. - [coshf](https://rux-lang.dev/raw/docs/api/c/coshf.md): Computes hyperbolic cosine. - [ctime](https://rux-lang.dev/raw/docs/api/c/ctime.md): Converts a time_t object to a textual representation. - [difftime](https://rux-lang.dev/raw/docs/api/c/difftime.md): Computes the difference in seconds between two calendar times. - [erf](https://rux-lang.dev/raw/docs/api/c/erf.md): Computes error function. - [erfc](https://rux-lang.dev/raw/docs/api/c/erfc.md): Computes complementary error function. - [erfcf](https://rux-lang.dev/raw/docs/api/c/erfcf.md): Computes complementary error function. - [erff](https://rux-lang.dev/raw/docs/api/c/erff.md): Computes error function. - [exit](https://rux-lang.dev/raw/docs/api/c/exit.md): Causes normal program termination with cleanup. - [exp](https://rux-lang.dev/raw/docs/api/c/exp.md): Computes e raised to the given power. - [exp2](https://rux-lang.dev/raw/docs/api/c/exp2.md): Computes 2 raised to the given power. - [exp2f](https://rux-lang.dev/raw/docs/api/c/exp2f.md): Computes 2 raised to the given power. - [expf](https://rux-lang.dev/raw/docs/api/c/expf.md): Computes e raised to the given power. - [expm1](https://rux-lang.dev/raw/docs/api/c/expm1.md): Computes e raised to the given power, minus one. - [expm1f](https://rux-lang.dev/raw/docs/api/c/expm1f.md): Computes e raised to the given power, minus one. - [fabs](https://rux-lang.dev/raw/docs/api/c/fabs.md): Computes the absolute value of a floating-point value. - [fclose](https://rux-lang.dev/raw/docs/api/c/fclose.md): Closes the given file stream. - [fdim](https://rux-lang.dev/raw/docs/api/c/fdim.md): Computes positive difference of two floating-point values. - [fdimf](https://rux-lang.dev/raw/docs/api/c/fdimf.md): Computes positive difference of two floating-point values. - [feof](https://rux-lang.dev/raw/docs/api/c/feof.md): Checks if the end-of-file indicator is set for the given stream. - [ferror](https://rux-lang.dev/raw/docs/api/c/ferror.md): Checks if the error indicator is set for the given stream. - [fflush](https://rux-lang.dev/raw/docs/api/c/fflush.md): Writes any unwritten data from the stream's buffer to the file. - [fgetc](https://rux-lang.dev/raw/docs/api/c/fgetc.md): Reads the next character from the given stream. - [fgetpos](https://rux-lang.dev/raw/docs/api/c/fgetpos.md): Gets the current file position of the stream. - [fgets](https://rux-lang.dev/raw/docs/api/c/fgets.md): Reads at most count-1 characters from the stream into a string. - [floor](https://rux-lang.dev/raw/docs/api/c/floor.md): Computes largest integer not greater than the given value. - [floorf](https://rux-lang.dev/raw/docs/api/c/floorf.md): Computes largest integer not greater than the given value. - [fma](https://rux-lang.dev/raw/docs/api/c/fma.md): Computes fused multiply-add. - [fmaf](https://rux-lang.dev/raw/docs/api/c/fmaf.md): Computes fused multiply-add. - [fmax](https://rux-lang.dev/raw/docs/api/c/fmax.md): Computes larger of two floating-point values. - [fmaxf](https://rux-lang.dev/raw/docs/api/c/fmaxf.md): Computes larger of two floating-point values. - [fmin](https://rux-lang.dev/raw/docs/api/c/fmin.md): Computes smaller of two floating-point values. - [fminf](https://rux-lang.dev/raw/docs/api/c/fminf.md): Computes smaller of two floating-point values. - [fmod](https://rux-lang.dev/raw/docs/api/c/fmod.md): Computes remainder of the floating-point division operation. - [fmodf](https://rux-lang.dev/raw/docs/api/c/fmodf.md): Computes remainder of the floating-point division operation. - [fopen](https://rux-lang.dev/raw/docs/api/c/fopen.md): Opens a file indicated by filename with the given mode. - [fprintf](https://rux-lang.dev/raw/docs/api/c/fprintf.md): Prints formatted output to a file stream. - [fputc](https://rux-lang.dev/raw/docs/api/c/fputc.md): Writes a character to the given stream. - [fputs](https://rux-lang.dev/raw/docs/api/c/fputs.md): Writes a string to the given stream. - [fread](https://rux-lang.dev/raw/docs/api/c/fread.md): Reads up to count objects of the given size from the stream into a buffer. - [free](https://rux-lang.dev/raw/docs/api/c/free.md): Deallocates the memory previously allocated by malloc, calloc or realloc. - [freopen](https://rux-lang.dev/raw/docs/api/c/freopen.md): Reopens a stream with a different file or mode. - [frexp](https://rux-lang.dev/raw/docs/api/c/frexp.md): Decomposes a number into significand and a power of two. - [fscanf](https://rux-lang.dev/raw/docs/api/c/fscanf.md): Reads formatted input from a file stream. - [fseek](https://rux-lang.dev/raw/docs/api/c/fseek.md): Sets the file position indicator for the stream. - [fsetpos](https://rux-lang.dev/raw/docs/api/c/fsetpos.md): Sets the file position of the stream to the given position. - [ftell](https://rux-lang.dev/raw/docs/api/c/ftell.md): Returns the current file position of the stream. - [fwrite](https://rux-lang.dev/raw/docs/api/c/fwrite.md): Writes count objects of the given size from a buffer to the stream. - [getc](https://rux-lang.dev/raw/docs/api/c/getc.md): Reads the next character from the given stream. - [getchar](https://rux-lang.dev/raw/docs/api/c/getchar.md): Reads the next character from stdin. - [getenv](https://rux-lang.dev/raw/docs/api/c/getenv.md): Returns the value of an environment variable. - [gmtime](https://rux-lang.dev/raw/docs/api/c/gmtime.md): Converts a time_t object to calendar time expressed as UTC. - [hypot](https://rux-lang.dev/raw/docs/api/c/hypot.md): Computes square root of the sum of the squares of two given numbers. - [ilogb](https://rux-lang.dev/raw/docs/api/c/ilogb.md): Extracts exponent of the number. - [ilogbf](https://rux-lang.dev/raw/docs/api/c/ilogbf.md): Extracts exponent of the number. - [C Package](https://rux-lang.dev/raw/docs/api/c.md) - [labs](https://rux-lang.dev/raw/docs/api/c/labs.md): Computes the absolute value of a long integer value. - [ldexp](https://rux-lang.dev/raw/docs/api/c/ldexp.md): Multiplies a number by 2 raised to an integer power. - [lgamma](https://rux-lang.dev/raw/docs/api/c/lgamma.md): Computes natural logarithm of the absolute value of the gamma function. - [lgammaf](https://rux-lang.dev/raw/docs/api/c/lgammaf.md): Computes natural logarithm of the absolute value of the gamma function. - [llabs](https://rux-lang.dev/raw/docs/api/c/llabs.md): Computes the absolute value of a long long integer value. - [llrint](https://rux-lang.dev/raw/docs/api/c/llrint.md): Rounds to nearest integer using current rounding mode. - [llrintf](https://rux-lang.dev/raw/docs/api/c/llrintf.md): Rounds to nearest integer using current rounding mode. - [llround](https://rux-lang.dev/raw/docs/api/c/llround.md): Rounds to nearest integer, rounding away from zero in halfway cases. - [llroundf](https://rux-lang.dev/raw/docs/api/c/llroundf.md): Rounds to nearest integer, rounding away from zero in halfway cases. - [localtime](https://rux-lang.dev/raw/docs/api/c/localtime.md): Converts a time_t object to calendar time expressed as local time. - [log](https://rux-lang.dev/raw/docs/api/c/log.md): Computes natural (base e) logarithm. - [log10](https://rux-lang.dev/raw/docs/api/c/log10.md): Computes common (base 10) logarithm. - [log10f](https://rux-lang.dev/raw/docs/api/c/log10f.md): Computes common (base 10) logarithm. - [log1p](https://rux-lang.dev/raw/docs/api/c/log1p.md): Computes natural logarithm of 1 plus the given number. - [log1pf](https://rux-lang.dev/raw/docs/api/c/log1pf.md): Computes natural logarithm of 1 plus the given number. - [log2](https://rux-lang.dev/raw/docs/api/c/log2.md): Computes base 2 logarithm. - [log2f](https://rux-lang.dev/raw/docs/api/c/log2f.md): Computes base 2 logarithm. - [logb](https://rux-lang.dev/raw/docs/api/c/logb.md): Extracts exponent of the number. - [logbf](https://rux-lang.dev/raw/docs/api/c/logbf.md): Extracts exponent of the number. - [logf](https://rux-lang.dev/raw/docs/api/c/logf.md): Computes natural (base e) logarithm. - [lrint](https://rux-lang.dev/raw/docs/api/c/lrint.md): Rounds to nearest integer using current rounding mode. - [lrintf](https://rux-lang.dev/raw/docs/api/c/lrintf.md): Rounds to nearest integer using current rounding mode. - [lround](https://rux-lang.dev/raw/docs/api/c/lround.md): Rounds to nearest integer, rounding away from zero in halfway cases. - [lroundf](https://rux-lang.dev/raw/docs/api/c/lroundf.md): Rounds to nearest integer, rounding away from zero in halfway cases. - [malloc](https://rux-lang.dev/raw/docs/api/c/malloc.md): Allocates size bytes of uninitialized memory. - [mktime](https://rux-lang.dev/raw/docs/api/c/mktime.md): Converts calendar time to a time_t object, normalizing the tm structure. - [modf](https://rux-lang.dev/raw/docs/api/c/modf.md): Decomposes a number into integer and fractional parts. - [modff](https://rux-lang.dev/raw/docs/api/c/modff.md): Decomposes a number into integer and fractional parts. - [nan](https://rux-lang.dev/raw/docs/api/c/nan.md): Generates a quiet NaN. - [nanf](https://rux-lang.dev/raw/docs/api/c/nanf.md): Generates a quiet NaN. - [nearbyint](https://rux-lang.dev/raw/docs/api/c/nearbyint.md): Rounds to nearest integer using current rounding mode without raising the inexact exception. - [nearbyintf](https://rux-lang.dev/raw/docs/api/c/nearbyintf.md): Rounds to nearest integer using current rounding mode without raising the inexact exception. - [nextafter](https://rux-lang.dev/raw/docs/api/c/nextafter.md): Determines next representable floating-point value toward the given value. - [nextafterf](https://rux-lang.dev/raw/docs/api/c/nextafterf.md): Determines next representable floating-point value toward the given value. - [perror](https://rux-lang.dev/raw/docs/api/c/perror.md): Prints an error message describing the last error to stderr. - [pow](https://rux-lang.dev/raw/docs/api/c/pow.md): Computes a number raised to the given power. - [powf](https://rux-lang.dev/raw/docs/api/c/powf.md): Computes a number raised to the given power. - [printf](https://rux-lang.dev/raw/docs/api/c/printf.md): Prints formatted output to stdout. - [putc](https://rux-lang.dev/raw/docs/api/c/putc.md): Writes a character to the given stream. - [putchar](https://rux-lang.dev/raw/docs/api/c/putchar.md): Writes a character to stdout. - [puts](https://rux-lang.dev/raw/docs/api/c/puts.md): Writes a string followed by a newline to stdout. - [rand](https://rux-lang.dev/raw/docs/api/c/rand.md): Returns a pseudo-random integer value between 0 and RAND_MAX. - [realloc](https://rux-lang.dev/raw/docs/api/c/realloc.md): Changes the size of the memory block pointed to by ptr to size bytes. - [remainder](https://rux-lang.dev/raw/docs/api/c/remainder.md): Computes signed remainder of the floating-point division operation. - [remainderf](https://rux-lang.dev/raw/docs/api/c/remainderf.md): Computes signed remainder of the floating-point division operation. - [remove](https://rux-lang.dev/raw/docs/api/c/remove.md): Deletes the file identified by the given path. - [remquo](https://rux-lang.dev/raw/docs/api/c/remquo.md): Computes signed remainder as well as the three last bits of the division operation. - [remquof](https://rux-lang.dev/raw/docs/api/c/remquof.md): Computes signed remainder as well as the three last bits of the division operation. - [rename](https://rux-lang.dev/raw/docs/api/c/rename.md): Renames a file, moving it if necessary. - [rewind](https://rux-lang.dev/raw/docs/api/c/rewind.md): Moves the file position indicator to the beginning of the stream. - [rint](https://rux-lang.dev/raw/docs/api/c/rint.md): Rounds to nearest integer using current rounding mode. - [rintf](https://rux-lang.dev/raw/docs/api/c/rintf.md): Rounds to nearest integer using current rounding mode. - [round](https://rux-lang.dev/raw/docs/api/c/round.md): Rounds to nearest integer, rounding away from zero in halfway cases. - [roundf](https://rux-lang.dev/raw/docs/api/c/roundf.md): Rounds to nearest integer, rounding away from zero in halfway cases. - [scalbn](https://rux-lang.dev/raw/docs/api/c/scalbn.md): Multiplies a number by FLT_RADIX raised to an integer power. - [scalbnf](https://rux-lang.dev/raw/docs/api/c/scalbnf.md): Multiplies a number by FLT_RADIX raised to an integer power. - [scanf](https://rux-lang.dev/raw/docs/api/c/scanf.md): Reads formatted input from stdin. - [setbuf](https://rux-lang.dev/raw/docs/api/c/setbuf.md): Sets the buffer to be used by the given stream. - [setvbuf](https://rux-lang.dev/raw/docs/api/c/setvbuf.md): Sets the buffering mode and buffer to be used by the given stream. - [sin](https://rux-lang.dev/raw/docs/api/c/sin.md): Computes sine. - [sinf](https://rux-lang.dev/raw/docs/api/c/sinf.md): Computes sine. - [sinh](https://rux-lang.dev/raw/docs/api/c/sinh.md): Computes hyperbolic sine. - [sinhf](https://rux-lang.dev/raw/docs/api/c/sinhf.md): Computes hyperbolic sine. - [sprintf](https://rux-lang.dev/raw/docs/api/c/sprintf.md): Prints formatted output to a string. - [sqrt](https://rux-lang.dev/raw/docs/api/c/sqrt.md): Computes square root. - [sqrtf](https://rux-lang.dev/raw/docs/api/c/sqrtf.md): Computes square root. - [srand](https://rux-lang.dev/raw/docs/api/c/srand.md): Seeds the pseudo-random number generator used by rand. - [sscanf](https://rux-lang.dev/raw/docs/api/c/sscanf.md): Reads formatted input from a string. - [strftime](https://rux-lang.dev/raw/docs/api/c/strftime.md): Converts a tm object to a custom textual representation. - [system](https://rux-lang.dev/raw/docs/api/c/system.md): Calls the host environment's command processor. - [tan](https://rux-lang.dev/raw/docs/api/c/tan.md): Computes tangent. - [tanf](https://rux-lang.dev/raw/docs/api/c/tanf.md): Computes tangent. - [tanh](https://rux-lang.dev/raw/docs/api/c/tanh.md): Computes hyperbolic tangent. - [tanhf](https://rux-lang.dev/raw/docs/api/c/tanhf.md): Computes hyperbolic tangent. - [tgamma](https://rux-lang.dev/raw/docs/api/c/tgamma.md): Computes gamma function. - [tgammaf](https://rux-lang.dev/raw/docs/api/c/tgammaf.md): Computes gamma function. - [time](https://rux-lang.dev/raw/docs/api/c/time.md): Returns the current calendar time since the epoch. - [tmpfile](https://rux-lang.dev/raw/docs/api/c/tmpfile.md): Creates and opens a temporary file with a unique name. - [tmpnam](https://rux-lang.dev/raw/docs/api/c/tmpnam.md): Generates a unique filename that does not name an existing file. - [trunc](https://rux-lang.dev/raw/docs/api/c/trunc.md): Rounds to nearest integer not greater in magnitude than the given value. - [truncf](https://rux-lang.dev/raw/docs/api/c/truncf.md): Rounds to nearest integer not greater in magnitude than the given value. - [Types](https://rux-lang.dev/raw/docs/api/c/types.md): Types exported by the C package, mirroring the C standard library. - [ungetc](https://rux-lang.dev/raw/docs/api/c/ungetc.md): Puts a character back into the given stream. - [Format Package](https://rux-lang.dev/raw/docs/api/format.md) - [IsFinite](https://rux-lang.dev/raw/docs/api/format/isfinite.md): Reports whether a value is an ordinary number. - [IsInfinite](https://rux-lang.dev/raw/docs/api/format/isinfinite.md): Reports whether a value is one of the two infinities. - [IsNan](https://rux-lang.dev/raw/docs/api/format/isnan.md): Reports whether a value is a NaN. - [ParseError](https://rux-lang.dev/raw/docs/api/format/parseerror.md): Why a string could not be parsed into a value. - [ParseFloat64](https://rux-lang.dev/raw/docs/api/format/parsefloat64.md): Parses a floating-point value from decimal text. - [ParseInt64](https://rux-lang.dev/raw/docs/api/format/parseint64.md): Parses a signed integer from decimal text. - [Stringable](https://rux-lang.dev/raw/docs/api/format/stringable.md): The interface a type implements to convert itself into a String. - [ToString](https://rux-lang.dev/raw/docs/api/format/tostring.md): Returns the text of a value, in a String the caller owns. - [TryParseFloat64](https://rux-lang.dev/raw/docs/api/format/tryparsefloat64.md): Parses a floating-point value into an out-parameter, reporting only success or failure. - [TryParseInt64](https://rux-lang.dev/raw/docs/api/format/tryparseint64.md): Parses a signed integer into an out-parameter, reporting only success or failure. - [WriteBool](https://rux-lang.dev/raw/docs/api/format/writebool.md): Appends true or false to a builder. - [WriteChar](https://rux-lang.dev/raw/docs/api/format/writechar.md): Appends the UTF-8 bytes of a character to a builder. - [WriteFloat](https://rux-lang.dev/raw/docs/api/format/writefloat.md): Appends the decimal text of a floating-point value to a builder. - [WriteInt](https://rux-lang.dev/raw/docs/api/format/writeint.md): Appends the decimal digits of a signed integer to a builder. - [WriteUint](https://rux-lang.dev/raw/docs/api/format/writeuint.md): Appends the decimal digits of an unsigned integer to a builder. - [Io Package](https://rux-lang.dev/raw/docs/api/io.md) - [Print](https://rux-lang.dev/raw/docs/api/io/print.md): Writes a value to standard output. - [PrintLine](https://rux-lang.dev/raw/docs/api/io/printline.md): Writes a value to standard output, followed by a newline. - [ReadLine](https://rux-lang.dev/raw/docs/api/io/readline.md): Reads standard input through the next newline, and returns it as a String. - [Brk](https://rux-lang.dev/raw/docs/api/linux/brk.md): Invokes the kernel's raw program-break operation. - [ClockGetTime](https://rux-lang.dev/raw/docs/api/linux/clockgettime.md): Reads the current value of a Linux clock. - [Close](https://rux-lang.dev/raw/docs/api/linux/close.md): Closes a file descriptor. - [Errno](https://rux-lang.dev/raw/docs/api/linux/errno.md): Decodes the errno value from a raw syscall result. - [Exit](https://rux-lang.dev/raw/docs/api/linux/exit.md): Terminates the calling thread immediately. - [GetPid](https://rux-lang.dev/raw/docs/api/linux/getpid.md): Returns the calling process ID. - [Linux Package](https://rux-lang.dev/raw/docs/api/linux.md) - [IsError](https://rux-lang.dev/raw/docs/api/linux/iserror.md): Tests whether a raw syscall result encodes a Linux error. - [Mmap](https://rux-lang.dev/raw/docs/api/linux/mmap.md): Creates a virtual-memory mapping. - [Munmap](https://rux-lang.dev/raw/docs/api/linux/munmap.md): Removes a virtual-memory mapping. - [Nanosleep](https://rux-lang.dev/raw/docs/api/linux/nanosleep.md): Suspends execution for a relative time interval. - [Read](https://rux-lang.dev/raw/docs/api/linux/read.md): Reads bytes from a file descriptor. - [Syscall0–Syscall6](https://rux-lang.dev/raw/docs/api/linux/syscalls.md): Invoke an arbitrary Linux x86-64 syscall with zero to six arguments. - [Types and Constants](https://rux-lang.dev/raw/docs/api/linux/types.md): Types and constants exported by the Linux package. - [Write](https://rux-lang.dev/raw/docs/api/linux/write.md): Writes bytes to a file descriptor. - [Close](https://rux-lang.dev/raw/docs/api/macos/close.md): Closes a file descriptor. - [Errno](https://rux-lang.dev/raw/docs/api/macos/errno.md): Extracts the positive errno from a raw syscall result. - [Exit](https://rux-lang.dev/raw/docs/api/macos/exit.md): Terminates the process immediately. - [GetPid](https://rux-lang.dev/raw/docs/api/macos/getpid.md): Returns the calling process ID. - [GetTimeOfDay](https://rux-lang.dev/raw/docs/api/macos/gettimeofday.md): Reads the current wall-clock time. - [MacOS Package](https://rux-lang.dev/raw/docs/api/macos.md) - [IsError](https://rux-lang.dev/raw/docs/api/macos/iserror.md): Tests whether a raw syscall result is an error. - [Mmap](https://rux-lang.dev/raw/docs/api/macos/mmap.md): Creates a virtual-memory mapping. - [Munmap](https://rux-lang.dev/raw/docs/api/macos/munmap.md): Removes a virtual-memory mapping. - [Read](https://rux-lang.dev/raw/docs/api/macos/read.md): Reads bytes from a file descriptor. - [Syscalls](https://rux-lang.dev/raw/docs/api/macos/syscalls.md): Invoke arbitrary Darwin (macOS) x86-64 syscalls and inspect raw results. - [Types and Constants](https://rux-lang.dev/raw/docs/api/macos/types.md): Types and constants exported by the MacOS package. - [Write](https://rux-lang.dev/raw/docs/api/macos/write.md): Writes bytes to a file descriptor. - [Abs](https://rux-lang.dev/raw/docs/api/math/abs.md): Returns the absolute value. - [ArcCos](https://rux-lang.dev/raw/docs/api/math/arccos.md): Returns the inverse cosine, in radians. - [ArcCot](https://rux-lang.dev/raw/docs/api/math/arccot.md): Returns the inverse cotangent, in radians. - [ArcSin](https://rux-lang.dev/raw/docs/api/math/arcsin.md): Returns the inverse sine, in radians. - [ArcTan](https://rux-lang.dev/raw/docs/api/math/arctan.md): Returns the inverse tangent, in radians. - [Cbrt](https://rux-lang.dev/raw/docs/api/math/cbrt.md): Returns the cube root. - [Ceil](https://rux-lang.dev/raw/docs/api/math/ceil.md): Rounds up to the nearest integer value. - [Cos](https://rux-lang.dev/raw/docs/api/math/cos.md): Returns the cosine of an angle in radians. - [Cosh](https://rux-lang.dev/raw/docs/api/math/cosh.md): Returns the hyperbolic cosine. - [Cotan](https://rux-lang.dev/raw/docs/api/math/cotan.md): Returns the cotangent of an angle in radians. - [Cotanh](https://rux-lang.dev/raw/docs/api/math/cotanh.md): Returns the hyperbolic cotangent. - [DegToRad](https://rux-lang.dev/raw/docs/api/math/degtorad.md): Converts an angle from degrees to radians. - [Exp](https://rux-lang.dev/raw/docs/api/math/exp.md): Returns e raised to a power. - [Exp2](https://rux-lang.dev/raw/docs/api/math/exp2.md): Returns 2 raised to a power. - [Floor](https://rux-lang.dev/raw/docs/api/math/floor.md): Rounds down to the nearest integer value. - [Hypot](https://rux-lang.dev/raw/docs/api/math/hypot.md): Returns the length of the hypotenuse of a right triangle with legs x and y. - [Math Package](https://rux-lang.dev/raw/docs/api/math.md) - [Log](https://rux-lang.dev/raw/docs/api/math/log.md): Returns the natural logarithm. - [Log10](https://rux-lang.dev/raw/docs/api/math/log10.md): Returns the base-10 logarithm. - [Log2](https://rux-lang.dev/raw/docs/api/math/log2.md): Returns the base-2 logarithm. - [Max](https://rux-lang.dev/raw/docs/api/math/max.md): Returns the larger of two values. - [Min](https://rux-lang.dev/raw/docs/api/math/min.md): Returns the smaller of two values. - [Mod](https://rux-lang.dev/raw/docs/api/math/mod.md): Returns the floating-point remainder of x / y. - [Pow](https://rux-lang.dev/raw/docs/api/math/pow.md): Raises a base to an exponent. - [RadToDeg](https://rux-lang.dev/raw/docs/api/math/radtodeg.md): Converts an angle from radians to degrees. - [Round](https://rux-lang.dev/raw/docs/api/math/round.md): Rounds to the nearest integer value. - [Sin](https://rux-lang.dev/raw/docs/api/math/sin.md): Returns the sine of an angle in radians. - [Sinh](https://rux-lang.dev/raw/docs/api/math/sinh.md): Returns the hyperbolic sine. - [Sqrt](https://rux-lang.dev/raw/docs/api/math/sqrt.md): Returns the square root. - [Tan](https://rux-lang.dev/raw/docs/api/math/tan.md): Returns the tangent of an angle in radians. - [Tanh](https://rux-lang.dev/raw/docs/api/math/tanh.md): Returns the hyperbolic tangent. - [Trunc](https://rux-lang.dev/raw/docs/api/math/trunc.md): Rounds toward zero. - [Alloc](https://rux-lang.dev/raw/docs/api/memory/alloc.md): Allocates an uninitialized block of memory. - [Compare](https://rux-lang.dev/raw/docs/api/memory/compare.md): Finds the offset at which two blocks of memory first differ. - [Copy](https://rux-lang.dev/raw/docs/api/memory/copy.md): Copies bytes from one block of memory to another. - [Free](https://rux-lang.dev/raw/docs/api/memory/free.md): Releases a block of memory back to the platform. - [Memory Package](https://rux-lang.dev/raw/docs/api/memory.md) - [Realloc](https://rux-lang.dev/raw/docs/api/memory/realloc.md): Resizes a block of memory, preserving the bytes that still fit. - [Set](https://rux-lang.dev/raw/docs/api/memory/set.md): Fills a block of memory with a repeated byte. - [Zero](https://rux-lang.dev/raw/docs/api/memory/zero.md): Fills a block of memory with zero bytes. - [Assert](https://rux-lang.dev/raw/docs/api/core/assert.md): Checks a condition at run time and aborts if it does not hold. - [#build](https://rux-lang.dev/raw/docs/api/core/build.md): Compile-time information about the active build. - [#compiler](https://rux-lang.dev/raw/docs/api/core/compiler.md): Compile-time information about the compiler performing the build. - [#config](https://rux-lang.dev/raw/docs/api/core/config.md): Compile-time access to user-defined build values. - [#Error](https://rux-lang.dev/raw/docs/api/core/error.md): Emits a compilation error. - [Core Package](https://rux-lang.dev/raw/docs/api/core.md) - [Panic](https://rux-lang.dev/raw/docs/api/core/panic.md): Terminates the program immediately with a message. - [Ranges](https://rux-lang.dev/raw/docs/api/core/ranges.md): The range types produced by the range operators. - [Result](https://rux-lang.dev/raw/docs/api/core/result.md): The return type of an operation that can fail. - [Slice](https://rux-lang.dev/raw/docs/api/core/slice.md): A view over a contiguous sequence of elements. - [#source](https://rux-lang.dev/raw/docs/api/core/source.md): Compile-time location of the expression that reads it. - [#target](https://rux-lang.dev/raw/docs/api/core/target.md): Compile-time information about the compilation target. - [#Warn](https://rux-lang.dev/raw/docs/api/core/warn.md): Emits a compilation warning. - [At](https://rux-lang.dev/raw/docs/api/text/string/at.md): Returns the byte at an index. - [Clone](https://rux-lang.dev/raw/docs/api/text/string/clone.md): Returns an independent copy of the string. - [Contains](https://rux-lang.dev/raw/docs/api/text/string/contains.md): Reports whether a substring occurs anywhere in the string. - [Data](https://rux-lang.dev/raw/docs/api/text/string/data.md): Returns the pointer to the underlying bytes. - [EndsWith](https://rux-lang.dev/raw/docs/api/text/string/endswith.md): Reports whether the string closes with a suffix. - [Equals](https://rux-lang.dev/raw/docs/api/text/string/equals.md): Reports whether two strings hold the same bytes. - [Free](https://rux-lang.dev/raw/docs/api/text/string/free.md): Releases the block the string owns. - [From](https://rux-lang.dev/raw/docs/api/text/string/from.md): Creates a string by copying bytes. - [IndexOf](https://rux-lang.dev/raw/docs/api/text/string/indexof.md): Returns the offset of the first occurrence of a substring. - [IsEmpty](https://rux-lang.dev/raw/docs/api/text/string/isempty.md): Reports whether the string holds no bytes. - [Length](https://rux-lang.dev/raw/docs/api/text/string/length.md): Returns the length of the string in bytes. - [New](https://rux-lang.dev/raw/docs/api/text/string/new.md): Creates an empty string. - [Repeat](https://rux-lang.dev/raw/docs/api/text/string/repeat.md): Returns a copy of the contents laid down N times. - [StartsWith](https://rux-lang.dev/raw/docs/api/text/string/startswith.md): Reports whether the string opens with a prefix. - [Substring](https://rux-lang.dev/raw/docs/api/text/string/substring.md): Returns a copy of the bytes in a range. - [ToLower](https://rux-lang.dev/raw/docs/api/text/string/tolower.md): Returns a copy with ASCII letters lowercased. - [ToUpper](https://rux-lang.dev/raw/docs/api/text/string/toupper.md): Returns a copy with ASCII letters uppercased. - [Trim](https://rux-lang.dev/raw/docs/api/text/string/trim.md): Returns a copy with the surrounding whitespace dropped. - [+](https://rux-lang.dev/raw/docs/api/text/string/plus.md): Joins two strings into a new one. - [String](https://rux-lang.dev/raw/docs/api/text/string.md): An immutable, heap-allocated string. - [Append](https://rux-lang.dev/raw/docs/api/text/stringbuilder/append.md): Writes bytes to the end of the builder. - [Capacity](https://rux-lang.dev/raw/docs/api/text/stringbuilder/capacity.md): Returns how many bytes fit before the block has to grow. - [Clear](https://rux-lang.dev/raw/docs/api/text/stringbuilder/clear.md): Forgets the contents but keeps the block. - [Data](https://rux-lang.dev/raw/docs/api/text/stringbuilder/data.md): Returns the pointer to the bytes written so far. - [Free](https://rux-lang.dev/raw/docs/api/text/stringbuilder/free.md): Releases the block the builder owns. - [Grow](https://rux-lang.dev/raw/docs/api/text/stringbuilder/grow.md): Grows the block to hold at least a given number of bytes. - [StringBuilder](https://rux-lang.dev/raw/docs/api/text/stringbuilder.md): A growable buffer for building a string in steps. - [IntoString](https://rux-lang.dev/raw/docs/api/text/stringbuilder/intostring.md): Hands the block over to a string, without copying it. - [IsEmpty](https://rux-lang.dev/raw/docs/api/text/stringbuilder/isempty.md): Reports whether anything has been written. - [Length](https://rux-lang.dev/raw/docs/api/text/stringbuilder/length.md): Returns how many bytes have been written. - [New](https://rux-lang.dev/raw/docs/api/text/stringbuilder/new.md): Creates an empty builder. - [Reserve](https://rux-lang.dev/raw/docs/api/text/stringbuilder/reserve.md): Makes room for more bytes. - [Shrink](https://rux-lang.dev/raw/docs/api/text/stringbuilder/shrink.md): Drops the capacity the builder is not using. - [ToString](https://rux-lang.dev/raw/docs/api/text/stringbuilder/tostring.md): Copies the contents out into a string. - [WithCapacity](https://rux-lang.dev/raw/docs/api/text/stringbuilder/withcapacity.md): Creates an empty builder with room reserved up front. - [IsSpace](https://rux-lang.dev/raw/docs/api/text/isspace.md): Reports whether a byte is whitespace. - [Text Package](https://rux-lang.dev/raw/docs/api/text.md) - [AllocConsole](https://rux-lang.dev/raw/docs/api/windows/allocconsole.md): Allocates a console for the calling process. - [Beep](https://rux-lang.dev/raw/docs/api/windows/beep.md): Generates a simple tone on the speaker. - [CloseHandle](https://rux-lang.dev/raw/docs/api/windows/closehandle.md): Closes an open kernel object handle. - [CodePage](https://rux-lang.dev/raw/docs/api/windows/codepage.md): Identifies a Windows character encoding. - [CopyFileA](https://rux-lang.dev/raw/docs/api/windows/copyfilea.md): Copies an existing file to a new path. - [CreateDirectoryA](https://rux-lang.dev/raw/docs/api/windows/createdirectorya.md): Creates a directory. - [CreateFileA](https://rux-lang.dev/raw/docs/api/windows/createfilea.md): Creates or opens a file or I/O device. - [DeleteFileA](https://rux-lang.dev/raw/docs/api/windows/deletefilea.md): Marks an existing file for deletion. - [ExitProcess](https://rux-lang.dev/raw/docs/api/windows/exitprocess.md): Terminates the calling process and all of its threads. - [FindClose](https://rux-lang.dev/raw/docs/api/windows/findclose.md): Closes a file-search handle. - [FindFirstFileA](https://rux-lang.dev/raw/docs/api/windows/findfirstfilea.md): Starts a file search and returns its first matching entry. - [FindNextFileA](https://rux-lang.dev/raw/docs/api/windows/findnextfilea.md): Retrieves the next entry from a file search. - [FreeLibrary](https://rux-lang.dev/raw/docs/api/windows/freelibrary.md): Releases a reference to a loaded DLL. - [GetCurrentDirectoryA](https://rux-lang.dev/raw/docs/api/windows/getcurrentdirectorya.md): Retrieves the process current directory. - [GetCurrentProcessId](https://rux-lang.dev/raw/docs/api/windows/getcurrentprocessid.md): Returns the identifier of the calling process. - [GetCurrentThreadId](https://rux-lang.dev/raw/docs/api/windows/getcurrentthreadid.md): Returns the identifier of the calling thread. - [GetFileAttributesA](https://rux-lang.dev/raw/docs/api/windows/getfileattributesa.md): Retrieves attributes for a file or directory. - [GetFileSizeEx](https://rux-lang.dev/raw/docs/api/windows/getfilesizeex.md): Retrieves the size of an open file. - [GetLastError](https://rux-lang.dev/raw/docs/api/windows/getlasterror.md): Retrieves the calling thread's last-error code. - [GetLocalTime](https://rux-lang.dev/raw/docs/api/windows/getlocaltime.md): Retrieves the current local date and time. - [GetProcAddress](https://rux-lang.dev/raw/docs/api/windows/getprocaddress.md): Retrieves the address of an exported DLL symbol. - [GetProcessHeap](https://rux-lang.dev/raw/docs/api/windows/getprocessheap.md): Retrieves the calling process's default heap. - [GetStdHandle](https://rux-lang.dev/raw/docs/api/windows/getstdhandle.md): Retrieves a handle to a standard device. - [GetSystemTime](https://rux-lang.dev/raw/docs/api/windows/getsystemtime.md): Retrieves the current UTC date and time. - [GetTickCount64](https://rux-lang.dev/raw/docs/api/windows/gettickcount64.md): Returns milliseconds elapsed since system startup. - [HeapAlloc](https://rux-lang.dev/raw/docs/api/windows/heapalloc.md): Allocates a block from a Win32 heap. - [HeapFree](https://rux-lang.dev/raw/docs/api/windows/heapfree.md): Releases a block allocated from a Win32 heap. - [HeapReAlloc](https://rux-lang.dev/raw/docs/api/windows/heaprealloc.md): Resizes a block allocated from a Win32 heap. - [Windows Package](https://rux-lang.dev/raw/docs/api/windows.md) - [LoadLibraryA](https://rux-lang.dev/raw/docs/api/windows/loadlibrarya.md): Loads a DLL into the calling process. - [MoveFileA](https://rux-lang.dev/raw/docs/api/windows/movefilea.md): Moves or renames a file or directory. - [MultiByteToWideChar](https://rux-lang.dev/raw/docs/api/windows/multibytetowidechar.md): Converts multibyte text to UTF-16. - [ReadConsoleA](https://rux-lang.dev/raw/docs/api/windows/readconsolea.md): Reads narrow characters from a console input buffer. - [ReadFile](https://rux-lang.dev/raw/docs/api/windows/readfile.md): Reads bytes from a file or I/O device. - [RemoveDirectoryA](https://rux-lang.dev/raw/docs/api/windows/removedirectorya.md): Removes an empty directory. - [RtlCompareMemory](https://rux-lang.dev/raw/docs/api/windows/rtlcomparememory.md): Counts matching bytes from the start of two memory ranges. - [RtlCopyMemory](https://rux-lang.dev/raw/docs/api/windows/rtlcopymemory.md): Copies bytes between non-overlapping memory ranges. - [RtlFillMemory](https://rux-lang.dev/raw/docs/api/windows/rtlfillmemory.md): Fills a memory range with a byte value. - [RtlZeroMemory](https://rux-lang.dev/raw/docs/api/windows/rtlzeromemory.md): Fills a memory range with zeros. - [SetCurrentDirectoryA](https://rux-lang.dev/raw/docs/api/windows/setcurrentdirectorya.md): Changes the process current directory. - [SetFileAttributesA](https://rux-lang.dev/raw/docs/api/windows/setfileattributesa.md): Sets attributes for a file or directory. - [SetFilePointerEx](https://rux-lang.dev/raw/docs/api/windows/setfilepointerex.md): Moves the file pointer of an open file. - [Sleep](https://rux-lang.dev/raw/docs/api/windows/sleep.md): Suspends execution of the current thread. - [Types and Constants](https://rux-lang.dev/raw/docs/api/windows/types.md): Types and constants exported by the Windows package. - [WideCharToMultiByte](https://rux-lang.dev/raw/docs/api/windows/widechartomultibyte.md): Converts UTF-16 text to a multibyte encoding. - [WriteConsoleA](https://rux-lang.dev/raw/docs/api/windows/writeconsolea.md): Writes narrow characters to a console screen buffer. - [WriteConsoleW](https://rux-lang.dev/raw/docs/api/windows/writeconsolew.md): Writes UTF-16 characters to a console screen buffer. - [WriteFile](https://rux-lang.dev/raw/docs/api/windows/writefile.md): Writes bytes to a file or I/O device. - [API Reference](https://rux-lang.dev/raw/docs/api.md): Reference documentation for the Rux packages — the cross-platform Format, Io, Math, Memory, Std, and Text, and the platform-dependent bindings for BSD, illumos, Linux, macOS, and Windows. ## Notes - Rux is pre-1.0 and newer than most training data: prefer these pages over what similar languages do. - Complete example programs for every lesson live at https://github.com/rux-lang/Examples.