MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / assets

Function assets

xtask/src/main.rs:272–378  ·  view source on GitHub ↗
(args: Vec<String>)

Source from the content-addressed store, hash-verified

270}
271
272fn assets(args: Vec<String>) -> Result<()> {
273 match args.first().map(String::as_str) {
274 Some("check") => {
275 let strict_local = args.iter().any(|arg| arg == "--strict-local");
276 let strict_generated = args.iter().any(|arg| arg == "--strict-generated");
277 let release_staged = is_release_staged_workspace();
278 let manifest = check_sources_manifest(strict_local)?;
279 check_source_free_repo()?;
280 check_no_legacy_runtime_shims()?;
281 check_production_wasix_build_inputs()?;
282 check_rust_startup_abi_boundary()?;
283 check_canonical_asset_layout(strict_generated)?;
284 check_generated_manifest(&manifest, strict_generated)?;
285 if strict_generated {
286 verify_asset_manifest_hashes()?;
287 verify_generated_extension_surface()?;
288 }
289 if !release_staged {
290 extension_catalog::check_catalog_file(strict_generated)?;
291 extension_catalog::check_build_plan_file(strict_generated)?;
292 }
293 check_generated_wasix_export_list(strict_generated)
294 }
295 Some("verify-committed") => verify_committed_assets(),
296 Some("audit-upstream") => {
297 let strict = args.iter().any(|arg| arg == "--strict");
298 let manifest = check_sources_manifest(false)?;
299 audit_upstream_fixes(&manifest, strict)
300 }
301 Some("build") => {
302 let manifest = check_sources_manifest(false)?;
303 let profile = value_after(&args, "--profile").unwrap_or(DEFAULT_ASSET_BUILD_PROFILE);
304 let target = value_after(&args, "--target-triple").unwrap_or(env::consts::ARCH);
305 build_asset_spine(&manifest, profile, target, &args)
306 }
307 Some("template") => {
308 let manifest = check_sources_manifest(false)?;
309 generate_pgdata_template_asset(&manifest)
310 }
311 Some("fetch") => {
312 let manifest = load_sources_manifest()?;
313 validate_sources_manifest(&manifest)?;
314 fetch_pinned_sources(&manifest)
315 }
316 Some("release-build") => {
317 let manifest = check_sources_manifest_for_asset_build(&args)?;
318 let profile = value_after(&args, "--profile").unwrap_or(DEFAULT_ASSET_BUILD_PROFILE);
319 let target = value_after(&args, "--target-triple").unwrap_or(host_target_triple());
320 release_build_assets(&manifest, profile, target, &args)
321 }
322 Some("build-host") => {
323 let manifest = check_sources_manifest_for_asset_build(&args)?;
324 release_build_assets(
325 &manifest,
326 DEFAULT_ASSET_BUILD_PROFILE,
327 host_target_triple(),
328 &args,
329 )

Callers 1

mainFunction · 0.85

Tested by

no test coverage detected