lnmp 0.5.11

LNMP (LLM Native Minimal Protocol) - Meta crate providing unified access to all LNMP modules
Documentation

LNMP - LLM Native Minimal Protocol

Crates.io Documentation License: MIT

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.

Quick Start

Add this to your Cargo.toml:

[dependencies]
lnmp = "0.5.4"

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;

What's Included

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

Why Use the Meta Crate?

Before (Multiple Dependencies)

[dependencies]
lnmp-core = "0.5.4"
lnmp-codec = "0.5.4"
lnmp-embedding = "0.5.4"
lnmp-spatial = "0.5.4"
# ... which ones do I need?

After (Single Dependency)

[dependencies]
lnmp = "0.5.4"  # Everything included!

Usage Examples

Basic Message Encoding

use lnmp::prelude::*;

let message = Message::new(MessageType::Text, b"Hello, LNMP!");
let encoded = encode(&message)?;
let decoded = decode(&encoded)?;

Embedding Delta Compression

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];

let delta = VectorDelta::compute(&old_vector, &new_vector, DeltaMode::Sparse)?;

Spatial Streaming

use lnmp::spatial::{SpatialStreamer, HybridProtocol};

let streamer = SpatialStreamer::new(HybridProtocol::default());
// Stream spatial data efficiently...

Individual Modules

If you prefer fine-grained control and only need specific functionality, you can still depend on individual crates:

Documentation

License

MIT License - see LICENSE for details.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.