Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
0

Configure Feed

Select the types of activity you want to include in your feed.

rename links => microcosm-links for publishing

+40 -33
+1 -1
.github/workflows/checks.yml
··· 31 31 run: | 32 32 cargo fmt \ 33 33 --package constellation \ 34 - --package links \ 34 + --package microcosm-links \ 35 35 --package pocket \ 36 36 --package quasar \ 37 37 --package slingshot \
+12 -12
Cargo.lock
··· 956 956 "flume", 957 957 "fs4 0.12.0", 958 958 "headers-accept", 959 - "links", 960 959 "mediatype", 961 960 "metrics", 962 961 "metrics-exporter-prometheus 0.18.3", 963 962 "metrics-process", 964 963 "metrics-util", 964 + "microcosm-links", 965 965 "num-format", 966 966 "ratelimit", 967 967 "rocksdb", ··· 2957 2957 ] 2958 2958 2959 2959 [[package]] 2960 - name = "links" 2961 - version = "0.1.0" 2962 - dependencies = [ 2963 - "fluent-uri", 2964 - "thiserror 2.0.18", 2965 - "tinyjson", 2966 - ] 2967 - 2968 - [[package]] 2969 2960 name = "linux-raw-sys" 2970 2961 version = "0.4.15" 2971 2962 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3236 3227 ] 3237 3228 3238 3229 [[package]] 3230 + name = "microcosm-links" 3231 + version = "0.1.0" 3232 + dependencies = [ 3233 + "fluent-uri", 3234 + "thiserror 2.0.18", 3235 + "tinyjson", 3236 + ] 3237 + 3238 + [[package]] 3239 3239 name = "mime" 3240 3240 version = "0.3.17" 3241 3241 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4955 4955 "foyer", 4956 4956 "hickory-resolver", 4957 4957 "jetstream", 4958 - "links", 4959 4958 "log", 4960 4959 "metrics", 4961 4960 "metrics-exporter-prometheus 0.17.2", 4961 + "microcosm-links", 4962 4962 "poem", 4963 4963 "poem-openapi", 4964 4964 "reqwest", ··· 5072 5072 "futures", 5073 5073 "http", 5074 5074 "jetstream", 5075 - "links", 5076 5075 "log", 5077 5076 "metrics", 5078 5077 "metrics-exporter-prometheus 0.17.2", 5078 + "microcosm-links", 5079 5079 "rand 0.9.3", 5080 5080 "schemars", 5081 5081 "semver",
+1 -1
Makefile
··· 7 7 fmt: 8 8 cargo fmt \ 9 9 --package constellation \ 10 - --package links \ 10 + --package microcosm-links \ 11 11 --package pocket \ 12 12 --package quasar \ 13 13 --package slingshot \
+1 -1
constellation/Cargo.toml
··· 17 17 flume = { version = "0.11.1", default-features = false } 18 18 fs4 = { version = "0.12.0", features = ["sync"] } 19 19 headers-accept = "0.1.4" 20 - links = { path = "../links" } 20 + microcosm-links = { path = "../links" } 21 21 mediatype = "0.19.18" 22 22 metrics = { workspace = true } 23 23 metrics-exporter-prometheus = { workspace = true }
+2 -2
constellation/src/consumer/mod.rs
··· 6 6 use anyhow::Result; 7 7 use jetstream::consume_jetstream; 8 8 use jsonl_file::consume_jsonl_file; 9 - use links::{parse_any_link, record::walk_record, CollectedLink}; 10 9 use metrics::{counter, histogram}; 10 + use microcosm_links::{parse_any_link, record::walk_record, CollectedLink}; 11 11 use std::path::PathBuf; 12 12 use std::sync::atomic::{AtomicU32, Ordering}; 13 13 use std::sync::Arc; ··· 212 212 #[cfg(test)] 213 213 mod tests { 214 214 use super::*; 215 - use links::{CollectedLink, Link}; 215 + use microcosm_links::{CollectedLink, Link}; 216 216 217 217 #[test] 218 218 fn test_create_like() {
+1 -1
constellation/src/lib.rs
··· 2 2 pub mod server; 3 3 pub mod storage; 4 4 5 - use links::CollectedLink; 5 + use microcosm_links::CollectedLink; 6 6 use serde::{Deserialize, Serialize}; 7 7 use std::convert::From; 8 8
+1 -1
constellation/src/server/filters.rs
··· 1 - use links::{parse_any_link, Link}; 1 + use microcosm_links::{parse_any_link, Link}; 2 2 use num_format::{Locale, ToFormattedString}; 3 3 4 4 pub fn to_browseable(s: &str) -> askama::Result<Option<String>> {
+1 -1
constellation/src/storage/mem_store.rs
··· 5 5 use crate::{ActionableEvent, CountsByCount, Did, ManyToManyItem, RecordId}; 6 6 7 7 use anyhow::{anyhow, Result}; 8 - use links::CollectedLink; 8 + use microcosm_links::CollectedLink; 9 9 10 10 use std::collections::{HashMap, HashSet}; 11 11 use std::sync::{Arc, Mutex};
+1 -1
constellation/src/storage/mod.rs
··· 166 166 #[cfg(test)] 167 167 mod tests { 168 168 use super::*; 169 - use links::{CollectedLink, Link}; 169 + use microcosm_links::{CollectedLink, Link}; 170 170 use std::ops::RangeBounds; 171 171 172 172 macro_rules! test_each_storage {
+2 -2
constellation/src/storage/rocks_store.rs
··· 6 6 7 7 use anyhow::{anyhow, bail, Result}; 8 8 use bincode::Options as BincodeOptions; 9 - use links::CollectedLink; 10 9 use metrics::{counter, histogram}; 10 + use microcosm_links::CollectedLink; 11 11 use ratelimit::Ratelimiter; 12 12 use rocksdb::backup::{BackupEngine, BackupEngineOptions}; 13 13 use rocksdb::{ ··· 1590 1590 mod tests { 1591 1591 use super::super::ActionableEvent; 1592 1592 use super::*; 1593 - use links::Link; 1593 + use microcosm_links::Link; 1594 1594 use tempfile::tempdir; 1595 1595 1596 1596 #[test]
+8 -3
links/Cargo.toml
··· 1 1 [package] 2 - name = "links" 2 + name = "microcosm-links" 3 3 version = "0.1.0" 4 - edition = "2021" 4 + edition = "2024" 5 + license = "MIT OR Apache-2.0" 6 + 7 + [features] 8 + default = ["json"] 9 + json = ["dep:tinyjson"] 5 10 6 11 [dependencies] 7 12 fluent-uri = "0.3.2" 8 13 thiserror = "2.0.9" 9 - tinyjson = "2.5.1" 14 + tinyjson = { version = "2.5.1", optional = true }
+2
links/src/lib.rs
··· 2 2 3 3 pub mod at_uri; 4 4 pub mod did; 5 + #[cfg(feature = "json")] 5 6 pub mod record; 6 7 8 + #[cfg(feature = "json")] 7 9 pub use record::collect_links; 8 10 9 11 #[derive(Debug, Clone, Ord, Eq, PartialOrd, PartialEq)]
+1 -1
links/src/record.rs
··· 1 1 use tinyjson::JsonValue; 2 2 3 - use crate::{parse_any_link, CollectedLink}; 3 + use crate::{CollectedLink, parse_any_link}; 4 4 5 5 pub fn walk_record(path: &str, v: &JsonValue, found: &mut Vec<CollectedLink>) { 6 6 match v {
+1 -1
slingshot/Cargo.toml
··· 13 13 foyer = { version = "0.22.3", features = ["serde"] } 14 14 hickory-resolver = "0.25.2" 15 15 jetstream = { path = "../jetstream", features = ["metrics"] } 16 - links = { path = "../links" } 16 + microcosm-links = { path = "../links" } 17 17 log = "0.4.27" 18 18 metrics = "0.24.2" 19 19 metrics-exporter-prometheus = { version = "0.17.1", features = ["http-listener"] }
+1 -1
slingshot/src/server.rs
··· 4 4 }; 5 5 use atrium_api::types::string::{Cid, Did, Handle, Nsid, RecordKey}; 6 6 use foyer::HybridCache; 7 - use links::at_uri::parse_at_uri as normalize_at_uri; 7 + use microcosm_links::at_uri::parse_at_uri as normalize_at_uri; 8 8 use serde::Serialize; 9 9 use std::path::PathBuf; 10 10 use std::str::FromStr;
+1 -1
spacedust/Cargo.toml
··· 12 12 futures = "0.3.31" 13 13 http = "1.3.1" 14 14 jetstream = { path = "../jetstream", features = ["metrics"] } 15 - links = { path = "../links" } 15 + microcosm-links = { path = "../links" } 16 16 log = "0.4.27" 17 17 metrics = "0.24.2" 18 18 metrics-exporter-prometheus = { version = "0.17.1", features = ["http-listener"] }
+1 -1
spacedust/src/consumer.rs
··· 5 5 DefaultJetstreamEndpoints, JetstreamCompression, JetstreamConfig, JetstreamConnector, 6 6 events::{CommitOp, Cursor, EventKind}, 7 7 }; 8 - use links::collect_links; 8 + use microcosm_links::collect_links; 9 9 use std::sync::Arc; 10 10 use tokio::sync::broadcast; 11 11 use tokio_util::sync::CancellationToken;
+1 -1
spacedust/src/lib.rs
··· 6 6 pub mod subscriber; 7 7 8 8 use jetstream::events::CommitEvent; 9 - use links::CollectedLink; 9 + use microcosm_links::CollectedLink; 10 10 use serde::{Deserialize, Serialize}; 11 11 use server::MultiSubscribeQuery; 12 12 use tokio_tungstenite::tungstenite::Message;