Skip to main content

aver/services/
mod.rs

1/// Built-in platform services available to Aver programs.
2///
3/// Each service is a named namespace (`Args`, `Console`, `Http`, `Disk`, `Tcp`, `HttpServer`, `Time`, `Env`) that must
4/// be declared as an effect in order to be called:
5///
6/// ```aver
7/// fn fetch(url: String) -> Result<HttpResponse, String>
8///     ! [Http.get]
9///     Http.get(url)
10/// ```
11///
12/// Every service module exposes the same three functions:
13/// - `register(global)` — insert the namespace into the interpreter's global env
14/// - `effects(name)` — return required effects for a builtin name (or empty)
15/// - `call(name, args)` — handle the call, returning `None` if not owned
16///
17/// Pure type namespaces (Int, Float, String, List) live in `src/types/` instead.
18pub mod args;
19pub mod console;
20pub mod disk;
21pub mod env;
22pub mod http;
23pub mod http_server;
24pub mod tcp;
25pub mod time;