| Crates.io | lnmp |
| lib.rs | lnmp |
| version | 0.5.16 |
| created_at | 2025-11-22 16:03:22.48172+00 |
| updated_at | 2025-12-19 10:15:14.054483+00 |
| description | LNMP (LLM Native Minimal Protocol) - Meta crate providing unified access to all LNMP modules |
| homepage | |
| repository | https://github.com/lnmplang/lnmp-protocol |
| max_upload_size | |
| id | 1945456 |
| size | 62,996 |
LNMP is a meta crate that provides unified access to all modules of the LLM Native Minimal Protocol ecosystem. Instead of managing multiple dependencies, simply add lnmp to your project and get everything you need.
📋 FID Registry: All Field IDs have official definitions in
registry/fids.yaml. Seespec/fid-governance.mdfor governance rules.
Add this to your Cargo.toml:
[dependencies]
lnmp = "0.5.13"
Then use any LNMP module:
use lnmp::prelude::*;
use lnmp::core::{Message, MessageType};
use lnmp::codec::{encode, decode};
use lnmp::embedding::VectorDelta;
use lnmp::spatial::SpatialStreamer;
This meta crate re-exports all LNMP modules:
| Module | Description |
|---|---|
core |
Core type definitions and protocol structures |
codec |
Encoding and decoding functionality |
embedding |
Embedding vector operations and delta compression |
envelope |
Secure message enveloping and integrity |
llb |
Large Language Block operations |
quant |
Quantization utilities for efficient data representation |
sanitize |
Data sanitization and validation |
sfe |
Secure Function Evaluation primitives |
spatial |
Spatial data streaming and hybrid protocols |
transport |
Transport protocol bindings (HTTP, Kafka, gRPC, NATS) |
net |
Network behavior layer (MessageKind, QoS, ECO routing) |
[dependencies]
lnmp-core = "0.5.13"
lnmp-codec = "0.5.13"
lnmp-embedding = "0.5.13"
lnmp-spatial = "0.5.13"
# ... which ones do I need?
[dependencies]
lnmp = "0.5.13" # Everything included!
use lnmp::prelude::*;
let message = Message::new(MessageType::Text, b"Hello, LNMP!");
let encoded = encode(&message)?;
let decoded = decode(&encoded)?;
use lnmp::embedding::{VectorDelta, DeltaMode};
let old_vector = vec![1.0, 2.0, 3.0];
let new_vector = vec![1.1, 2.0, 3.2];
// Compute delta (needs base_id for reconstruction)
let delta = VectorDelta::from_vectors(&old_vector, &new_vector, 1)?;
use lnmp::spatial::{SpatialStreamer, HybridProtocol};
let streamer = SpatialStreamer::new(HybridProtocol::default());
// Stream spatial data efficiently...
use lnmp::net::{NetMessage, MessageKind, RoutingPolicy};
// Create a network message
let msg = NetMessage::new(envelope, MessageKind::Alert);
// Make intelligent routing decision
let policy = RoutingPolicy::default();
let decision = policy.decide(&msg, now_ms)?;
If you prefer fine-grained control and only need specific functionality, you can still depend on individual crates:
lnmp-core - Core protocol definitionslnmp-codec - Encoding/decodinglnmp-embedding - Embedding operationslnmp-llb - Large Language Blockslnmp-quant - Quantizationlnmp-sanitize - Sanitizationlnmp-sfe - Secure Function Evaluationlnmp-spatial - Spatial streaminglnmp-transport - Transport bindingslnmp-net - Network behavior layerMIT License - see LICENSE for details.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.