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 (`Console`, `Http`, `Disk`, `Tcp`, `HttpServer`) 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]
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 console;
19pub mod disk;
20pub mod http;
21pub mod http_server;
22pub mod tcp;