repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/traits.rs
crates/builder/src/artifact_qa/traits.rs
//! Generic abstractions for post‑build actions. use crate::artifact_qa::diagnostics::DiagnosticCollector; use crate::artifact_qa::reports::Report; use crate::{BuildContext, BuildEnvironment}; use sps2_errors::Error; use std::future::Future; pub trait Action: Send + Sync + 'static { /// Human readable label (emit...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/headers.rs
crates/builder/src/artifact_qa/patchers/headers.rs
//! Converts absolute include paths in headers to <relative> form. use crate::artifact_qa::{reports::Report, traits::Patcher}; use crate::{BuildContext, BuildEnvironment}; use ignore::WalkBuilder; use regex::Regex; use sps2_errors::Error; pub struct HeaderPatcher; impl crate::artifact_qa::traits::Action for HeaderPat...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/placeholder.rs
crates/builder/src/artifact_qa/patchers/placeholder.rs
//! Replaces `BUILD_PLACEHOLDER` and build‑prefix strings in *text* files. use crate::artifact_qa::{reports::Report, traits::Patcher}; use crate::{BuildContext, BuildEnvironment}; use sps2_errors::Error; use globset::{Glob, GlobSetBuilder}; use ignore::WalkBuilder; pub struct PlaceholderPatcher; impl crate::artifact...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/permissions.rs
crates/builder/src/artifact_qa/patchers/permissions.rs
//! Ensures binaries and dynamic libraries have proper execute permissions //! //! This patcher comprehensively handles all types of executables: //! - Dynamic libraries (.dylib, .so) //! - All files in bin/, sbin/ directories //! - Mach-O executables in libexec/ //! - Scripts with shebang lines (#!/bin/sh, etc.) //! -...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/object_cleaner.rs
crates/builder/src/artifact_qa/patchers/object_cleaner.rs
//! Cleaner that removes object (.o) files use crate::artifact_qa::{reports::Report, traits::Patcher}; use crate::{BuildContext, BuildEnvironment}; use sps2_errors::Error; pub struct ObjectFileCleaner; impl crate::artifact_qa::traits::Action for ObjectFileCleaner { const NAME: &'static str = "Object file cleaner...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/rpath.rs
crates/builder/src/artifact_qa/patchers/rpath.rs
//! Fixes install‑name / `LC_RPATH` of Mach‑O dylibs & executables. use crate::artifact_qa::{macho_utils, reports::Report, traits::Patcher}; use crate::{BuildContext, BuildEnvironment}; use sps2_errors::Error; use sps2_events::{AppEvent, EventSender, GeneralEvent}; use sps2_platform::{PlatformContext, PlatformManager}...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/python_bytecode_cleanup.rs
crates/builder/src/artifact_qa/patchers/python_bytecode_cleanup.rs
//! Patcher that removes Python bytecode and build artifacts from staging directory //! //! This patcher cleans up dynamic files generated during Python package installation //! that should not be included in the final .sp packages. These files are automatically //! regenerated when Python packages are used at runtime....
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/mod.rs
crates/builder/src/artifact_qa/patchers/mod.rs
//! Registry of all post-build patcher modules. pub mod binary_string; pub mod codesigner; pub mod headers; pub mod la_cleaner; pub mod object_cleaner; pub mod permissions; pub mod pkgconfig; pub mod placeholder; pub mod python_bytecode_cleanup; pub mod python_isolation; pub mod rpath; // Re-export the concrete types...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/python_isolation.rs
crates/builder/src/artifact_qa/patchers/python_isolation.rs
//! Python isolation patcher - creates wrapper scripts for isolated Python packages use crate::artifact_qa::{ reports::Report, traits::{Action, Patcher}, }; use crate::{BuildContext, BuildEnvironment}; use sps2_errors::{BuildError, Error}; use std::collections::HashMap; use std::os::unix::fs::PermissionsExt; u...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/pkgconfig.rs
crates/builder/src/artifact_qa/patchers/pkgconfig.rs
//! Fixes *.pc and *Config.cmake so downstream builds never see /opt/pm/build/… use crate::artifact_qa::{reports::Report, traits::Patcher}; use crate::{BuildContext, BuildEnvironment}; use ignore::WalkBuilder; use sps2_errors::Error; pub struct PkgConfigPatcher; impl crate::artifact_qa::traits::Action for PkgConfigPa...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/la_cleaner.rs
crates/builder/src/artifact_qa/patchers/la_cleaner.rs
//! Cleaner that removes libtool archive (.la) files use crate::artifact_qa::{reports::Report, traits::Patcher}; use crate::{BuildContext, BuildEnvironment}; use sps2_errors::Error; pub struct LaFileCleaner; impl crate::artifact_qa::traits::Action for LaFileCleaner { const NAME: &'static str = "Libtool archive c...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/codesigner.rs
crates/builder/src/artifact_qa/patchers/codesigner.rs
//! Re-signs binaries after patching to fix code signature issues on macOS use crate::artifact_qa::{macho_utils, reports::Report, traits::Patcher}; use crate::{BuildContext, BuildEnvironment}; use sps2_errors::Error; use sps2_platform::{PlatformContext, PlatformManager}; use std::path::Path; pub struct CodeSigner { ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/patchers/binary_string.rs
crates/builder/src/artifact_qa/patchers/binary_string.rs
//! Binary-safe string patcher for embedded paths in executables and libraries use crate::artifact_qa::{macho_utils, reports::Report, traits::Patcher}; use crate::{BuildContext, BuildEnvironment}; use sps2_errors::Error; use sps2_events::{AppEvent, GeneralEvent}; use std::collections::HashMap; use std::path::Path; //...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/scanners/macho.rs
crates/builder/src/artifact_qa/scanners/macho.rs
//! Validator that inspects Mach‑O headers without spawning `otool`. use crate::artifact_qa::{ diagnostics::{DiagnosticCollector, IssueType}, reports::Report, traits::Validator, }; use crate::{BuildContext, BuildEnvironment}; use object::{ macho::{MachHeader32, MachHeader64}, read::macho::{ ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/scanners/archive.rs
crates/builder/src/artifact_qa/scanners/archive.rs
//! Validator that looks into static archives (*.a) files. use crate::artifact_qa::{ diagnostics::{DiagnosticCollector, IssueType}, reports::Report, traits::Validator, }; use crate::{BuildContext, BuildEnvironment}; use object::read::archive::ArchiveFile; use sps2_errors::Error; use sps2_events::{AppEvent,...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/scanners/mod.rs
crates/builder/src/artifact_qa/scanners/mod.rs
//! Registry of all scanner (validator) modules. pub mod archive; pub mod hardcoded; pub mod macho; pub mod staging; // Re-export the concrete types for convenient access elsewhere. pub use archive::ArchiveScanner; pub use hardcoded::HardcodedScanner; pub use macho::MachOScanner; pub use staging::StagingScanner;
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/scanners/staging.rs
crates/builder/src/artifact_qa/scanners/staging.rs
//! Validator that checks if the staging directory contains any files. //! //! This is a fundamental check that runs for all build system profiles. //! An empty staging directory indicates that the build succeeded but no files //! were installed, which usually means the install step failed or was skipped. use crate::a...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/artifact_qa/scanners/hardcoded.rs
crates/builder/src/artifact_qa/scanners/hardcoded.rs
//! Validator that searches every byte for `/opt/pm/build/...` or the //! placeholder prefix. It is binary‑safe and SIMD‑accelerated. use crate::artifact_qa::{diagnostics::DiagnosticCollector, reports::Report, traits::Validator}; use crate::{BuildContext, BuildEnvironment}; use bstr::ByteSlice; use ignore::WalkBuilder...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/recipe/parser.rs
crates/builder/src/recipe/parser.rs
//! YAML recipe parser with validation and variable expansion use super::model::{Build, ParsedStep, PostCommand, PostOption, YamlRecipe}; use sps2_errors::{BuildError, Error}; use std::collections::HashMap; use std::path::Path; /// Parse a YAML recipe from a file /// /// # Errors /// /// Returns an error if: /// - Th...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/recipe/executor.rs
crates/builder/src/recipe/executor.rs
//! YAML recipe execution use crate::yaml::RecipeMetadata; use crate::{BuildConfig, BuildContext, BuildEnvironment}; use sps2_errors::Error; use sps2_types::package::PackageSpec; /// Execute the YAML recipe and return dependencies, metadata, install request status, and `qa_pipeline` pub async fn execute_recipe( c...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/recipe/model.rs
crates/builder/src/recipe/model.rs
//! YAML recipe format for sps2 //! //! This module provides a declarative YAML-based recipe format that replaces //! the Starlark-based system with proper staged execution. use crate::environment::IsolationLevel; use serde::{Deserialize, Serialize}; use std::collections::HashMap; /// Complete YAML recipe structure #...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/recipe/mod.rs
crates/builder/src/recipe/mod.rs
//! Recipe parsing and execution module pub mod executor; pub mod model; pub mod parser; // Re-export commonly used items pub use executor::execute_recipe;
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/packaging/archive.rs
crates/builder/src/packaging/archive.rs
//! Deterministic TAR archive creation for reproducible builds use sps2_errors::{BuildError, Error}; use std::path::{Path, PathBuf}; use tokio::fs::File; /// Default deterministic timestamp (Unix epoch) for reproducible builds const DETERMINISTIC_TIMESTAMP: u64 = 0; /// Environment variable for `SOURCE_DATE_EPOCH` (...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/packaging/manifest.rs
crates/builder/src/packaging/manifest.rs
//! Package manifest and SBOM coordination //! NOTE: SBOM generation is currently disabled by callers (soft-disabled). // use crate::utils::events::send_event; use crate::yaml::RecipeMetadata; use crate::{BuildContext, BuildEnvironment}; // use sps2_errors::Error; use sps2_types::Manifest; // Create package manifest ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/packaging/mod.rs
crates/builder/src/packaging/mod.rs
//! Packaging module for archive, compression, manifest, and signing //! SBOM support removed from packaging. pub mod archive; pub mod compression; pub mod manifest; pub mod signing; use self::archive::create_deterministic_tar_archive; use self::compression::compress_with_zstd; use self::signing::PackageSigner; use...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/packaging/signing.rs
crates/builder/src/packaging/signing.rs
//! Package signing with Minisign use minisign::{sign, KeyPair, PublicKey, SecretKey, SecretKeyBox, SignatureBox}; use sps2_config::builder::SigningSettings; use sps2_errors::{BuildError, Error}; use std::io::Cursor; use std::path::{Path, PathBuf}; use tokio::fs; /// Package signer using Minisign pub struct PackageSi...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/packaging/compression.rs
crates/builder/src/packaging/compression.rs
//! Zstandard compression for sps2 packages //! //! This module applies a fixed Zstandard compression level when creating //! package archives, ensuring consistent output across builds. use sps2_errors::Error; use std::path::Path; const DEFAULT_LEVEL: i32 = 9; /// Compress tar archive with zstd using async-compressi...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/stages/source.rs
crates/builder/src/stages/source.rs
//! Source stage types and operations use serde::{Deserialize, Serialize}; /// Source operations that can be executed #[derive(Debug, Clone, Serialize, Deserialize)] pub enum SourceStep { /// Clean the source directory Cleanup, /// Fetch file from URL Fetch { url: String, extract_to: ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/stages/environment.rs
crates/builder/src/stages/environment.rs
//! Environment stage types and operations use crate::environment::IsolationLevel; use serde::{Deserialize, Serialize}; /// Environment setup operations #[derive(Debug, Clone, Serialize, Deserialize)] pub enum EnvironmentStep { /// Set isolation level SetIsolation { level: IsolationLevel }, /// Apply com...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/stages/executors.rs
crates/builder/src/stages/executors.rs
//! Stage-specific execution functions use crate::security::SecurityContext; use crate::stages::{BuildCommand, EnvironmentStep, PostStep, SourceStep}; use crate::utils::events::send_event; use crate::{BuildCommandResult, BuildContext, BuildEnvironment, BuilderApi}; use sps2_errors::Error; use sps2_events::{AppEvent, G...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/stages/build.rs
crates/builder/src/stages/build.rs
//! Build stage types and operations use serde::{Deserialize, Serialize}; /// Build commands that can be executed #[derive(Debug, Clone, Serialize, Deserialize)] pub enum BuildCommand { /// Run configure script Configure { args: Vec<String> }, /// Run make Make { args: Vec<String> }, /// Run aut...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/stages/mod.rs
crates/builder/src/stages/mod.rs
//! Stage-specific types for the builder //! //! This module provides types for each stage of the build process, //! maintaining a clear separation between parsing and execution. pub mod build; pub mod environment; pub mod executors; pub mod post; pub mod source; // Re-export execution types pub use build::BuildComma...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/stages/post.rs
crates/builder/src/stages/post.rs
//! Post-processing stage types and operations use serde::{Deserialize, Serialize}; use sps2_types::RpathStyle; /// Post-processing operations #[derive(Debug, Clone, Serialize, Deserialize)] pub enum PostStep { /// Patch rpaths in binaries PatchRpaths { style: RpathStyle, paths: Vec<String>, ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/utils/timeout.rs
crates/builder/src/utils/timeout.rs
//! Timeout utilities for build operations use sps2_errors::{BuildError, Error}; use std::future::Future; use std::time::Duration; /// Execute a future with a timeout pub async fn with_timeout<T, F>( future: F, timeout_seconds: u64, package_name: &str, ) -> Result<T, Error> where F: Future<Output = Re...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/utils/executor.rs
crates/builder/src/utils/executor.rs
//! Staged execution implementation for proper build ordering use crate::build_plan::{BuildPlan, EnvironmentConfig}; use crate::environment::BuildEnvironment; use crate::recipe::parser::parse_yaml_recipe; use crate::security::SecurityContext; use crate::stages::executors::{ execute_build_commands_list_with_securit...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/utils/mod.rs
crates/builder/src/utils/mod.rs
//! Utility modules for the builder crate pub mod events; pub mod executor; pub mod fileops; pub mod format; pub mod timeout;
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/utils/format.rs
crates/builder/src/utils/format.rs
/// File size and formatting utilities use sps2_errors::{BuildError, Error}; use std::path::Path; use tokio::fs::File; use tokio::io::AsyncReadExt; /// Information about detected compression format #[derive(Clone, Debug, PartialEq)] pub struct CompressionFormatInfo { /// Estimated total compressed size pub com...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/utils/events.rs
crates/builder/src/utils/events.rs
//! Event emission utilities for build operations use crate::BuildContext; use sps2_events::{AppEvent, EventEmitter}; /// Send event if context has event sender pub fn send_event(context: &BuildContext, event: AppEvent) { context.emit(event); }
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/utils/fileops.rs
crates/builder/src/utils/fileops.rs
//! File system operations for build processes use sps2_errors::Error; use std::path::Path; use tokio::fs; /// Recursively copy directory contents pub fn copy_directory_recursive<'a>( src: &'a Path, dst: &'a Path, ) -> std::pin::Pin<Box<dyn std::future::Future<Output = Result<(), Error>> + Send + 'a>> { B...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/yaml/recipe.rs
crates/builder/src/yaml/recipe.rs
//! Recipe data structures use serde::{Deserialize, Serialize}; use sps2_types::RpathStyle; /// Recipe metadata collected from `metadata()` function #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct RecipeMetadata { pub name: String, pub version: String, pub description: Option<String>, ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/yaml/mod.rs
crates/builder/src/yaml/mod.rs
//! YAML recipe handling //! //! This module provides YAML-based recipe format for build recipes, //! using a declarative, staged approach for package building. mod recipe; pub use recipe::{BuildStep, RecipeMetadata};
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/environment/variables.rs
crates/builder/src/environment/variables.rs
//! Environment variable setup and isolation use super::core::BuildEnvironment; use std::collections::HashMap; impl BuildEnvironment { /// Get a summary of the build environment for debugging #[must_use] pub fn environment_summary(&self) -> HashMap<String, String> { let mut summary = HashMap::new(...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/environment/core.rs
crates/builder/src/environment/core.rs
//! Core `BuildEnvironment` struct and construction use crate::BuildContext; use sps2_errors::Error; use sps2_events::{AppEvent, EventEmitter, EventSender, GeneralEvent}; use sps2_install::Installer; use sps2_net::NetClient; use sps2_resolver::Resolver; use sps2_store::PackageStore; use sps2_types::Version; use std::c...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/environment/hermetic.rs
crates/builder/src/environment/hermetic.rs
// Crate-level pedantic settings apply #![allow(clippy::module_name_repetitions)] //! Hermetic build environment isolation //! //! This module provides comprehensive hermetic isolation features for build environments, //! ensuring builds are reproducible and isolated from the host system. use super::core::BuildEnviro...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/environment/directories.rs
crates/builder/src/environment/directories.rs
//! Build directory structure management use super::core::BuildEnvironment; use sps2_errors::{BuildError, Error}; use sps2_events::{AppEvent, EventEmitter}; use tokio::fs; impl BuildEnvironment { /// Initialize the build environment /// /// # Errors /// /// Returns an error if directories cannot b...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/environment/types.rs
crates/builder/src/environment/types.rs
//! Types and result structures for build environment use std::fmt; use serde::de::{self, IgnoredAny, MapAccess, Unexpected, Visitor}; use std::path::PathBuf; /// Result of executing a build command #[derive(Debug)] pub struct BuildCommandResult { /// Whether the command succeeded pub success: bool, /// ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/environment/mod.rs
crates/builder/src/environment/mod.rs
//! Build environment management //! //! This module provides isolated build environments for package building. //! It manages directory structure, environment variables, dependency installation, //! command execution, and environment isolation verification. mod core; mod dependencies; mod directories; mod execution; ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/environment/dependencies.rs
crates/builder/src/environment/dependencies.rs
//! Build dependency installation use super::core::BuildEnvironment; use sps2_errors::{BuildError, Error}; use sps2_events::{AppEvent, FailureContext, GeneralEvent, LifecycleEvent}; use sps2_resolver::{InstalledPackage, ResolutionContext}; use sps2_state::StateManager; use sps2_types::package::PackageSpec; use sps2_ty...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/environment/isolation.rs
crates/builder/src/environment/isolation.rs
//! Environment verification and coordination //! //! This module provides comprehensive isolation verification for build environments, //! including environment variable sanitization, path isolation checks, and //! network isolation verification. use super::core::BuildEnvironment; use sps2_errors::{BuildError, Error}...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/environment/execution.rs
crates/builder/src/environment/execution.rs
//! Command execution in isolated environment use super::{core::BuildEnvironment, types::BuildCommandResult}; use sps2_errors::{BuildError, Error}; use sps2_events::{AppEvent, BuildDiagnostic, BuildEvent, EventEmitter, LogStream}; use sps2_platform::{PlatformContext, PlatformManager}; use std::collections::HashMap; us...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/security/path_resolver.rs
crates/builder/src/security/path_resolver.rs
//! Path resolution and normalization for security validation use sps2_errors::{BuildError, Error}; use std::collections::{HashMap, HashSet}; use std::path::{Component, Path, PathBuf}; /// Normalize a path by resolving .., ., and symlinks pub fn normalize_path( path: &Path, cache: &HashMap<PathBuf, PathBuf>, ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/security/parser.rs
crates/builder/src/security/parser.rs
//! Command parser integration with security context use super::context::{ CommandEffect, ParsedCommand, PathAccessType, SecurityContext, ValidatedExecution, }; use crate::validation::parser::{tokenize_shell, Token}; use sps2_errors::{BuildError, Error}; use std::path::PathBuf; /// Parse command and determine its...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/security/mod.rs
crates/builder/src/security/mod.rs
//! Build security context and validation //! //! This module provides a comprehensive security framework for tracking and //! validating all file system operations and command executions during builds. mod context; mod parser; mod path_resolver; pub use context::SecurityContext; pub use parser::parse_command_with_co...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/security/context.rs
crates/builder/src/security/context.rs
//! Build security context that tracks execution state use sps2_errors::{BuildError, Error}; use std::collections::HashMap; use std::fmt::Write; use std::path::{Path, PathBuf}; /// Build security context that tracks execution state #[derive(Debug, Clone)] pub struct SecurityContext { /// Current working directory...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/core/builder.rs
crates/builder/src/core/builder.rs
//! High-level build orchestration and workflow management use super::context::BuildContext; use crate::artifact_qa::run_quality_pipeline; use crate::config::BuildConfig; use crate::packaging::create_and_sign_package; use crate::packaging::manifest::create_manifest; use crate::recipe::execute_recipe; use crate::utils:...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/core/api.rs
crates/builder/src/core/api.rs
//! Builder API for Starlark recipes use crate::environment::IsolationLevel; use crate::{BuildCommandResult, BuildEnvironment}; use md5::{Digest, Md5}; use sha2::{Digest as Sha2Digest, Sha256}; use sps2_errors::{BuildError, Error}; use sps2_hash::Hash; use sps2_net::{NetClient, NetConfig}; use sps2_platform::{Platform...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
true
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/core/types.rs
crates/builder/src/core/types.rs
//! Core types for the builder module //! //! This module contains shared types used throughout the builder crate. // Currently empty - will be populated as we refactor and identify common types
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/core/mod.rs
crates/builder/src/core/mod.rs
//! Core module containing main builder API and types pub mod api; pub mod builder; pub mod context; pub mod types;
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/core/context.rs
crates/builder/src/core/context.rs
//! Build context for package building use sps2_events::{EventEmitter, EventSender}; use sps2_types::Version; use std::path::PathBuf; /// Build context for package building #[derive(Clone, Debug)] pub struct BuildContext { /// Package name pub name: String, /// Package version pub version: Version, ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/build_systems/nodejs.rs
crates/builder/src/build_systems/nodejs.rs
//! Node.js build system implementation use super::{BuildSystem, BuildSystemConfig, BuildSystemContext, TestFailure, TestResults}; use async_trait::async_trait; use sps2_errors::{BuildError, Error}; use std::collections::HashMap; use std::path::Path; use tokio::fs; /// Node.js build system supporting npm, yarn, and p...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/build_systems/go.rs
crates/builder/src/build_systems/go.rs
//! Go build system implementation use super::{BuildSystem, BuildSystemConfig, BuildSystemContext, TestFailure, TestResults}; use async_trait::async_trait; use sps2_errors::{BuildError, Error}; use sps2_events::{AppEvent, EventEmitter, GeneralEvent}; use std::collections::HashMap; use std::path::Path; use tokio::fs; ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/build_systems/core.rs
crates/builder/src/build_systems/core.rs
//! Core types and utilities for build systems use crate::BuildEnvironment; use sps2_errors::Error; use std::collections::HashMap; use std::path::PathBuf; use std::sync::{Arc, RwLock}; /// Build system context containing all necessary information for building pub struct BuildSystemContext { /// Build environment ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/build_systems/python.rs
crates/builder/src/build_systems/python.rs
//! Python build system implementation with PEP 517/518 support use super::{BuildSystem, BuildSystemConfig, BuildSystemContext, TestFailure, TestResults}; use async_trait::async_trait; use sps2_errors::{BuildError, Error}; use std::collections::HashMap; use std::path::{Path, PathBuf}; use tokio::fs; /// Python build ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
true
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/build_systems/mod.rs
crates/builder/src/build_systems/mod.rs
//! Build system abstraction and implementations //! //! This module provides a trait-based abstraction for different build systems //! (autotools, cmake, meson, cargo, etc.) with automatic detection and //! sophisticated configuration handling. use async_trait::async_trait; use sps2_errors::Error; use std::collection...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/build_systems/cmake.rs
crates/builder/src/build_systems/cmake.rs
//! `CMake` build system implementation use super::{BuildSystem, BuildSystemConfig, BuildSystemContext, TestFailure, TestResults}; use async_trait::async_trait; use sps2_errors::{BuildError, Error}; use std::collections::HashMap; use std::path::Path; use tokio::fs; /// `CMake` build system pub struct CMakeBuildSystem...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/build_systems/cargo.rs
crates/builder/src/build_systems/cargo.rs
//! Cargo (Rust) build system implementation use super::{BuildSystem, BuildSystemConfig, BuildSystemContext, TestFailure, TestResults}; use async_trait::async_trait; use sps2_errors::{BuildError, Error}; use std::collections::HashMap; use std::path::{Path, PathBuf}; use tokio::fs; /// Cargo build system for Rust proj...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/build_systems/autotools.rs
crates/builder/src/build_systems/autotools.rs
//! GNU Autotools build system implementation use super::{BuildSystem, BuildSystemConfig, BuildSystemContext, TestResults}; use async_trait::async_trait; use sps2_errors::{BuildError, Error}; use std::collections::HashMap; use std::path::Path; use tokio::fs; /// GNU Autotools build system pub struct AutotoolsBuildSys...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/build_systems/meson.rs
crates/builder/src/build_systems/meson.rs
//! Meson build system implementation use super::{BuildSystem, BuildSystemConfig, BuildSystemContext, TestFailure, TestResults}; use async_trait::async_trait; use sps2_errors::{BuildError, Error}; use std::collections::HashMap; use std::path::Path; /// Meson build system pub struct MesonBuildSystem { config: Buil...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/config.rs
crates/errors/src/config.rs
//! Configuration error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; #[derive(Debug, Clone, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[non_exhaustive] pub enum ConfigError { #[error("config file not found: {path}")] NotFound { path:...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/guard.rs
crates/errors/src/guard.rs
//! Guard-specific error types for state verification and healing operations use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; /// Severity levels for guard-related errors and discrepancies. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "serde", derive...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/lib.rs
crates/errors/src/lib.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] #![allow(clippy::module_name_repetitions)] //! Error types for the sps2 package manager //! //! This crate provides fine-grained error types organized by domain. //! All error types implement Clone where possible for easier handling. use s...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/version.rs
crates/errors/src/version.rs
//! Version and constraint parsing error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; #[derive(Debug, Clone, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[non_exhaustive] pub enum VersionError { #[error("invalid version: {input}")] Inv...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/network.rs
crates/errors/src/network.rs
//! Network-related error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; const HINT_CHECK_CONNECTION: &str = "Check your network connection and retry."; const HINT_RETRY_LATER: &str = "Retry the operation; the service may recover shortly."; #[derive(Debug, Clone, Error)] #[cfg_attr(fe...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/platform.rs
crates/errors/src/platform.rs
//! Platform-specific operation errors use std::borrow::Cow; use crate::{BuildError, StorageError, UserFacingError}; use thiserror::Error; /// Errors that can occur during platform-specific operations #[derive(Debug, Clone, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[non_ex...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/state.rs
crates/errors/src/state.rs
//! State management error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; #[derive(Debug, Clone, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[non_exhaustive] pub enum StateError { #[error("invalid state transition from {from} to {to}")] ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/storage.rs
crates/errors/src/storage.rs
//! Storage and filesystem-related error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; #[derive(Debug, Clone, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[non_exhaustive] pub enum StorageError { #[error("disk full: {path}")] DiskFull {...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/install.rs
crates/errors/src/install.rs
//! Installation system error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; const HINT_WAIT_AND_RETRY: &str = "Wait for pending operations to finish, then retry."; const HINT_RETRY_LATER: &str = "Retry the operation; the service may recover shortly."; const HINT_DOWNLOAD_TIMEOUT: &str...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/build.rs
crates/errors/src/build.rs
//! Build system error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; #[derive(Debug, Clone, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[non_exhaustive] pub enum BuildError { #[error("build failed: {message}")] Failed { message: String...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/signing.rs
crates/errors/src/signing.rs
#![deny(clippy::pedantic, unsafe_code)] //! Signing error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; #[derive(Debug, Clone, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[non_exhaustive] pub enum SigningError { #[error("signature verific...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/package.rs
crates/errors/src/package.rs
//! Package-related error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; #[derive(Debug, Clone, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[non_exhaustive] pub enum PackageError { #[error("package not found: {name}")] NotFound { name: ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/errors/src/ops.rs
crates/errors/src/ops.rs
//! Operation orchestration error types use std::borrow::Cow; use crate::UserFacingError; use thiserror::Error; const HINT_PROVIDE_PACKAGE: &str = "Provide at least one package spec (e.g. `sps2 install ripgrep`)."; #[derive(Debug, Clone, Error)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Dese...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/store/src/manifest_io.rs
crates/store/src/manifest_io.rs
#![deny(clippy::pedantic, unsafe_code)] #![allow(clippy::module_name_repetitions)] //! Manifest I/O helpers colocated with the store. use sps2_errors::{Error, PackageError}; use sps2_types::Manifest; use std::path::Path; /// Read `manifest.toml` from a path /// /// # Errors /// Returns an error if reading or parsing...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/store/src/lib.rs
crates/store/src/lib.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] //! Content-addressed storage for sps2 //! //! This crate manages the `/opt/pm/store/` directory where packages //! are stored by their content hash. Each package is immutable and //! can be hard-linked into multiple state directories. mod...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/store/src/archive.rs
crates/store/src/archive.rs
//! Package archive handling (.sp files) //! //! This module provides support for .sp package archives using zstd compression. use async_compression::tokio::bufread::ZstdDecoder as AsyncZstdReader; use sps2_errors::{Error, PackageError, StorageError}; use sps2_events::{AppEvent, EventEmitter, EventSender, GeneralEvent...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/store/src/format_detection.rs
crates/store/src/format_detection.rs
//! Package format version detection and validation for store operations //! //! This module provides fast format version detection without full package parsing, //! enabling compatibility checking and migration support. use sps2_errors::{Error, PackageError, StorageError}; use sps2_types::{PackageFormatChecker, Packa...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/store/src/package.rs
crates/store/src/package.rs
//! Stored package representation and operations use sps2_errors::{Error, PackageError, StorageError}; use sps2_hash::FileHashResult; use sps2_platform::core::PlatformContext; use sps2_platform::PlatformManager; use sps2_types::Manifest; use std::path::{Path, PathBuf}; use tokio::fs; /// A package stored in the conte...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/store/src/file_store.rs
crates/store/src/file_store.rs
//! File-level content-addressed storage operations //! //! This module provides functionality for storing individual files //! by their content hash, enabling deduplication across packages. use sps2_errors::{Error, StorageError}; use sps2_hash::{calculate_file_storage_path, FileHashResult, FileHasher, FileHasherConfi...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/lib.rs
crates/net/src/lib.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] #![allow(clippy::module_name_repetitions)] //! Network operations for sps2 //! //! This crate handles all HTTP operations including package downloads, //! index fetching, and connection pooling with retry logic. mod client; mod download; p...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/client.rs
crates/net/src/client.rs
//! HTTP client with connection pooling and retry logic use futures::StreamExt; use reqwest::{Client, Response, StatusCode}; use sps2_errors::{Error, NetworkError}; use std::time::Duration; /// Download progress information #[derive(Debug, Clone)] pub struct DownloadProgress { pub downloaded: u64, pub total: ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/signing.rs
crates/net/src/signing.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] use base64::{engine::general_purpose, Engine as _}; use minisign::{sign, SecretKeyBox}; use minisign_verify::{PublicKey, Signature}; use serde::{Deserialize, Serialize}; use sps2_errors::{Error, SigningError}; use std::fs; use std::path::Pa...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/download/config.rs
crates/net/src/download/config.rs
//! Configuration structures for package downloads use sps2_hash::Hash; use sps2_types::Version; use std::path::PathBuf; use std::time::Duration; use sps2_config::ResourceManager; use std::sync::Arc; /// Configuration for package downloads #[derive(Clone, Debug)] pub struct PackageDownloadConfig { /// Maximum fi...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/download/stream.rs
crates/net/src/download/stream.rs
//! Low-level streaming download mechanics use super::config::{DownloadResult, StreamParams}; use super::resume::calculate_existing_file_hash; use futures::StreamExt; use sps2_errors::{Error, NetworkError}; use sps2_hash::Hash; use std::path::Path; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; use...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/download/validation.rs
crates/net/src/download/validation.rs
//! URL validation and HTTP response validation for downloads use sps2_errors::{Error, NetworkError}; use url::Url; /// Validate URL and check for supported protocols pub(super) fn validate_url(url: &str) -> Result<String, Error> { let parsed = Url::parse(url).map_err(|e| NetworkError::InvalidUrl(e.to_string()))?...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/download/core.rs
crates/net/src/download/core.rs
//! Main downloader orchestration and `PackageDownloader` implementation use super::config::{ DownloadResult, PackageDownloadConfig, PackageDownloadRequest, PackageDownloadResult, StreamParams, }; use super::resume::get_resume_offset; use super::retry::calculate_backoff_delay; use super::stream::{download_file...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/download/mod.rs
crates/net/src/download/mod.rs
//! Production-ready streaming download infrastructure for .sp files //! //! This module provides high-performance, resumable downloads with concurrent //! signature verification and comprehensive error handling. mod config; mod core; mod resume; mod retry; mod stream; mod validation; // Re-export public types and st...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/download/resume.rs
crates/net/src/download/resume.rs
//! Resumable download logic for package downloads use super::config::PackageDownloadConfig; use sps2_errors::Error; use std::path::Path; use tokio::fs as tokio_fs; use tokio::io::AsyncReadExt; /// Get the offset for resuming a download /// /// This function checks if a partial download exists, is large enough to res...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/net/src/download/retry.rs
crates/net/src/download/retry.rs
//! Retry logic and backoff calculations for downloads use super::config::RetryConfig; use std::time::Duration; /// Calculate exponential backoff delay with jitter /// /// This function implements exponential backoff with proper overflow protection /// and jitter to prevent thundering herd problems. pub(super) fn cal...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/repository/src/lib.rs
crates/repository/src/lib.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] #![allow(clippy::module_name_repetitions)] use base64::Engine as _; use chrono::Utc; use regex::Regex; use sps2_errors::{Error, StorageError}; use sps2_hash::Hash; use sps2_index::{DependencyInfo, Index, VersionEntry}; use std::path::{Path,...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/resolver/src/lib.rs
crates/resolver/src/lib.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] #![allow(clippy::module_name_repetitions)] //! Dependency resolution for sps2 //! //! This crate provides deterministic, parallel dependency resolution //! for both installation and building operations. It implements a //! topological sort ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/resolver/src/resolver.rs
crates/resolver/src/resolver.rs
//! Main dependency resolver implementation use crate::graph::DependencyGraph; use crate::sat::{Clause, DependencyProblem, Literal, PackageVersion}; use crate::{ DepEdge, DepKind, ExecutionPlan, PackageId, ResolutionContext, ResolutionResult, ResolvedNode, }; use semver::Version; use sps2_errors::{Error, PackageEr...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false