Expand description
AIRL SDK - Typed Rust client for the AIRL HTTP API.
Provides a Client type wrapping every endpoint exposed by airl-api,
with optional Bearer token authentication and structured error types.
§Example
use airl_sdk::Client;
let client = Client::new("http://127.0.0.1:9090");
// Create a project from a JSON IR string
let info = client.create_project("my-app", "{...}").unwrap();
println!("project: {} version={}", info.name, info.version);
// Type check
let tc = client.typecheck().unwrap();
assert!(tc.success);
// Interpret
let output = client.interpret_default().unwrap();
print!("{}", output.stdout);§Authentication
If the server is started with serve_with_auth, provide a token:
use airl_sdk::Client;
let client = Client::new("http://127.0.0.1:9090")
.with_auth_token("my-secret-token");Structs§
- Client
- Typed client for the AIRL HTTP API.
- Compile
Response - Response from
Client::compile. - Constraints
Response - Response from
Client::check_constraints. - Diagnostic
Response - One entry from the type checker output.
- Interpret
Limits - Execution limits for
Client::interpret. - Interpret
Response - Response from
Client::interpret. - Module
Response - Result of
Client::get_module: the current module plus its version. - Patch
Preview Response - Response from
Client::preview_patch. - Patch
Result Response - Response from
Client::apply_patchorClient::undo_patch. - Project
Info - Summary information about a loaded project.
- Text
Projection Response - Response from
Client::project_to_text. - Type
Check Response - Response from
Client::typecheck.
Enums§
- Projection
Lang - Language for
Client::project_to_text. - SdkError
- Errors returned by the AIRL SDK client.