Skip to main content

Crate opys_dev

Crate opys_dev 

Source
Expand description

opys-dev — the build-time SDK.

Build-time only, by design: opys-core carries the contracts both sides of the build/runtime wall share, so a type only one side ever names — such as Contribution — belongs here instead.

This crate holds the part of the build that is data in, data out. Driving the plugins is left to the caller, because that half is host-shaped: the JS SDK runs author closures, while a native builder runs Rust plugins. Both then hand their contributions to assemble, so the manifest is folded exactly one way regardless of who produced it.

It also carries the two pieces of plumbing every build-time resolver needs and the runtime must never inherit: a one-shot blocking HTTP GET, and the GitHub Releases listing several loaders resolve against. Retry, resume and download bookkeeping are the runtime’s job and stay in opys-runtime.

Re-exports§

pub use http::HttpBytes;
pub use http::HttpError;
pub use http::HttpResponse;
pub use http::JsonGetError;
pub use http::OPYS_USER_AGENT;

Modules§

github
Shared GitHub Releases helpers.
gitlab
GitLab’s generic package registry.
http
Build-time HTTP.
pin
Pinning a file nobody published a hash for.
url
URL escaping for build-time resolvers.

Structs§

Assembled
The assembled manifest plus the collision warnings raised while merging.
BuildArtifact
An artifact as a plugin hands it over: a manifest’s own, except that its source may also say where the bytes are on this machine — { file }, or { bytes } a plugin made.
Contribution
A plugin’s build output. Every field is optional in spirit; an empty default contributes nothing.
ManifestConfig
The author-supplied half of the manifest.
PlacedFile
A scanned file with its place in the installation decided.
PluginOutput
One plugin’s output, tagged with the plugin that produced it. The name is what collision warnings point at, so it travels with the contribution rather than being recovered from a parallel list.
ScannedFile
One file found under the scanned directory.

Enums§

AssembleError
Why a set of contributions and a config could not be made into a manifest.
BuildArtifactError
LaunchFragment
One named launch fragment a plugin exposes — jvmArgs (a Valset), mainClass (a Val), bin (a bare string). A config names one on its launch line as @plugin.group, and crate::assemble puts it there.
ScanError
ScanHash
The hash a published file is pinned with.

Functions§

assemble
Fold plugin contributions and the author’s manifest config into the final Manifest.
scan_directory
Every regular file under root, in rel order.
scanned_files
The artifacts of a scanned directory.

Type Aliases§

LaunchGroups
A plugin’s named launch fragments, looked up by name and never iterated for output — hence an unordered map.