Expand description
§aver-rt
aver-rt is the shared Rust runtime for Aver.
It is used by:
- the Aver VM runtime adapters in this repository
- Rust projects generated by
aver compile
The crate exists so Aver semantics live in one place instead of being duplicated between the VM runtime and generated Rust output.
That shared-runtime role is practical, not just architectural. Improvements to
AverList, String.slice, or service helpers here affect both generated Rust
programs and the VM-facing adapters that rely on the same semantics.
§What it contains
AverList<T>: persistent list used by Aver list operations, including deep-list paths such as teardown,tail, andlist_uncons; append-heavy chains are packed into structural segments so the VM and generated Rust share the same faster behavior onappend + get(i)workloadsAverDisplay: Aver-specific display formatting used byConsole.printand string interpolation- shared runtime helpers for console, time, disk, env, and string operations
- shared service types:
HeaderHttpResponseHttpRequestTcpConnection
- shared service runtimes:
tcphttp(behind thehttpfeature)http_server
§Features
- default: no optional dependencies
http: enables the HTTP client runtime viaureq
§Stability
This crate is primarily intended to support Aver-generated programs and the Aver VM runtime. The public API should be treated as young and evolving.
§Repository
- Source: https://github.com/jasisz/aver
- Main project docs: https://github.com/jasisz/aver/blob/main/README.md
Re-exports§
pub use terminal::TerminalGuard;pub use terminal::clear as terminal_clear;pub use terminal::disable_raw_mode as terminal_disable_raw_mode;pub use terminal::enable_raw_mode as terminal_enable_raw_mode;pub use terminal::flush as terminal_flush;pub use terminal::hide_cursor as terminal_hide_cursor;pub use terminal::move_to as terminal_move_to;pub use terminal::print_at_cursor as terminal_print;pub use terminal::read_key as terminal_read_key;pub use terminal::reset_color as terminal_reset_color;pub use terminal::restore_terminal;pub use terminal::set_color as terminal_set_color;pub use terminal::show_cursor as terminal_show_cursor;pub use terminal::size as terminal_size;
Modules§
Macros§
- aver_
list_ match - Pattern-match on an AverList: empty and cons (head, tail) arms.
Structs§
- Aver
List - Aver
List Iter - AverMap
- AverStr
- Aver string type: newtype over Rc
for O(1) clone and native +operator. - Aver
Vector - Http
Request - Http
Response - TcpConnection
- Terminal
Size
Traits§
Functions§
- append_
text - aver_
display - aver_
str_ concat - Concatenate two AverStr values.
- cli_
args - console_
error - console_
print - console_
warn - delete_
dir - delete_
file - env_get
- env_set
- list_
dir - list_
uncons - list_
uncons_ cloned - make_
dir - par_
execute - Execute tasks in parallel using scoped threads.
All branches run to completion (
completemode). - par_
execute_ sequential - Execute tasks sequentially, left-to-right. Used by
sequentialmode. Valid per the language spec (the fully-sequential interleave is always permitted). Available on every target — no threading required. - par_
execute_ with_ cancel - path_
exists - read_
line - read_
text - string_
join - string_
slice - time_
now - time_
sleep - time_
unix_ ms - write_
text
Type Aliases§
- Buffer
- Internal builder for the deforestation lowering (0.15 Traversal).
Backs
__buf_*intrinsics emitted when the compiler fusesString.join(<builder>(...), sep)shapes —String::with_capacitypluspush_stris exactly the right shape, no GC dance needed. User code never sees this directly; it lives strictly between__buf_newand__buf_finalizeinside synthesized helpers. - Cancel
Task - Execute tasks in parallel with cooperative cancellation (
cancelmode). - Http
Headers - Multi-value HTTP headers, modelled as
Map<String, List<String>>— matches RFC 9110 (same-name fields) and RFC 6265 (multiple Set-Cookie). Keys are case-insensitive by convention; runtime lowercases incoming names. Mirrors Gonet/http.Header.