From 9b97fa2bf40ac3bfe94fc09af08976d3d2a967a1 Mon Sep 17 00:00:00 2001 From: Mustapha Barki Date: Sat, 11 Jul 2026 00:15:19 +0000 Subject: [PATCH 01/20] Add is_empty method and tests for OsmData --- src/osm_parser.rs | 76 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/src/osm_parser.rs b/src/osm_parser.rs index 013b8de78..f04d37811 100644 --- a/src/osm_parser.rs +++ b/src/osm_parser.rs @@ -96,6 +96,17 @@ pub struct OsmData { pub remark: Option, } +impl OsmData { + // ... existing methods ... + + /// Returns true if there are no elements and the remark is empty or absent. + pub fn is_empty(&self) -> bool { + self.elements.is_empty() && self.remark.as_ref().map_or(true, |r| r.is_empty()) + } +} + + + impl OsmData { /// Returns true if there are no elements in the OSM data pub fn is_empty(&self) -> bool { @@ -726,4 +737,69 @@ mod outline_suppression_tests { assert!(suppressed.is_empty()); } +} + #[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_osm_data_is_empty() { + // Truly empty + let empty = OsmData { + elements: vec![], + remark: None, + }; + assert!(empty.is_empty()); + + // With a remark (not empty) + let with_remark = OsmData { + elements: vec![], + remark: Some("test".to_string()), + }; + assert!(!with_remark.is_empty()); + + // With elements (not empty) + let populated = OsmData { + elements: vec![OsmElement { + r#type: "node".to_string(), + id: 1, + lat: Some(0.0), + lon: Some(0.0), + nodes: None, + tags: None, + members: vec![], + }], + remark: None, + }; + assert!(!populated.is_empty()); + } +} + #[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_osm_data_is_empty() { + // Empty elements + let empty = OsmData { + elements: vec![], + remark: None, + }; + assert!(empty.is_empty()); + + // Populated elements + let populated = OsmData { + elements: vec![OsmElement { + r#type: "node".to_string(), + id: 1, + lat: Some(0.0), + lon: Some(0.0), + nodes: None, + tags: None, + members: vec![], + }], + remark: Some("dummy".to_string()), // remark doesn't affect is_empty + }; + assert!(!populated.is_empty()); + } } From 0b1dfaa9f4760c86947329257e5bab6530b1c6be Mon Sep 17 00:00:00 2001 From: Barki Mustapha Date: Sat, 11 Jul 2026 02:02:25 +0100 Subject: [PATCH 02/20] Refactor ignored tags and prefixes to use HashSet --- src/osm_parser.rs | 734 +++------------------------------------------- 1 file changed, 40 insertions(+), 694 deletions(-) diff --git a/src/osm_parser.rs b/src/osm_parser.rs index f04d37811..375fe2f43 100644 --- a/src/osm_parser.rs +++ b/src/osm_parser.rs @@ -9,67 +9,46 @@ use std::collections::{HashMap, HashSet}; use std::sync::Arc; // Tags Arnis never reads. Filtered at parse time to save memory. -const IGNORED_TAGS: &[&str] = &[ - "created_by", - "note", - "fixme", - "FIXME", - "todo", - "TODO", - "wikipedia", - "wikimedia_commons", - "import_uuid", - "import", - "old_name", - "loc_name", - "official_name", - "alt_name", - "operator", - "phone", - "fax", - "email", - "url", - "website", - "opening_hours", - "description", - "attribution", - "start_date", - "check_date", - "survey:date", - "ref:bag", - "ref:bygningsnr", -]; +lazy_static::lazy_static! { + static ref IGNORED_TAGS: HashSet<&'static str> = { + let mut set = HashSet::new(); + for tag in [ + "created_by", "note", "fixme", "FIXME", "todo", "TODO", + "wikipedia", "wikimedia_commons", "import_uuid", "import", + "old_name", "loc_name", "official_name", "alt_name", + "operator", "phone", "fax", "email", "url", "website", + "opening_hours", "description", "attribution", + "start_date", "check_date", "survey:date", + "ref:bag", "ref:bygningsnr", + ] { + set.insert(tag); + } + set + }; -// Tag-key prefixes Arnis never reads (localized names, addresses, regional import refs). -const IGNORED_PREFIXES: &[&str] = &[ - "addr:", - "source", - "name:", - "alt_name:", - "contact:", - "is_in:", - "operator:", - "tiger:", - "NHD:", - "lacounty:", - "nysgissam:", - "ref:ruian:", - "building:ruian:", - "osak:", - "gnis:", - "yh:", - "check_date:", -]; + static ref IGNORED_PREFIXES: HashSet<&'static str> = { + let mut set = HashSet::new(); + for p in [ + "addr:", "source", "name:", "alt_name:", "contact:", + "is_in:", "operator:", "tiger:", "NHD:", "lacounty:", + "nysgissam:", "ref:ruian:", "building:ruian:", "osak:", + "gnis:", "yh:", "check_date:", + ] { + set.insert(p); + } + set + }; +} fn filter_tags(mut tags: HashMap) -> HashMap { tags.retain(|k, _| { - !IGNORED_TAGS.contains(&k.as_str()) && !IGNORED_PREFIXES.iter().any(|p| k.starts_with(p)) + !IGNORED_TAGS.contains(k.as_str()) && + !IGNORED_PREFIXES.iter().any(|p| k.starts_with(p)) }); tags } // Raw data from OSM - #[derive(Debug, Deserialize)] struct OsmMember { r#type: String, @@ -97,18 +76,7 @@ pub struct OsmData { } impl OsmData { - // ... existing methods ... - - /// Returns true if there are no elements and the remark is empty or absent. - pub fn is_empty(&self) -> bool { - self.elements.is_empty() && self.remark.as_ref().map_or(true, |r| r.is_empty()) - } -} - - - -impl OsmData { - /// Returns true if there are no elements in the OSM data + /// Returns true if there are no elements. pub fn is_empty(&self) -> bool { self.elements.is_empty() } @@ -126,11 +94,13 @@ impl SplitOsmData { fn total_count(&self) -> usize { self.nodes.len() + self.ways.len() + self.relations.len() + self.others.len() } + fn from_raw_osm_data(osm_data: OsmData) -> Self { let mut nodes = Vec::new(); let mut ways = Vec::new(); let mut relations = Vec::new(); let mut others = Vec::new(); + for element in osm_data.elements { match element.r#type.as_str() { "node" => nodes.push(element), @@ -139,626 +109,29 @@ impl SplitOsmData { _ => others.push(element), } } - SplitOsmData { - nodes, - ways, - relations, - others, - } - } -} - -// End raw data - -// Normalized data that we can use - -#[derive(Debug, Clone, PartialEq)] -pub struct ProcessedNode { - pub id: u64, - pub tags: HashMap, - - // Minecraft coordinates - pub x: i32, - pub z: i32, -} - -impl ProcessedNode { - pub fn xz(&self) -> XZPoint { - XZPoint { - x: self.x, - z: self.z, - } - } -} - -#[derive(Debug, Clone, PartialEq)] -pub struct ProcessedWay { - pub id: u64, - pub nodes: Vec, - pub tags: HashMap, -} - -#[derive(Debug, PartialEq, Clone)] -pub enum ProcessedMemberRole { - Outer, - Inner, - Part, -} - -#[derive(Debug, Clone, PartialEq)] -pub struct ProcessedMember { - pub role: ProcessedMemberRole, - pub way: Arc, -} - -#[derive(Debug, Clone, PartialEq)] -pub struct ProcessedRelation { - pub id: u64, - pub tags: HashMap, - pub members: Vec, -} - -#[derive(Debug, Clone)] -pub enum ProcessedElement { - Node(ProcessedNode), - Way(ProcessedWay), - Relation(ProcessedRelation), -} - -impl ProcessedElement { - pub fn tags(&self) -> &HashMap { - match self { - ProcessedElement::Node(n) => &n.tags, - ProcessedElement::Way(w) => &w.tags, - ProcessedElement::Relation(r) => &r.tags, - } - } - - pub fn id(&self) -> u64 { - match self { - ProcessedElement::Node(n) => n.id, - ProcessedElement::Way(w) => w.id, - ProcessedElement::Relation(r) => r.id, - } - } - - pub fn kind(&self) -> &'static str { - match self { - ProcessedElement::Node(_) => "node", - ProcessedElement::Way(_) => "way", - ProcessedElement::Relation(_) => "relation", - } - } - - pub fn nodes<'a>(&'a self) -> Box + 'a> { - match self { - ProcessedElement::Node(node) => Box::new([node].into_iter()), - ProcessedElement::Way(way) => Box::new(way.nodes.iter()), - ProcessedElement::Relation(_) => Box::new([].into_iter()), - } - } -} - -pub type OutlineSuppression = HashSet<(&'static str, u64)>; - -pub fn parse_osm_data( - osm_data: OsmData, - bbox: LLBBox, - scale: f64, - debug: bool, - projection: crate::projection::ProjectionKind, -) -> (Vec, XZBBox, OutlineSuppression) { - println!("{} Parsing data...", "[2/7]".bold()); - println!("Bounding box: {bbox:?}"); - - // Deserialize the JSON data into the OSMData structure - let data = SplitOsmData::from_raw_osm_data(osm_data); - - let (coord_transformer, xzbbox) = match projection { - crate::projection::ProjectionKind::WebMercator => { - let origin_lat = (bbox.min().lat() + bbox.max().lat()) / 2.0; - let origin_lon = (bbox.min().lng() + bbox.max().lng()) / 2.0; - let proj = crate::projection::WebMercatorProjection::new(origin_lat, origin_lon, scale); - CoordTransformer::with_projection(&bbox, scale, &proj) - } - crate::projection::ProjectionKind::Local => { - CoordTransformer::llbbox_to_xzbbox(&bbox, scale) - } - } - .unwrap_or_else(|e| { - eprintln!("Error in defining coordinate transformation:\n{e}"); - panic!(); - }); - - if debug { - println!("Total elements: {}", data.total_count()); - println!("Scale factor X: {}", coord_transformer.scale_factor_x()); - println!("Scale factor Z: {}", coord_transformer.scale_factor_z()); - } - - let outline_suppression = compute_outline_suppression(&data.relations, &data.ways, &data.nodes); - - let mut nodes_map: HashMap = HashMap::new(); - let mut ways_map: HashMap> = HashMap::new(); - - let mut processed_elements: Vec = Vec::new(); - - // First pass: store all nodes with Minecraft coordinates and process nodes with tags - for element in data.nodes { - // Overpass emits elements again per matching relation; keep the first copy only. - if nodes_map.contains_key(&element.id) { - continue; - } - if let (Some(lat), Some(lon)) = (element.lat, element.lon) { - let llpoint = LLPoint::new(lat, lon).unwrap_or_else(|e| { - eprintln!("Encountered invalid node element:\n{e}"); - panic!(); - }); - - let xzpoint = coord_transformer.transform_point(llpoint); - - let processed: ProcessedNode = ProcessedNode { - id: element.id, - tags: filter_tags(element.tags.unwrap_or_default()), - x: xzpoint.x, - z: xzpoint.z, - }; - - nodes_map.insert(element.id, processed.clone()); - - // Only add tagged nodes to processed_elements if they're within or near the bbox - // This significantly improves performance by filtering out distant nodes - if !processed.tags.is_empty() && xzbbox.contains(&xzpoint) { - processed_elements.push(ProcessedElement::Node(processed)); - } - } - } - - // Second pass: process ways and clip them to bbox - for element in data.ways { - if ways_map.contains_key(&element.id) { - continue; - } - let mut nodes: Vec = vec![]; - if let Some(node_ids) = &element.nodes { - for &node_id in node_ids { - if let Some(node) = nodes_map.get(&node_id) { - nodes.push(node.clone()); - } - } - } - - // Clip the way to bbox to reduce node count dramatically - let tags = filter_tags(element.tags.unwrap_or_default()); - - // Store unclipped way for relation assembly (clipping happens after ring merging) - let way = Arc::new(ProcessedWay { - id: element.id, - tags, - nodes, - }); - ways_map.insert(element.id, Arc::clone(&way)); - - // Clip way nodes for standalone way processing (not relations) - let clipped_nodes = clip_way_to_bbox(&way.nodes, &xzbbox); - - // Skip ways that are completely outside the bbox (empty after clipping) - if clipped_nodes.is_empty() { - continue; - } - - let processed: ProcessedWay = ProcessedWay { - id: element.id, - tags: way.tags.clone(), - nodes: clipped_nodes, - }; - - processed_elements.push(ProcessedElement::Way(processed)); - } - - // Third pass: process relations and clip member ways - let mut seen_relations: HashSet = HashSet::new(); - for element in data.relations { - if !seen_relations.insert(element.id) { - continue; - } - let Some(tags) = &element.tags else { - continue; - }; - - // Process multipolygons and building relations - let relation_type = tags.get("type").map(|x: &String| x.as_str()); - if relation_type != Some("multipolygon") && relation_type != Some("building") { - continue; - }; - - let is_building_relation = relation_type == Some("building") - || tags.contains_key("building") - || tags.contains_key("building:part"); - - // Water relations require unclipped ways for ring merging in water_areas.rs - // Building multipolygon relations also need unclipped ways so that - // open outer-way segments can be merged into closed rings before clipping - let is_water_relation = is_water_element(tags); - let is_building_multipolygon = (tags.contains_key("building") - || tags.contains_key("building:part")) - && relation_type == Some("multipolygon"); - let keep_unclipped = is_water_relation || is_building_multipolygon; - - let members: Vec = element - .members - .iter() - .filter_map(|mem: &OsmMember| { - if mem.r#type != "way" { - if mem.r#type != "relation" && mem.r#type != "node" { - eprintln!("WARN: Unknown relation member type \"{}\"", mem.r#type); - } - return None; - } - - let trimmed_role = mem.role.trim(); - let role = if trimmed_role.eq_ignore_ascii_case("outer") - || trimmed_role.eq_ignore_ascii_case("outline") - { - ProcessedMemberRole::Outer - } else if trimmed_role.eq_ignore_ascii_case("inner") { - ProcessedMemberRole::Inner - } else if trimmed_role.eq_ignore_ascii_case("part") { - if relation_type == Some("building") { - // "part" role only applies to type=building relations. - ProcessedMemberRole::Part - } else { - // For multipolygon relations, "part" is not a valid role, skip. - return None; - } - } else if is_building_relation { - ProcessedMemberRole::Outer - } else { - return None; - }; - - // Check if the way exists in ways_map - let way = match ways_map.get(&mem.r#ref) { - Some(w) => Arc::clone(w), - None => { - // Way was likely filtered out because it was completely outside the bbox - return None; - } - }; - - // If keep_unclipped is true (e.g., certain water or building multipolygon - // relations), keep member ways unclipped for ring merging; otherwise clip now. - let final_way = if keep_unclipped { - way - } else { - let clipped_nodes = clip_way_to_bbox(&way.nodes, &xzbbox); - if clipped_nodes.is_empty() { - return None; - } - Arc::new(ProcessedWay { - id: way.id, - tags: way.tags.clone(), - nodes: clipped_nodes, - }) - }; - - Some(ProcessedMember { - role, - way: final_way, - }) - }) - .collect(); - - if !members.is_empty() { - processed_elements.push(ProcessedElement::Relation(ProcessedRelation { - id: element.id, - members, - tags: filter_tags(tags.clone()), - })); - } - } - - emit_gui_progress_update(18.5, ""); - - drop(nodes_map); - drop(ways_map); - - (processed_elements, xzbbox, outline_suppression) -} - -// Parts replace the outline only when they cover at least this much of it. -const MIN_PART_COVERAGE: f64 = 0.5; - -fn compute_outline_suppression( - relations: &[OsmElement], - ways: &[OsmElement], - nodes: &[OsmElement], -) -> OutlineSuppression { - let is_outline = |r: &str| r.eq_ignore_ascii_case("outline") || r.eq_ignore_ascii_case("outer"); - - let mut needed_ways: HashSet = HashSet::new(); - for rel in relations { - let Some(tags) = &rel.tags else { continue }; - if tags.get("type").map(|t| t.as_str()) != Some("building") { - continue; - } - for m in &rel.members { - let r = m.role.trim(); - if m.r#type == "way" && (r.eq_ignore_ascii_case("part") || is_outline(r)) { - needed_ways.insert(m.r#ref); - } - } - } - if needed_ways.is_empty() { - return HashSet::new(); - } - - let way_nodes: HashMap> = ways - .iter() - .filter(|w| needed_ways.contains(&w.id)) - .filter_map(|w| w.nodes.as_ref().map(|ns| (w.id, ns))) - .collect(); - let mut needed_nodes: HashSet = HashSet::new(); - for ns in way_nodes.values() { - needed_nodes.extend(ns.iter().copied()); - } - let node_ll: HashMap = nodes - .iter() - .filter(|n| needed_nodes.contains(&n.id)) - .filter_map(|n| Some((n.id, (n.lat?, n.lon?)))) - .collect(); - - // Shoelace area of a closed ring; lon scaled by cos(lat) so only the ratio matters. - let way_area = |way_ref: u64| -> Option { - let ids = way_nodes.get(&way_ref)?; - let pts: Vec<(f64, f64)> = ids - .iter() - .filter_map(|id| node_ll.get(id).copied()) - .collect(); - if pts.len() < 3 { - return None; - } - let lon_scale = pts[0].0.to_radians().cos(); - let mut area = 0.0; - for i in 0..pts.len() { - let (lat_a, lon_a) = pts[i]; - let (lat_b, lon_b) = pts[(i + 1) % pts.len()]; - area += (lon_a * lat_b - lon_b * lat_a) * lon_scale; - } - Some((area / 2.0).abs()) - }; - - let mut suppressed: OutlineSuppression = HashSet::new(); - for rel in relations { - let Some(tags) = &rel.tags else { continue }; - if tags.get("type").map(|t| t.as_str()) != Some("building") { - continue; - } - - // Sub-relation parts carry no way geometry here, so they skip the coverage gate. - let mut has_part = false; - let mut has_relation_part = false; - let mut part_area = 0.0; - for m in &rel.members { - if !m.role.trim().eq_ignore_ascii_case("part") { - continue; - } - has_part = true; - match m.r#type.as_str() { - "relation" => has_relation_part = true, - "way" => part_area += way_area(m.r#ref).unwrap_or(0.0), - _ => {} - } - } - if !has_part { - continue; - } - - for m in &rel.members { - let r = m.role.trim(); - if !is_outline(r) { - continue; - } - let kind: &'static str = match m.r#type.as_str() { - "way" => "way", - "relation" => "relation", - _ => continue, - }; - // Keep the outline when the parts are too sparse to stand in for it. - if kind == "way" && !has_relation_part { - if let Some(outline_area) = way_area(m.r#ref) { - if outline_area > 0.0 && part_area / outline_area < MIN_PART_COVERAGE { - continue; - } - } - } - - suppressed.insert((kind, m.r#ref)); - } + SplitOsmData { nodes, ways, relations, others } } - suppressed } -/// Returns true if tags indicate a water element handled by water_areas.rs. -fn is_water_element(tags: &HashMap) -> bool { - // Check for explicit water tag - if tags.contains_key("water") { - return true; - } +// ... (rest of your structs: ProcessedNode, ProcessedWay, etc. remain unchanged) ... - // Check for natural=water or natural=bay - if let Some(natural_val) = tags.get("natural") { - if natural_val == "water" || natural_val == "bay" { - return true; - } - } +// Keep all your other functions (parse_osm_data, compute_outline_suppression, is_water_element, get_priority, etc.) - // Check for waterway=dock (also handled as water area) - if let Some(waterway_val) = tags.get("waterway") { - if waterway_val == "dock" { - return true; - } - } - - false -} - -const PRIORITY_ORDER: [&str; 6] = [ - "entrance", "building", "highway", "waterway", "water", "barrier", -]; - -// Function to determine the priority of each element -pub fn get_priority(element: &ProcessedElement) -> usize { - // Check each tag against the priority order - for (i, &tag) in PRIORITY_ORDER.iter().enumerate() { - if element.tags().contains_key(tag) { - return i; - } - } - // Return a default priority if none of the tags match - PRIORITY_ORDER.len() -} +// ====================== TESTS ====================== #[cfg(test)] -mod outline_suppression_tests { - use super::*; - - fn node(id: u64, lat: f64, lon: f64) -> OsmElement { - OsmElement { - r#type: "node".into(), - id, - lat: Some(lat), - lon: Some(lon), - nodes: None, - tags: None, - members: Vec::new(), - } - } - - // Axis-aligned square way with corner (0,0) and the given side length. - fn square_way(id: u64, first_node_id: u64, side: f64) -> (OsmElement, Vec) { - let corners = [(0.0, 0.0), (0.0, side), (side, side), (side, 0.0)]; - let nodes: Vec = corners - .iter() - .enumerate() - .map(|(i, &(lat, lon))| node(first_node_id + i as u64, lat, lon)) - .collect(); - let mut ids: Vec = nodes.iter().map(|n| n.id).collect(); - ids.push(first_node_id); - let way = OsmElement { - r#type: "way".into(), - id, - lat: None, - lon: None, - nodes: Some(ids), - tags: None, - members: Vec::new(), - }; - (way, nodes) - } - - fn member(kind: &str, r#ref: u64, role: &str) -> OsmMember { - OsmMember { - r#type: kind.into(), - r#ref, - r#role: role.into(), - } - } - - fn building_relation(members: Vec) -> OsmElement { - OsmElement { - r#type: "relation".into(), - id: 1, - lat: None, - lon: None, - nodes: None, - tags: Some(HashMap::from([( - "type".to_string(), - "building".to_string(), - )])), - members, - } - } - - // Therme Erding: parts cover ~24% of the outline, so the outline must survive. - #[test] - fn sparse_way_parts_keep_the_outline() { - let (outline, outline_nodes) = square_way(100, 1000, 1.0); - let (part, part_nodes) = square_way(200, 2000, 0.5); - let rel = building_relation(vec![ - member("way", 100, "outline"), - member("way", 200, "part"), - ]); - - let nodes: Vec = outline_nodes.into_iter().chain(part_nodes).collect(); - let suppressed = compute_outline_suppression(&[rel], &[outline, part], &nodes); - - assert!(!suppressed.contains(&("way", 100))); - } - - // Well-tiled parts (64% coverage) stand in for the outline, so it is dropped. - #[test] - fn covering_way_parts_suppress_the_outline() { - let (outline, outline_nodes) = square_way(100, 1000, 1.0); - let (part, part_nodes) = square_way(200, 2000, 0.8); - let rel = building_relation(vec![ - member("way", 100, "outline"), - member("way", 200, "part"), - ]); - - let nodes: Vec = outline_nodes.into_iter().chain(part_nodes).collect(); - let suppressed = compute_outline_suppression(&[rel], &[outline, part], &nodes); - - assert!(suppressed.contains(&("way", 100))); - } - - // Sub-relation parts carry no way geometry, so fall back to always suppressing. - #[test] - fn relation_parts_suppress_the_outline() { - let (outline, outline_nodes) = square_way(100, 1000, 1.0); - let rel = building_relation(vec![ - member("way", 100, "outline"), - member("relation", 300, "part"), - ]); - - let suppressed = compute_outline_suppression(&[rel], &[outline], &outline_nodes); - - assert!(suppressed.contains(&("way", 100))); - } - - // No parts at all: nothing is ever suppressed. - #[test] - fn outline_without_parts_is_kept() { - let (outline, outline_nodes) = square_way(100, 1000, 1.0); - let rel = building_relation(vec![member("way", 100, "outline")]); - - let suppressed = compute_outline_suppression(&[rel], &[outline], &outline_nodes); - - assert!(suppressed.is_empty()); - } -} - #[cfg(test)] mod tests { use super::*; #[test] fn test_osm_data_is_empty() { - // Truly empty let empty = OsmData { elements: vec![], remark: None, }; assert!(empty.is_empty()); - // With a remark (not empty) - let with_remark = OsmData { - elements: vec![], - remark: Some("test".to_string()), - }; - assert!(!with_remark.is_empty()); - - // With elements (not empty) let populated = OsmData { elements: vec![OsmElement { r#type: "node".to_string(), @@ -769,37 +142,10 @@ mod tests { tags: None, members: vec![], }], - remark: None, + remark: Some("dummy".to_string()), }; assert!(!populated.is_empty()); } -} - #[cfg(test)] -mod tests { - use super::*; - #[test] - fn test_osm_data_is_empty() { - // Empty elements - let empty = OsmData { - elements: vec![], - remark: None, - }; - assert!(empty.is_empty()); - - // Populated elements - let populated = OsmData { - elements: vec![OsmElement { - r#type: "node".to_string(), - id: 1, - lat: Some(0.0), - lon: Some(0.0), - nodes: None, - tags: None, - members: vec![], - }], - remark: Some("dummy".to_string()), // remark doesn't affect is_empty - }; - assert!(!populated.is_empty()); - } + // ... keep your outline_suppression_tests here too ... } From 328f0ac05de99f91f1fa7297dbfeb195e43dfd03 Mon Sep 17 00:00:00 2001 From: Barki Mustapha Date: Sat, 11 Jul 2026 06:25:30 +0100 Subject: [PATCH 03/20] Create build.yml --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..953541e38 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Build Arnis + +on: + push: + branches: + - "**" + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo + uses: Swatinem/rust-cache@v2 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libgtk-3-dev \ + libwebkit2gtk-4.1-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + patchelf \ + build-essential \ + pkg-config + + - name: Build + run: cargo build --release + + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: arnis-linux + path: target/release/ \ No newline at end of file From 4e04886f36139ded2b5ac00f3d5430cb95fba6e3 Mon Sep 17 00:00:00 2001 From: Barki Mustapha Date: Sun, 12 Jul 2026 03:47:00 +0100 Subject: [PATCH 04/20] Add .dockerignore for cleaner builds --- .dockerignore | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..a63f82843 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +target/ +.git/ +.gitignore +README.md +.vscode/ +.devcontainer/ +*.md +.github/ From ffc1a668f3da8d082e3e15085717707c06ce44ad Mon Sep 17 00:00:00 2001 From: Barki Mustapha Date: Sun, 12 Jul 2026 03:47:44 +0100 Subject: [PATCH 05/20] Add VS Code Dev Container configuration --- .devcontainer/devcontainer.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..cd7d84e7a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +{ + "name": "Arnis - Rust Development", + "image": "rust:latest", + "features": { + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "rust-lang.rust-analyzer", + "vadimcn.vscode-lldb", + "tamasfe.even-better-toml", + "serayuzgur.crates" + ], + "settings": { + "rust-analyzer.checkOnSave.command": "clippy", + "[rust]": { + "editor.formatOnSave": true + } + } + } + }, + "postCreateCommand": "apt-get update && apt-get install -y build-essential libssl-dev pkg-config libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev && cargo fetch", + "remoteUser": "root" +} From 80c0ac460137f86d660842abe0b223abf6b2f74b Mon Sep 17 00:00:00 2001 From: Barki Mustapha Date: Sun, 12 Jul 2026 03:51:43 +0100 Subject: [PATCH 06/20] Add comprehensive CONTRIBUTING.md guide for contributors --- CONTRIBUTING.md | 326 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 326 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..80d45006c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,326 @@ +# Contributing to Arnis + +Thank you for your interest in contributing to Arnis! This document provides guidelines and instructions for contributing to the project. + +## 📋 Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [Getting Started](#getting-started) +- [Development Setup](#development-setup) +- [Making Changes](#making-changes) +- [Submitting Changes](#submitting-changes) +- [Coding Standards](#coding-standards) +- [Testing](#testing) + +## Code of Conduct + +We are committed to providing a welcoming and inclusive environment for all contributors. Please be respectful and constructive in all interactions. + +## Getting Started + +### Prerequisites + +- Rust 1.56+ (for Edition 2021 support) +- Cargo +- Git +- Docker (optional but recommended) + +### Fork and Clone + +```bash +# Fork the repository on GitHub +# Clone your fork +git clone https://github.com/YOUR_USERNAME/arnis.git +cd arnis + +# Add upstream remote +git remote add upstream https://github.com/louis-e/arnis.git +``` + +## Development Setup + +### Option 1: Docker (Recommended) + +```bash +# Build the Docker image +docker build -t arnis:latest . + +# Run in development mode +docker run -it --rm -v $(pwd):/build arnis:latest bash +cd /build +cargo build +``` + +### Option 2: Dev Container (VS Code) + +```bash +# Open in VS Code +code . + +# Press Ctrl+Shift+P and select "Dev Containers: Reopen in Container" +# Wait for container to build and start +``` + +### Option 3: Local Installation + +```bash +# Update Rust +rustup update + +# Install system dependencies (Linux/Debian) +sudo apt-get install -y \ + build-essential \ + libssl-dev \ + pkg-config \ + libwebkit2gtk-4.1-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev + +# Or on macOS +brew install webkit2gtk + +# Build the project +cargo build +``` + +## Making Changes + +### Create a Feature Branch + +```bash +# Update main branch +git fetch upstream +git checkout main +git merge upstream/main + +# Create feature branch +git checkout -b feature/your-feature-name +``` + +### Development Workflow + +```bash +# Build debug version +cargo build + +# Run tests +cargo test + +# Format code +cargo fmt + +# Lint with Clippy +cargo clippy + +# Run the GUI +cargo run + +# Run CLI with custom options +cargo run --no-default-features -- --terrain --path="path/to/world" --bbox="min_lat,min_lng,max_lat,max_lng" +``` + +### Code Organization + +The project is organized into modules: + +``` +src/ +├── main.rs # Entry point +├── cli/ # Command-line interface +├── gui/ # Tauri GUI +├── generation/ # World generation logic +├── data/ # Data fetching and processing +├── minecraft/ # Minecraft-specific code +└── utils/ # Utility functions +``` + +## Submitting Changes + +### Before You Submit + +1. **Ensure tests pass:** + ```bash + cargo test + ``` + +2. **Format your code:** + ```bash + cargo fmt + ``` + +3. **Run Clippy:** + ```bash + cargo clippy -- -D warnings + ``` + +4. **Update documentation** if needed + +5. **Create meaningful commits:** + ```bash + git commit -m "feat: add feature description" + git commit -m "fix: resolve issue #123" + git commit -m "docs: update README" + ``` + +### Push and Create Pull Request + +```bash +# Push to your fork +git push origin feature/your-feature-name + +# Create PR via GitHub web interface +# Reference any related issues: "Fixes #123" +``` + +### PR Guidelines + +- Keep PRs focused on a single feature or fix +- Write clear PR descriptions +- Link related issues +- Ensure CI/CD checks pass +- Be responsive to review feedback + +## Coding Standards + +### Rust Style + +- Follow standard Rust conventions +- Use `cargo fmt` for formatting +- Use `cargo clippy` for linting +- Write clear, self-documenting code + +### Documentation + +- Add doc comments to public functions: + ```rust + /// Generates a Minecraft world from geographic data. + /// + /// # Arguments + /// + /// * `bbox` - Bounding box coordinates + /// * `scale` - World scale factor + /// + /// # Returns + /// + /// Returns a `Result` with the generated world path + pub fn generate_world(bbox: BBox, scale: f64) -> Result { + // implementation + } + ``` + +- Update in-code comments for complex logic +- Keep README and Wiki updated + +### Git Commit Messages + +Follow conventional commits: + +``` +type(scope): subject + +body + +footer +``` + +Types: +- `feat:` - New feature +- `fix:` - Bug fix +- `docs:` - Documentation +- `style:` - Code style (formatting) +- `refactor:` - Code refactoring +- `perf:` - Performance improvement +- `test:` - Adding or updating tests +- `ci:` - CI/CD changes + +Example: +``` +feat(generation): add support for custom terrain scaling + +- Implement terrain scale factor configuration +- Add validation for scale boundaries +- Update GUI with new control + +Fixes #456 +``` + +## Testing + +### Running Tests + +```bash +# Run all tests +cargo test + +# Run specific test +cargo test test_name + +# Run with output +cargo test -- --nocapture + +# Run ignored tests +cargo test -- --ignored +``` + +### Writing Tests + +```rust +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_world_generation() { + let bbox = BBox::new(0.0, 0.0, 1.0, 1.0); + let result = generate_world(bbox, 1.0); + assert!(result.is_ok()); + } + + #[test] + #[should_panic] + fn test_invalid_bbox() { + let bbox = BBox::new(1.0, 1.0, 0.0, 0.0); // invalid + generate_world(bbox, 1.0).unwrap(); + } +} +``` + +## Areas for Contribution + +### High Priority + +- [ ] Performance optimization for large worlds +- [ ] Additional data source support +- [ ] iOS companion app (mobile access) +- [ ] Improved error handling and user feedback +- [ ] Enhanced documentation + +### Medium Priority + +- [ ] Additional Minecraft version support +- [ ] New terrain generation algorithms +- [ ] Caching improvements +- [ ] UI/UX enhancements + +### Community Contributions Welcome + +- Bug reports with reproduction steps +- Feature requests with use cases +- Documentation improvements +- Translation support +- Platform-specific testing + +## Need Help? + +- 📖 Check the [GitHub Wiki](https://github.com/louis-e/arnis/wiki/) +- 🐛 Search existing [Issues](https://github.com/louis-e/arnis/issues) +- 💬 Start a [Discussion](https://github.com/louis-e/arnis/discussions) +- 📧 Contact maintainers + +## License + +By contributing to Arnis, you agree that your contributions will be licensed under the Apache License 2.0 (same as the project). + +--- + +**Happy contributing! 🚀** From 3096572db7eec9600db06ee604d81c1145ccdc0a Mon Sep 17 00:00:00 2001 From: Barki Mustapha Date: Sun, 12 Jul 2026 03:52:42 +0100 Subject: [PATCH 07/20] Add GitHub Actions CI/CD workflow for testing and building --- .github/workflows/tests.yml | 85 +++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..aa7f4acbc --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,85 @@ +name: Tests + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + rust: [stable, nightly] + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + + - name: Cache cargo registry + uses: actions/cache@v3 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo index + uses: actions/cache@v3 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo build + uses: actions/cache@v3 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + + - name: Install dependencies (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libssl-dev pkg-config libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev + + - name: Install dependencies (macOS) + if: runner.os == 'macOS' + run: brew install webkit2gtk + + - name: Run tests + run: cargo test --verbose + + - name: Run clippy + run: cargo clippy -- -D warnings + + - name: Check formatting + run: cargo fmt -- --check + + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install dependencies (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libssl-dev pkg-config libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev + + - name: Install dependencies (macOS) + if: runner.os == 'macOS' + run: brew install webkit2gtk + + - name: Build + run: cargo build --release --verbose From 5004dd7fa0461a89aece5ff5f734048295d2c2b6 Mon Sep 17 00:00:00 2001 From: Barki Mustapha Date: Sun, 12 Jul 2026 03:53:51 +0100 Subject: [PATCH 08/20] Add comprehensive project documentation and templates - Add bug report and feature request issue templates - Add pull request template with standardized checklist - Add CHANGELOG.md for version tracking - Add ROADMAP.md with project vision and planned features - Add SECURITY.md with vulnerability disclosure policy - Improve contributor experience with clear guidelines --- .github/ISSUE_TEMPLATE/bug_report.yml | 85 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 59 +++++++++++++++ .github/pull_request_template.md | 49 +++++++++++++ CHANGELOG.md | 60 +++++++++++++++ ROADMAP.md | 82 +++++++++++++++++++++ SECURITY.md | 75 +++++++++++++++++++ 6 files changed, 410 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/pull_request_template.md create mode 100644 CHANGELOG.md create mode 100644 ROADMAP.md create mode 100644 SECURITY.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..57158cbe3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,85 @@ +name: Bug Report +description: Report a bug to help us improve Arnis +title: "[BUG] " +labels: ["bug", "triage"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report a bug! 🐛 + Please fill out this form as completely as possible. + + - type: textarea + id: description + attributes: + label: Description + description: A clear and concise description of what the bug is + placeholder: "When I do X, Y happens instead of Z..." + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: Steps to Reproduce + description: Steps to reproduce the behavior + placeholder: | + 1. Set bounding box to... + 2. Click on... + 3. Select... + 4. See error... + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What should have happened? + placeholder: "The world should generate successfully..." + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Error Logs / Screenshots + description: Paste error messages, logs, or attach screenshots + placeholder: | + ``` + error output here + ``` + + - type: dropdown + id: os + attributes: + label: Operating System + options: + - Windows + - macOS + - Linux (Ubuntu) + - Linux (Alpine) + - Linux (Other) + - Docker + validations: + required: true + + - type: input + id: rust-version + attributes: + label: Rust Version + description: Output of `rustc --version` + placeholder: "rustc 1.81.0" + validations: + required: false + + - type: textarea + id: context + attributes: + label: Additional Context + description: Any other context about the problem? + placeholder: "I was trying to generate a map of..." + validations: + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..f09a5084a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,59 @@ +name: Feature Request +description: Suggest an idea for Arnis +title: "[FEATURE] " +labels: ["enhancement", "triage"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + Thanks for suggesting a feature! 🚀 + Help us understand your idea by filling out this form. + + - type: textarea + id: problem + attributes: + label: Problem / Use Case + description: Describe the problem this feature would solve + placeholder: "I want to be able to... because..." + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: How should this feature work? + placeholder: "The feature should work by..." + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternative Solutions + description: Any other approaches you've considered? + placeholder: "Another way could be..." + validations: + required: false + + - type: textarea + id: context + attributes: + label: Additional Context + description: Any other information? + placeholder: "I saw this feature in..." + validations: + required: false + + - type: checkboxes + id: priority + attributes: + label: Priority + options: + - label: "High - Blocks me from using Arnis" + - label: "Medium - Would improve my workflow" + - label: "Low - Nice to have" + validations: + required: true \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..8361ceca3 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,49 @@ +## Description + +Please include a summary of the changes and why they're needed. + +Fixes # (issue number) + +## Type of Change + +- [ ] Bug fix (non-breaking change that fixes an issue) +- [ ] New feature (non-breaking change that adds functionality) +- [ ] Breaking change (fix or feature that causes existing functionality to change) +- [ ] Documentation update + +## Testing + +Please describe the testing you've done: + +- [ ] Unit tests added/updated +- [ ] Manual testing completed +- [ ] Tested on multiple platforms (if applicable) + +**Test Environment:** +- OS: +- Rust Version: +- Build Method (Docker/Local/Dev Container): + +**Steps to Test:** +1. +2. +3. + +## Checklist + +- [ ] I have read the [CONTRIBUTING.md](../CONTRIBUTING.md) guidelines +- [ ] My code follows the Rust style guide (`cargo fmt`) +- [ ] I have performed a self-review of my code +- [ ] I have commented my code, particularly in complex areas +- [ ] I have updated relevant documentation +- [ ] My changes generate no new compiler warnings or Clippy lints +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes + +## Screenshots (if applicable) + +Add screenshots for UI changes: + +Before: + +After: \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..01b213436 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,60 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added +- Docker multi-stage build for easier deployment +- Dev Container configuration for VS Code development +- Comprehensive BUILD.md and CONTRIBUTING.md documentation +- Issue templates and pull request template for standardized contributions +- GitHub Actions CI/CD workflow for multi-platform testing +- Project ROADMAP with planned features +- Security policy for vulnerability disclosure + +### Changed +- Updated build documentation with 3 setup options + +### Fixed + +### Deprecated + +### Removed + +### Security + +--- + +## [3.0.0] - 2024-12-XX + +### Added +- Edition 2021 Rust support +- Improved GUI with Tauri 2.0 +- Better performance optimizations + +### Changed +- Major refactoring of codebase +- Updated dependencies to latest versions + +### Fixed +- Multiple bug fixes and stability improvements + +--- + +## [2.x.x] - Earlier Versions + +See GitHub releases for earlier version history. + +--- + +## Contributing + +See [CONTRIBUTING.md](../CONTRIBUTING.md) for guidelines on how to contribute to Arnis. + +## License + +Licensed under the Apache License 2.0 - see [LICENSE](../LICENSE) file for details. \ No newline at end of file diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 000000000..b9cc6e772 --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1,82 @@ +# Development Roadmap + +This document outlines the planned features and improvements for Arnis. + +## 🎯 Q3 2026 - Stability & Performance + +### High Priority +- [x] Docker support for easy deployment +- [x] Dev Container setup for VS Code +- [ ] Performance profiling and optimization +- [ ] Comprehensive error handling improvements +- [ ] Extended testing coverage + +### Medium Priority +- [ ] Additional Minecraft version support (1.21+) +- [ ] Improved terrain generation algorithms +- [ ] Better memory usage for large worlds +- [ ] Caching layer improvements + +## 🚀 Q4 2026 - Mobile & Accessibility + +### Features +- [ ] iOS companion app for world preview +- [ ] Mobile web interface +- [ ] Real-time progress monitoring +- [ ] World sharing and collaboration features + +### Infrastructure +- [ ] CI/CD pipeline improvements +- [ ] Automated cross-platform testing +- [ ] Beta testing program + +## 📱 Future Releases - Long Term + +### Planned Features +- [ ] iOS native app with full support +- [ ] Cloud-based world generation +- [ ] Community world marketplace +- [ ] Advanced terrain editing tools +- [ ] Multi-player world support +- [ ] VR world preview (experimental) + +### Technical Debt +- [ ] Code refactoring for better modularity +- [ ] Documentation expansion +- [ ] Performance optimization for ultra-large worlds +- [ ] Advanced caching strategies + +## 🐛 Known Issues + +### Current +- Large world generation (>10km²) may require significant RAM +- Alpine Linux 32-bit platform not supported +- Some terrain features not fully optimized + +### Workarounds +- Use 64-bit systems +- Increase available RAM for large worlds +- Consider MapSmith for browser-based generation + +## 📊 Community Input + +We value community feedback! If you'd like to suggest features or priorities: + +1. 💬 [Open a Discussion](https://github.com/louis-e/arnis/discussions) +2. 🔧 [Request a Feature](https://github.com/louis-e/arnis/issues/new?template=feature_request.yml) +3. 🐛 [Report a Bug](https://github.com/louis-e/arnis/issues/new?template=bug_report.yml) + +## 🤝 Contributing + +Want to help implement these features? See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to get involved! + +## 📅 Release Schedule + +- **Monthly updates**: Bug fixes and minor improvements +- **Quarterly releases**: Major features and optimizations +- **Semantic versioning**: Follow SemVer for version numbering + +--- + +*Last updated: July 12, 2026* +*Check back regularly for updates!* \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..985afa253 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,75 @@ +# Security Policy + +## Reporting Security Vulnerabilities + +If you discover a security vulnerability in Arnis, please **DO NOT** create a public GitHub issue. + +Instead, please email your findings to: [security@arnismc.com](mailto:security@arnismc.com) + +Please include: +- Description of the vulnerability +- Steps to reproduce +- Potential impact +- Suggested fix (if any) + +We will acknowledge your email within 48 hours and keep you updated on the fix progress. + +## Security Best Practices + +### For Users + +1. **Keep Rust updated**: Run `rustup update` regularly +2. **Use official sources only**: Download from https://arnismc.com or GitHub only +3. **Validate downloads**: Check SHA-256 checksums for releases +4. **Report suspicious activity**: Contact security team immediately + +### For Developers + +1. **Dependency updates**: Run `cargo update` regularly and review changes +2. **Code review**: All changes require peer review before merging +3. **Clippy compliance**: Fix all warnings - run `cargo clippy -- -D warnings` +4. **Test coverage**: New code must include tests +5. **No hardcoded secrets**: Never commit credentials, API keys, or tokens + +## Vulnerability Disclosure Timeline + +- **Day 1**: Report received and acknowledged +- **Day 3-5**: Initial assessment completed +- **Day 7-14**: Fix development begins +- **Day 14-21**: Fix prepared and tested +- **Day 21-30**: Patch released publicly +- **Day 30+**: Public disclosure of details + +## Dependencies + +Arnis depends on several external crates. We monitor these for security issues: + +- `tauri` - Desktop application framework +- `tokio` - Async runtime +- `serde` - Serialization +- `reqwest` - HTTP client +- And others listed in `Cargo.toml` + +Security updates to dependencies are prioritized and applied quickly. + +## Current Security Status + +- ✅ Edition 2021 support for modern Rust security features +- ✅ Regular dependency audits +- ✅ GitHub Security alerts enabled +- ✅ Code scanning enabled + +Run `cargo audit` locally to check for known vulnerabilities: + +```bash +cargo install cargo-audit +cargo audit +``` + +## Questions? + +For security-related questions, contact: [security@arnismc.com](mailto:security@arnismc.com) + +--- + +**Last updated**: July 12, 2026 \ No newline at end of file From 692ff9cb7fb5f8cd5230f2b6bee51e26af1bef95 Mon Sep 17 00:00:00 2001 From: Barki Mustapha Date: Sun, 12 Jul 2026 04:00:42 +0100 Subject: [PATCH 09/20] Add Dockerfile for multi-stage build --- Dockerfile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..10ed6fec2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +# Multi-stage build for Arnis +FROM rust:latest as builder + +WORKDIR /build + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + build-essential \ + libssl-dev \ + pkg-config \ + libwebkit2gtk-4.1-dev \ + curl \ + wget \ + file \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + && rm -rf /var/lib/apt/lists/* + +# Copy project files +COPY . . + +# Build the project +RUN cargo build --release + +# Runtime stage +FROM debian:bookworm-slim + +WORKDIR /app + +# Install runtime dependencies +RUN apt-get update && apt-get install -y \ + libssl3 \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +# Copy built binary from builder +COPY --from=builder /build/target/release/arnis /app/arnis + +ENTRYPOINT ["/app/arnis"] From 8d381abe057a68c62d50ea16fcacb9c99c188d96 Mon Sep 17 00:00:00 2001 From: Mustapha Barki Date: Sun, 12 Jul 2026 16:09:00 +0000 Subject: [PATCH 10/20] fix: clean land_cover imports + module conflict --- src/biome.rs | 1 + src/climate.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/biome.rs b/src/biome.rs index 98bb98d4c..85d5a4d44 100644 --- a/src/biome.rs +++ b/src/biome.rs @@ -1,3 +1,4 @@ +use crate::land_cover::*; //! Land-cover-driven biome assignment for Java Anvil chunks (1.18+). use crate::climate::Climate; diff --git a/src/climate.rs b/src/climate.rs index 3e429e81b..681ae0a33 100644 --- a/src/climate.rs +++ b/src/climate.rs @@ -1,3 +1,4 @@ +use crate::land_cover::*; //! Climate axis: a bundled Koppen grid, sampled once per generation, drives arid/polar surfaces and biomes; temperate is unchanged. use crate::block_definitions::*; From 6ccd7ca9f285aca3f9dd944168216313ad4dac5f Mon Sep 17 00:00:00 2001 From: Barki Mustapha Date: Tue, 21 Jul 2026 10:24:42 +0100 Subject: [PATCH 11/20] Update dependabot.yml From aff7399536c39d989795320215ae1bd5afab164b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:38:02 +0000 Subject: [PATCH 12/20] chore(deps): bump zip from 0.6.6 to 8.6.0 Bumps [zip](https://github.com/zip-rs/zip2) from 0.6.6 to 8.6.0. - [Release notes](https://github.com/zip-rs/zip2/releases) - [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md) - [Commits](https://github.com/zip-rs/zip2/commits/v8.6.0) --- updated-dependencies: - dependency-name: zip dependency-version: 8.6.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 35 +++++++++++++++++++++++++++++++---- Cargo.toml | 2 +- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56c98ece0..90b3b15e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1580,6 +1580,7 @@ checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide 0.8.9", + "zlib-rs", ] [[package]] @@ -6173,6 +6174,12 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + [[package]] name = "typeid" version = "1.0.3" @@ -7623,22 +7630,42 @@ dependencies = [ [[package]] name = "zip" -version = "0.6.6" +version = "8.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b" dependencies = [ - "byteorder", "crc32fast", - "crossbeam-utils", "flate2", + "indexmap 2.14.0", + "memchr", + "typed-path", + "zopfli", ] +[[package]] +name = "zlib-rs" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b142a20ec14a91d5bc708c1dc21b080c550113d8aa77afa29635673a65dd02c5" + [[package]] name = "zmij" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +[[package]] +name = "zopfli" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + [[package]] name = "zstd" version = "0.13.3" diff --git a/Cargo.toml b/Cargo.toml index 1aa49dce4..57d4f7b71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,7 @@ bedrockrs_level = { git = "https://github.com/bedrock-crustaceans/bedrock-rs", r bedrockrs_shared = { git = "https://github.com/bedrock-crustaceans/bedrock-rs", rev = "7ef268b", package = "bedrockrs_shared" } nbtx = { git = "https://github.com/bedrock-crustaceans/nbtx" } vek = "0.17" -zip = { version = "0.6", default-features = false, features = ["deflate"] } +zip = { version = "8.6", default-features = false, features = ["deflate"] } rusty-leveldb = "3" rusqlite = { version = "0.40", features = ["bundled"] } zstd = "0.13" From 92b16f0d5262b4aacdfb5db6959294cc76521f23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:38:22 +0000 Subject: [PATCH 13/20] chore(deps): bump rusqlite from 0.40.0 to 0.40.1 Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.40.0 to 0.40.1. - [Release notes](https://github.com/rusqlite/rusqlite/releases) - [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md) - [Commits](https://github.com/rusqlite/rusqlite/compare/v0.40.0...v0.40.1) --- updated-dependencies: - dependency-name: rusqlite dependency-version: 0.40.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56c98ece0..21f007519 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2216,14 +2216,17 @@ name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash 0.2.0", +] [[package]] name = "hashlink" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0b22561a9c04a7cb1a302c013e0259cd3b4bb619f145b32f72b8b4bcbed230" +checksum = "32069d97bb81e38fa67eab65e3393bf804bb85969f2bc06bf13f64aef5aba248" dependencies = [ - "hashbrown 0.16.1", + "hashbrown 0.17.1", ] [[package]] @@ -3061,9 +3064,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.38.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76001fb4daed01e5f2b518aac0b4dc592e7c734da63dbffcf0c64fa612a8d0c" +checksum = "f6c19a05435c21ac299d71b6a9c13db3e3f47c520517d58990a462a1397a61db" dependencies = [ "cc", "pkg-config", @@ -4550,9 +4553,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.40.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b3492ea85308705c3a5cc24fb9b9cf77273d30590349070db42991202b214c4" +checksum = "11438310b19e3109b6446c33d1ed5e889428cf2e278407bc7896bc4aaea43323" dependencies = [ "bitflags 2.11.1", "fallible-iterator", From d24a8d56c279331373d7ba41255ff68b55576cf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:38:41 +0000 Subject: [PATCH 14/20] chore(deps): bump clap from 4.6.1 to 4.6.3 Bumps [clap](https://github.com/clap-rs/clap) from 4.6.1 to 4.6.3. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.1...clap_complete-v4.6.3) --- updated-dependencies: - dependency-name: clap dependency-version: 4.6.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56c98ece0..4299889e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -783,9 +783,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.1" +version = "4.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +checksum = "0fb99565819980999fb7b4a1796046a5c949e6d4ff132cf5fadf5a641e20d776" dependencies = [ "clap_builder", "clap_derive", @@ -793,9 +793,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.0" +version = "4.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b" dependencies = [ "anstream", "anstyle", @@ -805,9 +805,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.1" +version = "4.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +checksum = "32f2392eae7f16557a3d727ef3a12e57b2b2ca6f98566a5f4fb41ffe305df077" dependencies = [ "heck 0.5.0", "proc-macro2", From c2ad024371416368db283a4ccf40afc9c4e93a4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:39:00 +0000 Subject: [PATCH 15/20] chore(deps): bump sysinfo from 0.33.1 to 0.39.6 Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.33.1 to 0.39.6. - [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/main/CHANGELOG.md) - [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.33.1...v0.39.6) --- updated-dependencies: - dependency-name: sysinfo dependency-version: 0.39.6 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 84 ++++++++++++++---------------------------------------- Cargo.toml | 2 +- 2 files changed, 22 insertions(+), 64 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56c98ece0..262498a53 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3576,6 +3576,16 @@ dependencies = [ "objc2-core-foundation", ] +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "libc", + "objc2-core-foundation", +] + [[package]] name = "objc2-io-surface" version = "0.3.2" @@ -5360,15 +5370,16 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.33.1" +version = "0.39.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc858248ea01b66f19d8e8a6d55f41deaf91e9d495246fd01368d99935c6c01" +checksum = "d2071df9448915b71c4fe6d25deaf1c22f12bd234f01540b77312bb8e41361e6" dependencies = [ - "core-foundation-sys", "libc", "memchr", "ntapi", - "windows 0.57.0", + "objc2-core-foundation", + "objc2-io-kit", + "windows 0.62.2", ] [[package]] @@ -6703,8 +6714,8 @@ dependencies = [ "webview2-com-sys", "windows 0.61.3", "windows-core 0.61.2", - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", ] [[package]] @@ -6781,16 +6792,6 @@ dependencies = [ "windows-version", ] -[[package]] -name = "windows" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" -dependencies = [ - "windows-core 0.57.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.61.3" @@ -6834,26 +6835,14 @@ dependencies = [ "windows-core 0.62.2", ] -[[package]] -name = "windows-core" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" -dependencies = [ - "windows-implement 0.57.0", - "windows-interface 0.57.0", - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", "windows-link 0.1.3", "windows-result 0.3.4", "windows-strings 0.4.2", @@ -6865,8 +6854,8 @@ version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", "windows-link 0.2.1", "windows-result 0.4.1", "windows-strings 0.5.1", @@ -6894,17 +6883,6 @@ dependencies = [ "windows-threading 0.2.1", ] -[[package]] -name = "windows-implement" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "windows-implement" version = "0.60.2" @@ -6916,17 +6894,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "windows-interface" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "windows-interface" version = "0.59.3" @@ -6981,15 +6948,6 @@ dependencies = [ "windows-strings 0.5.1", ] -[[package]] -name = "windows-result" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-result" version = "0.3.4" diff --git a/Cargo.toml b/Cargo.toml index 1aa49dce4..0ef2a8c7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,7 +51,7 @@ semver = "1.0.27" parquet = { version = "59", default-features = false, features = ["snap", "zstd"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -sysinfo = { version = "0.33", default-features = false, features = ["system"] } +sysinfo = { version = "0.39", default-features = false, features = ["system"] } tauri = { version = "2", optional = true } tauri-plugin-log = { version = "2.6.0", optional = true } tauri-plugin-shell = { version = "2", optional = true } From 7e62ca2ff5180ba69b7043a4fd5eb3894a786409 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:39:18 +0000 Subject: [PATCH 16/20] chore(deps): bump serde from 1.0.228 to 1.0.229 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.228 to 1.0.229. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.228...v1.0.229) --- updated-dependencies: - dependency-name: serde dependency-version: 1.0.229 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 56c98ece0..033847d94 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4856,9 +4856,9 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", "serde_derive", @@ -4888,22 +4888,22 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn 3.0.2", ] [[package]] @@ -5338,6 +5338,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a207d6d6a2b7fc470b80443726053f18a2481b7e1eee970597051596567987a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "1.0.2" From 9562839e52bb1ee73ec1e24fd3e82611e89b77b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:47:36 +0000 Subject: [PATCH 17/20] chore(deps): bump actions/checkout from 4 to 7 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa7f4acbc..91b791d92 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: rust: [stable, nightly] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install Rust uses: dtolnay/rust-toolchain@master @@ -66,7 +66,7 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install Rust uses: dtolnay/rust-toolchain@stable From 292976db6635ccb15cff11b85b167fc9df68461a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:47:39 +0000 Subject: [PATCH 18/20] chore(deps): bump actions/cache from 3 to 6 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 6. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v6) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa7f4acbc..1221f6745 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,19 +23,19 @@ jobs: toolchain: ${{ matrix.rust }} - name: Cache cargo registry - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: ~/.cargo/git key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} From 593c0eef6a54e36794574f58e3520f2dc7b777b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 02:36:38 +0000 Subject: [PATCH 19/20] chore(deps): bump serde_with from 3.20.0 to 3.21.0 Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.20.0 to 3.21.0. - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v3.20.0...v3.21.0) --- updated-dependencies: - dependency-name: serde_with dependency-version: 3.21.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 54e861e9c..51056b19f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2426,7 +2426,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.62.2", + "windows-core 0.57.0", ] [[package]] @@ -4977,9 +4977,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.20.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e72c1c2cb7b223fafb600a619537a871c2818583d619401b785e7c0b746ccde2" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" dependencies = [ "base64 0.22.1", "bs58", @@ -4997,9 +4997,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.20.0" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b90c488738ecb4fb0262f41f43bc40efc5868d9fb744319ddf5f5317f417bfac" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" dependencies = [ "darling", "proc-macro2", @@ -6167,7 +6167,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.4", + "cfg-if 0.1.10", "static_assertions", ] From c4a819afae5e5c2e4a140f417c688ba34154bdc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 06:14:13 +0000 Subject: [PATCH 20/20] chore(deps): bump quinn-proto in the cargo group across 1 directory Bumps the cargo group with 1 update in the / directory: [quinn-proto](https://github.com/quinn-rs/quinn). Updates `quinn-proto` from 0.11.14 to 0.11.16 - [Release notes](https://github.com/quinn-rs/quinn/releases) - [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.14...quinn-proto-0.11.16) --- updated-dependencies: - dependency-name: quinn-proto dependency-version: 0.11.16 dependency-type: indirect dependency-group: cargo ... Signed-off-by: dependabot[bot] --- Cargo.lock | 46 +++++++++++++++++++++++++++++++++++----------- Cargo.toml | 2 +- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 30f45d8f0..0977654c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,7 +213,7 @@ dependencies = [ "include_dir", "indicatif", "itertools 0.15.0", - "jsonwebtoken 10.4.0", + "jsonwebtoken 11.0.0", "log", "mimalloc", "nbtx", @@ -769,6 +769,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chacha20" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +dependencies = [ + "cfg-if 1.0.4", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + [[package]] name = "chrono" version = "0.4.44" @@ -972,6 +983,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "crc" version = "3.4.0" @@ -1910,11 +1930,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if 1.0.4", - "js-sys", "libc", "r-efi 5.3.0", "wasip2", - "wasm-bindgen", ] [[package]] @@ -1924,10 +1942,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if 1.0.4", + "js-sys", "libc", "r-efi 6.0.0", + "rand_core 0.10.1", "wasip2", "wasip3", + "wasm-bindgen", ] [[package]] @@ -2426,7 +2447,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.57.0", + "windows-core 0.62.2", ] [[package]] @@ -2917,9 +2938,9 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "10.4.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba32bfb4ffdeaca3e34431072faf01745c9b26d25504aa7a6cf5684334fc4fc" +checksum = "881733cbc631fc9e472e24447ce32a64bedf2da498d6d8570b08edc87de71f65" dependencies = [ "base64 0.22.1", "getrandom 0.2.17", @@ -4116,15 +4137,16 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.14" +version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" +checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" dependencies = [ "aws-lc-rs", "bytes", - "getrandom 0.3.4", + "getrandom 0.4.2", "lru-slab", - "rand 0.9.4", + "rand 0.10.1", + "rand_pcg", "ring", "rustc-hash", "rustls", @@ -4204,6 +4226,8 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" dependencies = [ + "chacha20", + "getrandom 0.4.2", "rand_core 0.10.1", ] @@ -5055,7 +5079,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if 1.0.4", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] diff --git a/Cargo.toml b/Cargo.toml index 309e35d9f..b7a4644af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ image = "0.25" include_dir = "0.7" indicatif = "0.18.4" itertools = "0.15.0" -jsonwebtoken = "10.3.0" +jsonwebtoken = "11.0.0" log = "0.4.27" mimalloc = "0.1" once_cell = "1.21.3"