Skip to main content

opys_dev/
lib.rs

1//! `opys-dev` — the build-time SDK.
2//!
3//! Build-time only, by design: `opys-core` carries the contracts both sides of
4//! the build/runtime wall share, so a type only one side ever names — such as
5//! [`Contribution`] — belongs here instead.
6//!
7//! This crate holds the part of the build that is data in, data out. Driving
8//! the plugins is left to the caller, because that half is host-shaped: the JS
9//! SDK runs author closures, while a native builder runs Rust plugins. Both
10//! then hand their contributions to [`assemble`], so the manifest is folded
11//! exactly one way regardless of who produced it.
12//!
13//! It also carries the two pieces of plumbing every build-time resolver needs
14//! and the runtime must never inherit: a one-shot blocking HTTP GET, and the
15//! GitHub Releases listing several loaders resolve against. Retry, resume and
16//! download bookkeeping are the runtime's job and stay in `opys-runtime`.
17
18mod contribution;
19mod engine;
20#[cfg(feature = "net")]
21pub mod github;
22#[cfg(feature = "net")]
23pub mod gitlab;
24#[cfg(feature = "net")]
25pub mod http;
26#[cfg(feature = "net")]
27pub mod pin;
28mod scan;
29pub mod url;
30
31pub use contribution::{
32    BuildArtifact, BuildArtifactError, Contribution, LaunchFragment, LaunchGroups, PluginOutput,
33};
34pub use engine::{assemble, AssembleError, Assembled, ManifestConfig};
35#[cfg(feature = "net")]
36pub use http::{HttpBytes, HttpError, HttpResponse, JsonGetError, OPYS_USER_AGENT};
37pub use scan::{scan_directory, scanned_files, PlacedFile, ScanError, ScanHash, ScannedFile};