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
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/loaders/league.rs
src/database/src/loaders/league.rs
use serde::Deserialize; const STATIC_LEAGUES_JSON: &str = include_str!("../data/leagues.json"); #[derive(Deserialize)] pub struct LeagueEntity { pub id: u32, pub slug: String, pub name: String, pub country_id: u32, pub settings: LeagueSettingsEntity, pub reputation: u16, } #[derive(Deserializ...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
ZOXEXIVO/open-football
https://github.com/ZOXEXIVO/open-football/blob/7b55c8c095942c1df498d7aa02b524af6e3a896c/src/database/src/loaders/continent.rs
src/database/src/loaders/continent.rs
use serde::Deserialize; const STATIC_CONTINENTS_JSON: &str = include_str!("../data/continents.json"); #[derive(Deserialize)] pub struct ContinentEntity { pub id: u32, pub name: String, } pub struct ContinentLoader; impl ContinentLoader { pub fn load() -> Vec<ContinentEntity> { serde_json::from_s...
rust
Apache-2.0
7b55c8c095942c1df498d7aa02b524af6e3a896c
2026-01-04T20:24:06.162327Z
false
etolbakov/excalidocker-rs
https://github.com/etolbakov/excalidocker-rs/blob/1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef/src/color_utils.rs
src/color_utils.rs
use phf::phf_map; /// Taken from https://github.com/bahamas10/css-color-names/blob/master/getcolors.sh pub static COLOR_TO_HEX: phf::Map<&str, &str> = phf_map! { "aliceblue" => "#f0f8ff", "antiquewhite" => "#faebd7", "aqua" => "#00ffff", "aquamarine" => "#7fffd4", "...
rust
MIT
1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef
2026-01-04T20:25:32.074311Z
false
etolbakov/excalidocker-rs
https://github.com/etolbakov/excalidocker-rs/blob/1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef/src/error.rs
src/error.rs
use thiserror::Error; #[derive(Error, Debug)] pub enum ExcalidockerError { #[error( "File '{}' has unsupported extension. File should be 'yaml' or 'yml'", path )] FileIncorrectExtension { path: String }, #[error("Failed to open '{}'. Details: {}", path, msg)] FileNotFound { path: St...
rust
MIT
1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef
2026-01-04T20:25:32.074311Z
false
etolbakov/excalidocker-rs
https://github.com/etolbakov/excalidocker-rs/blob/1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef/src/file_utils.rs
src/file_utils.rs
use std::io::Read; use std::{fs::File, process::exit}; use isahc::ReadResponseExt; use serde_yaml::{Mapping, Value}; use crate::exporters::excalidraw_config::DEFAULT_CONFIG; use crate::{ error::ExcalidockerError::{self, FileIncorrectExtension, FileNotFound, RemoteFileFailedRead}, exporters::excalidraw_config...
rust
MIT
1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef
2026-01-04T20:25:32.074311Z
false
etolbakov/excalidocker-rs
https://github.com/etolbakov/excalidocker-rs/blob/1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef/src/main.rs
src/main.rs
mod color_utils; mod error; mod exporters; mod file_utils; use clap::{arg, command, Parser}; use exporters::excalidraw::elements::{ FONT_SIZE_EXTRA_LARGE, FONT_SIZE_LARGE, FONT_SIZE_MEDIUM, FONT_SIZE_SMALL, }; use exporters::excalidraw_config::{ arrow_bounded_element, binding, BoundElement, DEFAULT_CONFIG_PATH...
rust
MIT
1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef
2026-01-04T20:25:32.074311Z
true
etolbakov/excalidocker-rs
https://github.com/etolbakov/excalidocker-rs/blob/1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef/src/exporters/excalidraw_config.rs
src/exporters/excalidraw_config.rs
use crate::{ color_utils::COLOR_TO_HEX, exporters::excalidraw_config::consts::{ NO_X_ALIGNMENT_FACTOR, NO_X_MARGIN, NO_Y_ALIGNMENT_FACTOR, NO_Y_MARGIN, X_ALIGNMENT_FACTOR, X_MARGIN, Y_ALIGNMENT_FACTOR, Y_MARGIN, }, }; use serde::{Deserialize, Serialize, Serializer}; pub const DEFAULT_CONFIG...
rust
MIT
1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef
2026-01-04T20:25:32.074311Z
false
etolbakov/excalidocker-rs
https://github.com/etolbakov/excalidocker-rs/blob/1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef/src/exporters/excalidraw.rs
src/exporters/excalidraw.rs
use serde::Serialize; use serde_json::{Map, Value}; use super::excalidraw_config::{consts::NON_LOCKED, BoundElement, Roundness}; use crate::exporters::excalidraw_config::{roundness, Binding}; #[derive(Serialize)] #[serde(rename_all = "camelCase")] pub struct ExcalidrawFile { pub r#type: String, pub version: i...
rust
MIT
1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef
2026-01-04T20:25:32.074311Z
false
etolbakov/excalidocker-rs
https://github.com/etolbakov/excalidocker-rs/blob/1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef/src/exporters/mod.rs
src/exporters/mod.rs
pub mod excalidraw; pub mod excalidraw_config;
rust
MIT
1516e3e3bb3edabbfa79b7bacde5488b2dc0a0ef
2026-01-04T20:25:32.074311Z
false
n00kii/egui-video
https://github.com/n00kii/egui-video/blob/68933f42b45220af92221fb82315b03c87e7efce/src/lib.rs
src/lib.rs
#![warn(missing_docs)] #![allow(rustdoc::bare_urls)] #![doc = include_str!("../README.md")] //! # Simple video player example //! ``` #![doc = include_str!("../examples/main.rs")] //! ``` extern crate ffmpeg_the_third as ffmpeg; use anyhow::Result; use atomic::Atomic; use bytemuck::NoUninit; use chrono::{DateTime, Dura...
rust
MIT
68933f42b45220af92221fb82315b03c87e7efce
2026-01-04T20:23:24.044000Z
true
n00kii/egui-video
https://github.com/n00kii/egui-video/blob/68933f42b45220af92221fb82315b03c87e7efce/src/subtitle/ass.rs
src/subtitle/ass.rs
use anyhow::{anyhow, bail, Context, Result}; use egui::{Align2, Color32, Pos2}; use nom::branch::alt; use nom::bytes::complete::{is_not, tag, take_till, take_until, take_while_m_n}; use nom::character::complete::{char, digit0, digit1}; use nom::combinator::{map, map_res, opt, rest}; use nom::error::context; use nom::mu...
rust
MIT
68933f42b45220af92221fb82315b03c87e7efce
2026-01-04T20:23:24.044000Z
false
n00kii/egui-video
https://github.com/n00kii/egui-video/blob/68933f42b45220af92221fb82315b03c87e7efce/src/subtitle/mod.rs
src/subtitle/mod.rs
use anyhow::Result; use egui::{Align2, Color32, Margin, Pos2}; use self::ass::parse_ass_subtitle; mod ass; #[derive(Debug)] pub struct Subtitle { pub text: String, pub fade: FadeEffect, pub alignment: Align2, pub primary_fill: Color32, pub position: Option<Pos2>, pub font_size: f32, pub m...
rust
MIT
68933f42b45220af92221fb82315b03c87e7efce
2026-01-04T20:23:24.044000Z
false
n00kii/egui-video
https://github.com/n00kii/egui-video/blob/68933f42b45220af92221fb82315b03c87e7efce/examples/main.rs
examples/main.rs
use eframe::NativeOptions; use egui::{CentralPanel, DragValue, Grid, Sense, Slider, TextEdit, Window}; use egui_video::{AudioDevice, Player}; fn main() { let _ = eframe::run_native( "app", NativeOptions::default(), Box::new(|_| Ok(Box::new(App::default()))), ); } struct App { audio_d...
rust
MIT
68933f42b45220af92221fb82315b03c87e7efce
2026-01-04T20:23:24.044000Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/relaxed_ik_wrapper.rs
src/relaxed_ik_wrapper.rs
use crate::relaxed_ik::{RelaxedIK, Opt}; use std::sync::{Arc, Mutex}; use nalgebra::{Vector3, Vector6, UnitQuaternion, Quaternion,Translation3, Isometry3}; use std::os::raw::{*}; use std::str; use crate::utils_rust::file_utils::{*}; // http://jakegoulding.com/rust-ffi-omnibus/objects/ #[no_mangle] pub unsafe extern "C...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/lib.rs
src/lib.rs
pub mod utils_rust; pub mod spacetime; pub mod groove; pub mod relaxed_ik; pub mod relaxed_ik_wrapper; pub mod relaxed_ik_web;
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/relaxed_ik.rs
src/relaxed_ik.rs
use crate::groove::vars::RelaxedIKVars; use crate::groove::groove::{OptimizationEngineOpen}; use crate::groove::objective_master::ObjectiveMaster; use crate::utils_rust::file_utils::{*}; use crate::utils_rust::transformations::{*}; use nalgebra::{Vector3, UnitQuaternion, Quaternion}; use std::os::raw::{c_double, c_int}...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/relaxed_ik_web.rs
src/relaxed_ik_web.rs
use crate::groove::vars::{RelaxedIKVars, VarsConstructorData}; use crate::groove::groove::{OptimizationEngineOpen}; use crate::groove::objective_master::ObjectiveMaster; use crate::utils_rust::transformations::{*}; use wasm_bindgen::prelude::*; use js_sys::Array; extern crate serde_json; use web_sys; extern crate cons...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/groove/objective.rs
src/groove/objective.rs
use crate::groove::{vars}; use crate::utils_rust::transformations::{*}; use nalgebra::geometry::{Translation3, UnitQuaternion, Quaternion}; use std::cmp; use crate::groove::vars::RelaxedIKVars; use nalgebra::{Vector3, Isometry3, Point3}; use std::ops::Deref; use time::PreciseTime; use parry3d_f64::{shape, query}; pub ...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/groove/objective_master.rs
src/groove/objective_master.rs
use crate::groove::objective::*; use crate::groove::vars::RelaxedIKVars; pub struct ObjectiveMaster { pub objectives: Vec<Box<dyn ObjectiveTrait + Send>>, pub num_chains: usize, pub weight_priors: Vec<f64>, pub lite: bool, pub finite_diff_grad: bool } impl ObjectiveMaster { pub fn standard_ik(...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/groove/vars.rs
src/groove/vars.rs
use nalgebra::{UnitQuaternion, Vector3, Vector6, Quaternion, Point3}; use crate::spacetime::robot::Robot; use crate::utils_rust::file_utils::{*}; use time::PreciseTime; use std::ops::Deref; use yaml_rust::{YamlLoader, Yaml}; use std::fs::File; use std::io::prelude::*; use wasm_bindgen::prelude::*; use serde::{Serializ...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/groove/groove.rs
src/groove/groove.rs
use crate::groove::gradient::{ForwardFiniteDiff, CentralFiniteDiff, GradientFinder, ForwardFiniteDiffImmutable, CentralFiniteDiffImmutable, GradientFinderImmutable}; use crate::groove::vars::{RelaxedIKVars}; use optimization_engine::{constraints::*, panoc::*, *}; use crate::groove::objective_master::ObjectiveMaster; p...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/groove/mod.rs
src/groove/mod.rs
pub mod objective; pub mod groove; pub mod vars; pub mod gradient; pub mod objective_master; // pub mod env_collision;
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/groove/env_collision.rs
src/groove/env_collision.rs
use crate::utils_rust::yaml_utils::EnvCollisionFileParser; use nalgebra::{Vector3, Isometry3, Point3}; use nalgebra::geometry::{Translation3, UnitQuaternion, Quaternion}; use ncollide3d::pipeline::{*}; use ncollide3d::shape::{*}; use std::collections::BTreeMap; #[derive(Clone, Debug)] pub struct LinkData { pub is_...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/groove/gradient.rs
src/groove/gradient.rs
pub trait GradientFinderImmutable<F> where F: Fn(&[f64]) -> f64 { fn new(dim: usize, f: F) -> Self; fn compute_gradient(&mut self, x: &[f64]); fn compute_and_return_gradient(&mut self, x: &[f64]) -> Vec<f64>; fn compute_gradient_immutable(&self, x: &[f64]) -> Vec<f64>; fn reset(&mut self, x: &[f64]...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/spacetime/arm.rs
src/spacetime/arm.rs
use nalgebra; use nalgebra::{Vector3, Vector6, UnitQuaternion, Unit, Matrix, DMatrix, DVector, ArrayStorage}; use num::clamp; #[derive(Clone, Debug)] pub struct Arm { pub axis_types: Vec<String>, pub displacements: Vec<nalgebra::Vector3<f64>>, pub rot_offset_quats: Vec<nalgebra::UnitQuaternion<f64>>, p...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/spacetime/mod.rs
src/spacetime/mod.rs
pub mod robot; pub mod arm;
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/spacetime/robot.rs
src/spacetime/robot.rs
use crate::spacetime::arm; use nalgebra; use urdf_rs; #[derive(Clone, Debug)] pub struct Robot { pub arms: Vec<arm::Arm>, pub num_chains: usize, pub num_dofs: usize, pub chain_lengths: Vec<usize>, pub lower_joint_limits: Vec<f64>, pub upper_joint_limits: Vec<f64> } impl Robot { pub fn from...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/utils_rust/transformations.rs
src/utils_rust/transformations.rs
use nalgebra::{Vector3, UnitQuaternion, Quaternion, Vector4}; pub fn quaternion_log(q: UnitQuaternion<f64>) -> Vector3<f64> { let mut out_vec: Vector3<f64> = Vector3::new(q.i, q.j, q.k); if q.w.abs() < 1.0 { let a = q.w.acos(); let sina = a.sin(); if sina.abs() >= 0.005 { le...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/utils_rust/file_utils.rs
src/utils_rust/file_utils.rs
use std::env; use std::fs::File; use std::io::prelude::*; use std::fs::read_dir; use path_slash::PathBufExt; pub fn get_path_to_src() -> String { let path = env::current_dir().unwrap(); let s = path.to_slash().unwrap(); let s1 = String::from(s); let path_to_src = s1 + "/"; path_to_src }
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/utils_rust/mod.rs
src/utils_rust/mod.rs
pub mod transformations; pub mod file_utils;
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
uwgraphics/relaxed_ik_core
https://github.com/uwgraphics/relaxed_ik_core/blob/1c48d2ae408b4e024ee037641aac1e728267984e/src/bin/relaxed_ik_bin.rs
src/bin/relaxed_ik_bin.rs
extern crate relaxed_ik_lib; use relaxed_ik_lib::relaxed_ik; use nalgebra::{Vector3, UnitQuaternion, Quaternion}; use std::{io, thread, time}; use crate::relaxed_ik_lib::utils_rust::file_utils::{*}; fn main() { // initilize relaxed ik let path_to_src = get_path_to_src(); let default_path_to_setting = path...
rust
MIT
1c48d2ae408b4e024ee037641aac1e728267984e
2026-01-04T20:21:47.335665Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/lib.rs
src/lib.rs
// Copyright 2018-2024 the Deno authors. MIT license. #![deny(clippy::print_stderr)] #![deny(clippy::print_stdout)] #![deny(clippy::unused_async)] #![deny(clippy::unnecessary_wraps)] pub mod analysis; #[cfg(feature = "swc")] pub mod ast; mod collections; mod graph; mod jsr; mod module_specifier; mod rt; #[cfg(featur...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/analysis.rs
src/analysis.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::collections::HashMap; use std::sync::Arc; use deno_error::JsErrorBox; use deno_media_type::MediaType; use once_cell::sync::Lazy; use regex::Regex; use serde::Deserialize; use serde::Serialize; use crate::ModuleSpecifier; use crate::graph::Position; use c...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/packages.rs
src/packages.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::collections::BTreeMap; use std::collections::BTreeSet; use std::collections::HashMap; use std::collections::HashSet; use deno_semver::StackString; use deno_semver::Version; use deno_semver::VersionReq; use deno_semver::jsr::JsrDepPackageReq; use deno_semv...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/rt.rs
src/rt.rs
// Copyright 2018-2024 the Deno authors. MIT license. use futures::channel::oneshot; use std::future::Future; use std::pin::Pin; use std::task::Context; use std::task::Poll; pub type BoxedFuture = Pin<Box<dyn Future<Output = ()> + 'static>>; /// An executor for futures. /// /// This trait allows deno_graph to run ba...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/collections.rs
src/collections.rs
// Copyright 2018-2024 the Deno authors. MIT license. use indexmap::IndexSet; /// Collection useful for a phased pass where the pending items /// are the same values as the seen items. pub struct SeenPendingCollection<T: std::hash::Hash + Eq + Clone> { inner: IndexSet<T>, next_index: usize, } impl<T: std::hash::...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/module_specifier.rs
src/module_specifier.rs
// Copyright 2018-2024 the Deno authors. MIT license. pub type ModuleSpecifier = url::Url; pub use import_map::specifier::SpecifierError; pub use import_map::specifier::resolve_import; pub fn is_fs_root_specifier(url: &ModuleSpecifier) -> bool { if url.scheme() != "file" { return false; } let path = url.p...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/jsr.rs
src/jsr.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::cell::RefCell; use std::collections::HashMap; use std::sync::Arc; use deno_semver::package::PackageNv; use deno_unsync::future::LocalFutureExt; use deno_unsync::future::SharedLocal; use futures::FutureExt; use crate::Executor; use crate::ModuleSpecifier;...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/graph.rs
src/graph.rs
// Copyright 2018-2024 the Deno authors. MIT license. use crate::ReferrerImports; use crate::analysis::DependencyDescriptor; use crate::analysis::DynamicArgument; use crate::analysis::DynamicDependencyKind; use crate::analysis::DynamicTemplatePart; use crate::analysis::ImportAttributes; use crate::analysis::ModuleAnal...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/source/mod.rs
src/source/mod.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::collections::HashMap; use std::fmt; use std::path::Path; use std::path::PathBuf; use std::sync::Arc; use std::time::SystemTime; use async_trait::async_trait; use deno_error::JsErrorClass; use deno_media_type::MediaType; use deno_media_type::data_url::RawD...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/source/wasm.rs
src/source/wasm.rs
// Copyright 2018-2024 the Deno authors. MIT license. use capacity_builder::StringBuilder; use indexmap::IndexMap; use wasm_dep_analyzer::ValueType; pub fn wasm_module_to_dts( bytes: &[u8], ) -> Result<String, wasm_dep_analyzer::ParseError> { let wasm_deps = wasm_dep_analyzer::WasmDeps::parse( bytes, wasm...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/fast_check/swc_helpers.rs
src/fast_check/swc_helpers.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::ops::ControlFlow; use deno_ast::swc::ast::*; use deno_ast::swc::atoms::Atom; use deno_ast::swc::common::DUMMY_SP; use deno_ast::swc::common::SyntaxContext; pub fn new_ident(name: Atom) -> Ident { Ident { span: DUMMY_SP, ctxt: Default::default()...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/fast_check/transform_dts.rs
src/fast_check/transform_dts.rs
use deno_ast::ModuleSpecifier; use deno_ast::SourceRange; use deno_ast::SourceRangedForSpanned; use deno_ast::SourceTextInfo; use deno_ast::swc::ast::*; use deno_ast::swc::common::DUMMY_SP; use deno_ast::swc::common::SyntaxContext; use super::FastCheckDiagnosticRange; use super::range_finder::ModulePublicRanges; use s...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/fast_check/transform.rs
src/fast_check/transform.rs
// Copyright 2018-2024 the Deno authors. MIT license. // for span methods, which actually make sense to use here in the transforms #![allow(clippy::disallowed_methods)] #![allow(clippy::disallowed_types)] use std::collections::HashSet; use std::sync::Arc; use deno_ast::EmitOptions; use deno_ast::ModuleSpecifier; use...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/fast_check/mod.rs
src/fast_check/mod.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::borrow::Cow; use std::sync::Arc; use crate::ModuleSpecifier; use deno_ast::EmitError; use deno_ast::SourceRange; use deno_ast::SourceTextInfo; use deno_ast::diagnostics::DiagnosticLevel; use deno_ast::diagnostics::DiagnosticLocation; use deno_ast::diagno...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/fast_check/range_finder.rs
src/fast_check/range_finder.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::borrow::Cow; use std::collections::BTreeSet; use std::collections::HashMap; use std::collections::HashSet; use std::collections::VecDeque; use std::sync::Arc; use deno_ast::SourceRange; use deno_ast::SourceRangedForSpanned; use deno_ast::swc::ast::Expr; u...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/fast_check/cache.rs
src/fast_check/cache.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::collections::BTreeSet; use std::sync::Arc; use deno_semver::package::PackageNv; use serde::Deserialize; use serde::Serialize; use crate::ModuleSpecifier; /// Cache key that's a hash of the package name, version, and /// sorted export names. #[derive(Deb...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/symbols/swc_helpers.rs
src/symbols/swc_helpers.rs
// Copyright 2018-2024 the Deno authors. MIT license. use deno_ast::swc::ast::Id; use deno_ast::swc::ast::TsEntityName; use deno_ast::swc::ast::TsQualifiedName; pub fn ts_entity_name_to_parts( entity_name: &TsEntityName, ) -> (Id, Vec<String>) { match entity_name { TsEntityName::TsQualifiedName(qualified_name...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/symbols/analyzer.rs
src/symbols/analyzer.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::Cell; use std::cell::Ref; use std::cell::RefCell; use std::hash::Hash; use deno_ast::MediaType; use deno_ast::ModuleSpecifier; use deno_ast::ParsedSource; use deno_ast::SourceRange; use deno_ast::SourceRangedForSpanned; use den...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/symbols/collections.rs
src/symbols/collections.rs
// Copyright 2018-2024 the Deno authors. MIT license. #![allow(dead_code)] use indexmap::IndexMap; use std::cell::UnsafeCell; use std::collections::HashMap; macro_rules! define_map { ($name:ident, $kind:ident) => { /// A map that supports inserting data while holding references to /// the underlying data a...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/symbols/mod.rs
src/symbols/mod.rs
// Copyright 2018-2024 the Deno authors. MIT license. pub use self::analyzer::EsModuleInfo; pub use self::analyzer::ExpandoPropertyRef; pub use self::analyzer::ExportDeclRef; pub use self::analyzer::FileDep; pub use self::analyzer::FileDepName; pub use self::analyzer::JsonModuleInfo; pub use self::analyzer::ModuleId; ...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/symbols/dep_analyzer.rs
src/symbols/dep_analyzer.rs
// Copyright 2018-2024 the Deno authors. MIT license. use deno_ast::swc::ast::ArrowExpr; use deno_ast::swc::ast::BindingIdent; use deno_ast::swc::ast::BlockStmtOrExpr; use deno_ast::swc::ast::Class; use deno_ast::swc::ast::DefaultDecl; use deno_ast::swc::ast::Expr; use deno_ast::swc::ast::Function; use deno_ast::swc::...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/symbols/cross_module.rs
src/symbols/cross_module.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::collections::HashSet; use std::collections::VecDeque; use deno_ast::SourceRange; use indexmap::IndexMap; use crate::ModuleGraph; use crate::ModuleSpecifier; use super::FileDep; use super::FileDepName; use super::ModuleInfoRef; use super::Symbol; use sup...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/ast/dep.rs
src/ast/dep.rs
use std::collections::HashMap; use deno_ast::MultiThreadedComments; use deno_ast::ProgramRef; use deno_ast::SourcePos; use deno_ast::SourceRange; use deno_ast::SourceRangedForSpanned; use deno_ast::swc::ast; use deno_ast::swc::ast::Callee; use deno_ast::swc::ast::Expr; use deno_ast::swc::ast::ImportPhase; use deno_ast...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/src/ast/mod.rs
src/ast/mod.rs
// Copyright 2018-2024 the Deno authors. MIT license. use crate::analysis::DependencyDescriptor; use crate::analysis::DynamicArgument; use crate::analysis::DynamicDependencyDescriptor; use crate::analysis::DynamicTemplatePart; use crate::analysis::JsDocImportInfo; use crate::analysis::ModuleAnalyzer; use crate::analys...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/tests/ecosystem_test.rs
tests/ecosystem_test.rs
// Copyright 2018-2024 the Deno authors. MIT license. #![allow(clippy::disallowed_methods)] use std::collections::HashSet; use std::io::Write as _; use std::path::PathBuf; use std::sync::Arc; use deno_ast::MediaType; use deno_ast::diagnostics::Diagnostic; use deno_graph::BuildFastCheckTypeGraphOptions; use deno_grap...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/tests/integration_test.rs
tests/integration_test.rs
// Copyright 2018-2024 the Deno authors. MIT license. #![allow(clippy::disallowed_methods)] // todo(dsherret): move the integration-like tests to this file because it // helps ensure we're testing the public API and ensures we export types // out of deno_graph that should be public use std::cell::RefCell; use deno_...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
true
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/tests/specs_test.rs
tests/specs_test.rs
// Copyright 2018-2024 the Deno authors. MIT license. #![allow(clippy::disallowed_methods)] use std::borrow::Cow; use std::cell::OnceCell; use std::collections::BTreeMap; use std::panic::AssertUnwindSafe; use std::collections::HashMap; use std::fmt::Write; use std::path::Path; use std::path::PathBuf; use std::rc::Rc...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/tests/helpers/mod.rs
tests/helpers/mod.rs
// Copyright 2018-2024 the Deno authors. MIT license. use std::borrow::Cow; use std::cell::RefCell; use std::collections::BTreeMap; use std::sync::Arc; use async_trait::async_trait; use deno_ast::ModuleSpecifier; use deno_graph::GraphKind; use deno_graph::ModuleGraph; use deno_graph::NpmLoadError; use deno_graph::Npm...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
denoland/deno_graph
https://github.com/denoland/deno_graph/blob/200a22dbd56b311d490ad00bed57fce34538598e/lib/lib.rs
lib/lib.rs
// Copyright 2018-2024 the Deno authors. MIT license. // remove this after https://github.com/rustwasm/wasm-bindgen/issues/2774 is released #![allow(clippy::unused_unit)] #![deny(clippy::disallowed_methods)] #![deny(clippy::disallowed_types)] #![deny(clippy::unnecessary_wraps)] use deno_error::JsErrorBox; use deno_gr...
rust
MIT
200a22dbd56b311d490ad00bed57fce34538598e
2026-01-04T20:22:02.257944Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/apps/sbs/src/main.rs
apps/sbs/src/main.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] use clap::{Parser, Subcommand}; use sps2_errors::Error; use sps2_repository::keys as repo_keys; use sps2_repository::{LocalStore, Publisher}; use std::path::PathBuf; #[derive(Parser, Debug)] #[command(name = "sbs")] #[command(version = env...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/apps/sps2/src/setup.rs
apps/sps2/src/setup.rs
//! System setup and initialization use crate::error::CliError; use sps2_builder::Builder; use sps2_config::{fixed_paths, Config}; use sps2_index::IndexManager; use sps2_net::NetClient; use sps2_resolver::Resolver; use sps2_state::StateManager; use sps2_store::PackageStore; use std::path::{Path, PathBuf}; use tracing:...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/apps/sps2/src/cli.rs
apps/sps2/src/cli.rs
//! Command line interface definition use clap::{Parser, Subcommand}; use sps2_types::ColorChoice; use std::path::PathBuf; use uuid::Uuid; /// sps2 - Modern package manager for macOS ARM64 #[derive(Parser)] #[command(name = "sps2")] #[command(version = env!("CARGO_PKG_VERSION"))] #[command(about = "Modern package man...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/apps/sps2/src/error.rs
apps/sps2/src/error.rs
//! CLI error handling use std::fmt; use sps2_errors::UserFacingError; /// CLI-specific error type #[derive(Debug)] pub enum CliError { /// Configuration error Config(sps2_errors::ConfigError), /// Operations error Ops(sps2_errors::Error), /// System setup error Setup(String), /// Invali...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/apps/sps2/src/display.rs
apps/sps2/src/display.rs
//! Output rendering and formatting use comfy_table::{presets::UTF8_FULL, Attribute, Cell, Color, ContentArrangement, Table}; use console::{Style, Term}; use sps2_ops::{ BuildReport, HealthCheck, HealthStatus, InstallReport, IssueSeverity, OperationResult, PackageInfo, PackageStatus, SearchResult, StateInfo, }...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/apps/sps2/src/main.rs
apps/sps2/src/main.rs
#![warn(mismatched_lifetime_syntaxes)] //! sps2 - Modern package manager for macOS ARM64 //! //! This is the main CLI application that orchestrates all package management //! operations through the ops crate. mod cli; mod display; mod error; mod events; mod logging; mod setup; use crate::cli::{Cli, Commands, KeysComm...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/apps/sps2/src/events.rs
apps/sps2/src/events.rs
//! Event handling and progress display use crate::logging::log_event_with_tracing; use console::{style, Term}; use sps2_events::{ events::{LifecycleEvent, LifecycleStage, LifecycleUpdateOperation}, AppEvent, EventMessage, EventMeta, ProgressEvent, }; use std::collections::HashMap; use std::time::Duration; //...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
true
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/apps/sps2/src/logging.rs
apps/sps2/src/logging.rs
//! Structured logging integration for events //! //! This module provides structured logging capabilities that integrate with the //! tracing ecosystem, converting domain-specific events into appropriate log //! records with structured fields. use sps2_events::{AppEvent, EventMessage}; use tracing::{debug, error, inf...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
true
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/apps/sls/src/main.rs
apps/sls/src/main.rs
#![warn(mismatched_lifetime_syntaxes)] //! sls - Store List utility for sps2 //! //! A simple ls-like tool to explore the content-addressed store use clap::Parser; use sps2_config::fixed_paths; use sps2_state::create_pool; use sqlx::Acquire; use std::collections::HashMap; use std::io::IsTerminal; 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/state/build.rs
crates/state/build.rs
use std::env; use std::path::PathBuf; fn main() { // Set SQLX_OFFLINE_DIR if not already set if env::var("SQLX_OFFLINE_DIR").is_err() { // Check multiple possible locations let possible_dirs = vec![ PathBuf::from("/opt/pm/.sqlx"), PathBuf::from(".sqlx"), env:...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/src/lib.rs
crates/state/src/lib.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] #![allow( clippy::needless_raw_string_hashes, clippy::cast_possible_truncation, clippy::cast_sign_loss, clippy::cast_possible_wrap, clippy::cast_lossless, clippy::map_unwrap_or, clippy::unused_async, clippy::m...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/src/live_slots.rs
crates/state/src/live_slots.rs
//! Slot management for the live prefix. //! //! Slots provide two alternating directories that back the `/opt/pm/live` //! filesystem tree. Every operation stages into the inactive slot, commits do a //! pair of atomic renames so `/opt/pm/live` always remains a real directory, and //! the inactive slot retains the pre...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/src/manager.rs
crates/state/src/manager.rs
//! State manager implementation use crate::{ live_slots::LiveSlots, models::{Package, PackageRef, State, StoreRef}, queries, }; use sps2_errors::Error; use sps2_events::{AppEvent, CleanupSummary, EventEmitter, EventSender, GeneralEvent, StateEvent}; use sps2_hash::Hash; use sps2_platform::filesystem_helpe...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
true
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/src/file_models.rs
crates/state/src/file_models.rs
//! Database models for file-level content addressable storage use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use sps2_hash::Hash; use sqlx::FromRow; /// A file object in content-addressed storage #[derive(Debug, Clone, FromRow, Serialize, Deserialize)] pub struct FileObject { pub hash: String,...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/src/file_queries_runtime.rs
crates/state/src/file_queries_runtime.rs
//! File-level queries for CAS (schema v2) use crate::file_models::{ DeduplicationResult, FileMTimeTracker, FileMetadata, FileObject, FileReference, PackageFileEntry, }; use sps2_errors::{Error, StateError}; use sps2_hash::Hash; use sqlx::{query, Row, Sqlite, Transaction}; use std::collections::HashMap; /// I...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/src/queries_runtime.rs
crates/state/src/queries_runtime.rs
//! Runtime SQL queries for state operations (schema v2) use crate::models::{Package, State, StoreRef}; use sps2_errors::{Error, StateError}; use sps2_types::StateId; use sqlx::{query, Row, Sqlite, Transaction}; use std::collections::HashMap; use std::convert::TryFrom; /// Get the current active state /// /// # Error...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/src/models.rs
crates/state/src/models.rs
//! Database models for state management use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use sps2_hash::Hash; use sps2_types::{StateId, Version}; use sqlx::FromRow; /// A system state record #[derive(Debug, Clone, FromRow, Serialize, Deserialize)] pub struct State { pub id: String, pub paren...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/src/db/mod.rs
crates/state/src/db/mod.rs
pub mod refcount_deltas;
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/src/db/refcount_deltas.rs
crates/state/src/db/refcount_deltas.rs
use sps2_errors::{Error, StateError}; use sps2_types::StateId; use sqlx::{query, Sqlite, Transaction}; /// Ensure CAS rows exist for archives referenced by the target state. /// /// # Errors /// /// Returns an error if the database operation fails. async fn ensure_archive_cas_rows( tx: &mut Transaction<'_, Sqlite>...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/tests/queries_runtime_v2.rs
crates/state/tests/queries_runtime_v2.rs
use sps2_hash::Hash; use tempfile::TempDir; #[tokio::test] async fn add_and_fetch_package_round_trip() { let temp_dir = TempDir::new().expect("tempdir"); let db_path = temp_dir.path().join("state.sqlite"); let pool = sps2_state::create_pool(&db_path) .await .expect("create pool"); sps2...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/tests/recovery.rs
crates/state/tests/recovery.rs
//! tests/recovery.rs use sps2_state::PackageRef; use sps2_state::StateManager; use sps2_state::TransactionData; use sps2_types::Version; use tempfile::TempDir; use uuid::Uuid; async fn mk_state() -> (TempDir, StateManager) { let td = TempDir::new().expect("tempdir"); let mgr = StateManager::new(td.path()).aw...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/state/tests/migration_smoke.rs
crates/state/tests/migration_smoke.rs
use tempfile::TempDir; #[tokio::test] async fn migrations_apply_and_expose_core_tables() { let temp_dir = TempDir::new().expect("temp dir"); let db_path = temp_dir.path().join("state.sqlite"); let pool = sps2_state::create_pool(&db_path) .await .expect("create pool"); sps2_state::run_m...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/index/src/lib.rs
crates/index/src/lib.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] #![allow(clippy::module_name_repetitions)] //! Package repository index for sps2 //! //! This crate handles the repository index that lists all available //! packages and their versions. The index is cached locally for //! offline use and v...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/index/src/cache.rs
crates/index/src/cache.rs
//! Index caching functionality use crate::models::Index; use sps2_errors::{Error, StorageError}; use std::path::{Path, PathBuf}; use tokio::fs; /// Index cache manager #[derive(Clone, Debug)] pub struct IndexCache { cache_dir: PathBuf, } impl IndexCache { /// Create a new cache manager pub fn new(cache_...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/index/src/models.rs
crates/index/src/models.rs
//! Index data models use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use sps2_errors::{Error, PackageError}; use sps2_types::Arch; use std::collections::HashMap; /// Repository index #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Index { #[serde(flatten)] pub metadata: IndexMeta...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/hash/src/lib.rs
crates/hash/src/lib.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] #![allow(clippy::module_name_repetitions)] //! Dual hashing for sps2: BLAKE3 for downloads, xxHash for local verification //! //! This crate provides hashing functionality for content-addressed storage //! and integrity verification using d...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/hash/src/file_hasher.rs
crates/hash/src/file_hasher.rs
//! File-level hashing operations for content-addressed storage //! //! This module provides functionality for hashing individual files //! during package extraction and installation, supporting parallel //! processing and metadata collection. use crate::Hash; use sps2_errors::{Error, StorageError}; 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/builder/src/config.rs
crates/builder/src/config.rs
#![deny(clippy::pedantic, unsafe_code)] //! Builder configuration integration and utilities //! //! This module provides integration between the builder crate and the unified //! configuration system in `sps2_config`. All configuration types are now //! centralized in the config crate. use sps2_config::builder::{ ...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/lib.rs
crates/builder/src/lib.rs
#![warn(mismatched_lifetime_syntaxes)] #![deny(clippy::pedantic, unsafe_code)] //! Package building for sps2 //! //! This crate handles building packages from YAML recipes with //! isolated environments, dependency management, and packaging. pub mod artifact_qa; mod build_plan; mod build_systems; mod cache; pub mod 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/build_plan.rs
crates/builder/src/build_plan.rs
//! Build plan representation for staged execution use crate::environment::IsolationLevel; use crate::recipe::model::YamlRecipe; use crate::stages::{BuildCommand, PostStep, SourceStep}; use crate::validation; use crate::yaml::RecipeMetadata; use sps2_errors::Error; use sps2_types::RpathStyle; use std::collections::Has...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/cache.rs
crates/builder/src/cache.rs
// Crate-level pedantic settings apply //! Caching and incremental builds system //! //! This module provides build caching, artifact storage, and incremental build tracking //! to speed up repeated builds and avoid unnecessary recompilation. use sps2_errors::Error; use sps2_events::{AppEvent, BuildDiagnostic, BuildE...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/validation/command.rs
crates/builder/src/validation/command.rs
//! Command parsing and validation //! //! This module provides secure command parsing and validation to prevent //! execution of dangerous commands during the build process. use super::rules::{DANGEROUS_PATTERNS, SYSTEM_PATHS}; use sps2_errors::{BuildError, Error}; /// Parsed and validated command #[derive(Debug, Cl...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/validation/parser.rs
crates/builder/src/validation/parser.rs
//! Shell command parser for security validation //! //! This module implements a simplified shell parser that understands //! common shell constructs for security validation purposes. use super::rules::BUILD_VARIABLES; use sps2_errors::{BuildError, Error}; /// Represents a parsed shell token #[derive(Debug, Clone, 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/validation/mod.rs
crates/builder/src/validation/mod.rs
//! Recipe validation layer //! //! This module validates YAML recipe steps before they are converted to //! execution types, ensuring security and correctness. pub mod command; pub mod parser; pub mod rules; use crate::recipe::model::{ParsedStep, PostCommand}; use crate::stages::{BuildCommand, PostStep, SourceStep};...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false
alexykn/sps2
https://github.com/alexykn/sps2/blob/a357a9ae7317314ef1605ce29b66f064bd6eb510/crates/builder/src/validation/rules.rs
crates/builder/src/validation/rules.rs
//! Security rules and patterns for command validation // Note: Command validation is now done via config.toml allowlist. // Only commands explicitly listed in ~/.config/sps2/config.toml are allowed. /// Build-time variables that are safe to use in paths pub const BUILD_VARIABLES: &[&str] = &[ "${DESTDIR}", "...
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/diagnostics.rs
crates/builder/src/artifact_qa/diagnostics.rs
//! Diagnostic reporting for post-validation issues use std::collections::HashMap; use std::fmt::Write; use std::path::{Path, PathBuf}; /// A detailed diagnostic finding from validation #[derive(Debug, Clone)] pub struct ValidationFinding { /// The file where the issue was found pub file_path: 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/artifact_qa/router.rs
crates/builder/src/artifact_qa/router.rs
//! Build system-specific post-validation pipeline routing //! //! This module determines which validation pipeline to use based on the //! build systems detected during the build process. Different build systems //! have different requirements for post-validation to avoid breaking binaries. use super::{PatcherAction,...
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/reports.rs
crates/builder/src/artifact_qa/reports.rs
//! Small helpers for collecting diagnostics from validators / patchers. use std::fmt::Write; use crate::artifact_qa::diagnostics::DiagnosticCollector; #[derive(Default, Debug)] pub struct Report { pub changed_files: Vec<std::path::PathBuf>, pub warnings: Vec<String>, pub errors: Vec<String>, /// Fin...
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/mod.rs
crates/builder/src/artifact_qa/mod.rs
//! Public façade – `workflow.rs` calls only `run_quality_pipeline()`. pub mod diagnostics; pub mod macho_utils; pub mod patchers; pub mod reports; pub mod router; pub mod scanners; pub mod traits; use crate::{utils::events::send_event, BuildContext, BuildEnvironment}; use diagnostics::DiagnosticCollector; use report...
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/macho_utils.rs
crates/builder/src/artifact_qa/macho_utils.rs
//! Shared utilities for working with Mach-O files //! Used by both scanners and patchers to ensure consistent detection use object::FileKind; use std::path::Path; /// Check if a file is a Mach-O binary by parsing its header /// /// Uses the exact same logic as the `MachO` scanner. Returns true if the file /// can be...
rust
BSD-3-Clause
a357a9ae7317314ef1605ce29b66f064bd6eb510
2026-01-04T20:17:02.345249Z
false