Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish to crates.io

on:
release:
types: [published]
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run (no actual publish)'
type: boolean
default: true

env:
CARGO_TERM_COLOR: always

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Verify package
run: cargo publish --dry-run

- name: Publish to crates.io
if: ${{ github.event_name == 'release' || !inputs.dry_run }}
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "m2m-core"
name = "m2m-protocol"
version = "0.4.0"
edition = "2021"
rust-version = "1.82"
rust-version = "1.88"
license = "Apache-2.0"
description = "M2M Protocol - Intelligent machine-to-machine LLM communication with learned compression"
repository = "https://github.com/infernet-org/m2m-protocol"
keywords = ["llm", "compression", "tokens", "m2m", "protocol", "ai"]
keywords = ["llm", "compression", "m2m", "protocol", "ai"]
categories = ["compression", "web-programming", "science"]
readme = "README.md"
authors = ["M2M Protocol Contributors"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# M2M Protocol

[![Crates.io](https://img.shields.io/crates/v/m2m-core.svg)](https://crates.io/crates/m2m-core)
[![Crates.io](https://img.shields.io/crates/v/m2m-protocol.svg)](https://crates.io/crates/m2m-protocol)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
[![Rust](https://img.shields.io/badge/rust-1.82+-orange.svg)](https://www.rust-lang.org/)
[![Rust](https://img.shields.io/badge/rust-1.88+-orange.svg)](https://www.rust-lang.org/)
[![Tests](https://img.shields.io/badge/tests-268%20passing-brightgreen.svg)]()

**Wire protocol for AI agent communication with inspectable headers and semantic security.**
Expand Down
2 changes: 1 addition & 1 deletion src/codec/brotli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl BrotliCodec {
Ok(decompressed)
}

/// Compress string to wire format: #M2M[v3.0]|DATA:<base64>
/// Compress string to wire format: `#M2M[v3.0]|DATA:<base64>`
pub fn compress(&self, content: &str) -> Result<CompressionResult> {
let compressed = self.compress_bytes(content.as_bytes())?;
let encoded = BASE64.encode(&compressed);
Expand Down
Loading