🔮 Obsidian is a Swift 6+ library for expressive, actor-safe messaging. It focuses on the reactive Flow framework (pulses, channels, streams) and a small set of foundation protocols for consistent identity, naming, and description across your domain types.
Obsidian is now hosted on Codeberg. GitHub is a mirror since the Swift Package Index requires a GitHub repository.
Obsidian is organized into focused modules, each addressing specific aspects of Swift development:
Protocols for consistent interfaces across types: Uniquable for UUID-based identification, Namable for consistent naming, Describable for textual descriptions, and Representable for combined representation.
A comprehensive reactive messaging framework providing type-safe messaging primitives with Pulses, Channels, and Streams. Built for Swift's actor system with natural language APIs and immutable message design.
The main module re-exports Foundation and Flow. Import Obsidian to access all Obsidian features: protocols and reactive messaging.
Add Obsidian to your Swift package dependencies:
dependencies: [
.package(url: "https://codeberg.org/beeauvin/obsidian.git", upToNextMinor: "0.3.1")
]Import Obsidian to access all features:
import Obsidian // Re-exports Foundation utilities and the Flow frameworkFor Flow-specific functionality, you can also import individual modules:
import ObsidianFlow // Just the reactive messaging frameworkimport Obsidian
// Create reactive message flows
struct UserAction: Pulsable {
let action: String
let timestamp: Date
}
let action_channel = Channel { pulse in
await process_user_action(pulse.data)
}
let action_pulse = Pulse(UserAction(action: "login", timestamp: Date()))
.priority(.high)
.tagged("user", "auth")
await action_channel.send(action_pulse)For comprehensive examples and real-world usage patterns, see examples.md.
- Design Philosophy - Core principles and intentional design decisions
- Examples - Comprehensive real-world usage examples
- Contributing - Guidelines for contributing to the project
Contributions are welcome! Please read our design philosophy to understand Obsidian's core principles and intentional design decisions. The key consideration for contributions is alignment with these principles while enhancing the developer experience.
See the contributing guide for detailed guidelines.
🔮 Obsidian is available under the Mozilla Public License 2.0.
A copy of the MPLv2 is included in the license.md file for convenience.