1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//! # ARMS - Attention Reasoning Memory Store
//!
//! > "The hippocampus of artificial minds"
//!
//! ARMS is a spatial memory fabric for AI models. It stores computed attention
//! states at their native dimensional coordinates, enabling instant retrieval
//! by proximity rather than traditional indexing.
//!
//! ## Philosophy
//!
//! - **Position IS relationship** - No foreign keys, proximity defines connection
//! - **Configurable, not hardcoded** - Dimensionality, proximity functions, all flexible
//! - **Generators over assets** - Algorithms, not rigid structures
//! - **Pure core, swappable adapters** - Hexagonal architecture
//!
//! ## Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────────┐
//! │ ARMS │
//! ├─────────────────────────────────────────────────────────────┤
//! │ │
//! │ CORE (pure math, no I/O) │
//! │ Point, Id, Blob, Proximity, Merge │
//! │ │
//! │ PORTS (trait contracts) │
//! │ Place, Near, Latency │
//! │ │
//! │ ADAPTERS (swappable implementations) │
//! │ Storage: Memory, NVMe │
//! │ Index: Flat, HNSW │
//! │ API: Python bindings │
//! │ │
//! │ ENGINE (orchestration) │
//! │ Arms - the main entry point │
//! │ │
//! └─────────────────────────────────────────────────────────────┘
//! ```
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use arms::{Arms, ArmsConfig, Point};
//!
//! // Create ARMS with default config (768 dimensions)
//! let mut arms = Arms::new(ArmsConfig::default());
//!
//! // Place a point in the space
//! let point = Point::new(vec![0.1; 768]);
//! let id = arms.place(point, b"my data".to_vec());
//!
//! // Find nearby points
//! let query = Point::new(vec![0.1; 768]);
//! let neighbors = arms.near(&query, 5);
//! ```
// ============================================================================
// MODULES
// ============================================================================
/// Core domain - pure math, no I/O
/// Contains: Point, Id, Blob, Proximity trait, Merge trait
/// Port definitions - trait contracts for adapters
/// Contains: Place trait, Near trait, Latency trait
/// Adapter implementations - swappable components
/// Contains: storage, index, python submodules
/// Engine - orchestration layer
/// Contains: Arms main struct
// ============================================================================
// RE-EXPORTS (public API)
// ============================================================================
// Core types
pub use crate;
pub use crate;
pub use crate;
pub use crateArmsConfig;
// Port traits
pub use crate;
// Engine
pub use crateArms;
// ============================================================================
// CRATE-LEVEL DOCUMENTATION
// ============================================================================
/// The five primitives of ARMS:
///
/// 1. **Point**: `Vec<f32>` - Any dimensionality
/// 2. **Proximity**: `fn(a, b) -> f32` - How related?
/// 3. **Merge**: `fn(points) -> point` - Compose together
/// 4. **Place**: `fn(point, data) -> id` - Exist in space
/// 5. **Near**: `fn(point, k) -> ids` - What's related?
///
/// Everything else is configuration or adapters.
pub const _PRIMITIVES: = ;