heyo-sdk 0.1.0

Rust SDK for the Heyo cloud sandbox API.
Documentation
//! Rust SDK for the Heyo cloud sandbox API.
//!
//! Mirrors `sdk-ts/` (`@heyocomputer/sdk`). The public surface is centered
//! on three handles:
//!
//! - [`Sandbox`] — VM lifecycle, with `.commands()` and `.files()` sub-clients
//!   and an interactive WebSocket [`ShellSession`].
//! - [`Database`] — cloud sqlite databases with exec, connection tokens, and
//!   checkout/checkin for offline editing.
//! - [`HeyoClient`] — the underlying HTTP transport. Built from
//!   [`HeyoClientOptions`] (or constructed implicitly by the high-level
//!   `create`/`connect` helpers).
//!
//! ```no_run
//! use heyo_sdk::{Sandbox, SandboxCreateOptions, HeyoClientOptions};
//!
//! # async fn run() -> Result<(), heyo_sdk::HeyoError> {
//! let sandbox = Sandbox::create(
//!     SandboxCreateOptions { image: Some("ubuntu:24.04".into()), ..Default::default() },
//!     HeyoClientOptions::default(),
//! ).await?;
//! let out = sandbox.commands().run("echo hi", Default::default()).await?;
//! assert_eq!(out.stdout.trim(), "hi");
//! sandbox.kill().await?;
//! # Ok(()) }
//! ```

mod archive;
mod client;
mod commands;
mod databases;
mod errors;
mod files;
mod networks;
mod sandbox;
mod shell;
mod types;

pub use archive::{archive_dir, ArchiveDirOptions, ArchiveResult};
pub use client::{HeyoClient, HeyoClientOptions, RequestOptions};
pub use commands::Commands;
pub use databases::{
    BatchResult, CheckinOptions, CheckinResult, CheckoutResult, ConnectionScope,
    ConnectionToken, ConnectionTokenInfo, ConnectionTokenOptions, Database,
    DatabaseCreateOptions, DatabaseInfo, ExecOptions, ExecResult, SqlStatement,
    SqlTransactionMode, SqlValue,
};
pub use errors::HeyoError;
pub use files::{FileContent, FileOptions, Files};
pub use networks::{
    Network, NetworkCreateOptions, NetworkInfo, NetworkMember, NetworkMemberKind,
    NetworkMemberRegistration, NetworkUpdateOptions,
};
pub use sandbox::Sandbox;
pub use shell::{ShellEvent, ShellOptions, ShellReconnectOptions, ShellSession};
pub use types::{
    BoundUrl, CommandResult, CommandRunOptions, PublicImage, SandboxCreateOptions,
    SandboxDriver, SandboxInfo, SandboxRegion, SandboxSize, SandboxStatus,
};