1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Molt WASM-aware registry client.
//!
//! This crate is a thin, WASM-focused extension on top of [`oci-client`]
//! (oras-project/rust-oci-client).
//!
//! It supports:
//! - OCI Distribution API (`/v2`) helpers for pulling component wasm layers.
//! - Molt extension API (`/wasm/v1`) helpers for WIT, interface index, and search.
//!
//! The Molt spec this targets is described in this repo's docs:
//! - WIT referrers: `application/vnd.wasm.wit.v1+text`
//! - `/wasm/v1` endpoints: `.../wit`, `.../interfaces`, `.../dependencies`, `/search`
//!
//! # Example (env-configured)
//!
//! ```no_run
//! use molt_registry_client::{OciWasmClient, WasmV1Client, WitRequest};
//!
//! # async fn run() -> anyhow::Result<()> {
//! let oci = OciWasmClient::from_env()?.expect("set MOLT_REGISTRY");
//! let wasm = oci.pull_component_wasm("example/repo", "1.0.0").await?;
//! println!("downloaded {} bytes", wasm.len());
//!
//! let wasm_v1 = WasmV1Client::from_env()?.expect("set MOLT_REGISTRY");
//! let wit = wasm_v1
//! .wit_text("example/repo", "1.0.0", &WitRequest::default())
//! .await?;
//! println!("{}", wit.text);
//!
//! # Ok(()) }
//! ```
pub use *;
pub use *;
pub use RegistryEndpoint;
pub use ;
pub use *;