Skip to content

Commit 0c3700c

Browse files
committed
docs: update README with crates.io publishing instructions
1 parent 2346777 commit 0c3700c

File tree

1 file changed

+86
-4
lines changed

1 file changed

+86
-4
lines changed

README.md

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,25 @@ We've created two distinct learning paths to serve different audiences and learn
8686

8787
### Quick Start (Choose Your Path)
8888

89-
**For Technical Teams:**
89+
**Option 1: Install from crates.io (Recommended)**
90+
```bash
91+
# Add as dependency in your Cargo.toml
92+
[dependencies]
93+
mcp_rust_examples = "0.1.0"
94+
95+
# Or install binaries globally
96+
cargo install mcp_rust_examples --features examples-only
97+
98+
# Run examples directly
99+
example_01_hello_world
100+
example_02_calculator
101+
```
102+
103+
**Option 2: Clone and Build (Development)**
90104
```bash
91105
# Clone the repository
92-
git clone <repository-url>
93-
cd mcp-rust-tutorial
106+
git clone https://github.com/RustSandbox/MCP-Development-with-Rust
107+
cd MCP-Development-with-Rust
94108

95109
# Run any of the 20 working examples
96110
cargo run --bin example_01_hello_world
@@ -101,7 +115,7 @@ cargo run --bin example_20_enterprise_server
101115
open mcp_rust_tutorial.md
102116
```
103117

104-
**For Learning-Oriented Approach:**
118+
**Option 3: Learning-Oriented Approach**
105119
```bash
106120
# Start with the international teaching guide
107121
open mcp_rust_tutorial_international.md
@@ -193,6 +207,41 @@ mcp-rust-tutorial/
193207

194208
---
195209

210+
## 🔧 **Feature Flags**
211+
212+
This crate supports multiple feature configurations for different use cases:
213+
214+
**Default Features:**
215+
```toml
216+
[dependencies]
217+
mcp_rust_examples = "0.1.0" # Includes MCP SDK (development branch)
218+
```
219+
220+
**Examples-Only Mode (Recommended for crates.io):**
221+
```toml
222+
[dependencies]
223+
mcp_rust_examples = { version = "0.1.0", features = ["examples-only"], default-features = false }
224+
```
225+
226+
**Available Features:**
227+
- `default` = `["mcp"]` - Full MCP SDK integration
228+
- `mcp` - Enable MCP protocol support (requires git dependency)
229+
- `examples-only` - Just the educational code and examples
230+
231+
**Installation Commands:**
232+
```bash
233+
# With full MCP support (from git)
234+
cargo install mcp_rust_examples
235+
236+
# Examples only (from crates.io)
237+
cargo install mcp_rust_examples --features examples-only --no-default-features
238+
239+
# For development
240+
git clone https://github.com/RustSandbox/MCP-Development-with-Rust
241+
cd MCP-Development-with-Rust
242+
cargo build --all
243+
```
244+
196245
## 🛠️ **Development Commands**
197246

198247
We provide a comprehensive development environment with 50+ commands via [just](https://github.com/casey/just):
@@ -266,6 +315,39 @@ With over 20 years of experience teaching Rust to international audiences, this
266315

267316
---
268317

318+
## 📦 **Publishing & Releases**
319+
320+
This project uses automated publishing to crates.io via GitHub Actions:
321+
322+
**Automated Release Process:**
323+
1. **Tag a Release**: `git tag v0.1.0 && git push origin v0.1.0`
324+
2. **GitHub Actions Triggers**: Automatically builds and tests
325+
3. **Multi-Platform Binaries**: Creates binaries for Linux, macOS, Windows
326+
4. **Crates.io Publishing**: Publishes to crates.io with `examples-only` feature
327+
5. **GitHub Release**: Creates release with binaries and checksums
328+
329+
**Release Workflow:**
330+
-**CI/CD Pipeline**: Full testing and building
331+
-**Cross-Platform Builds**: Linux x64, macOS x64/ARM64, Windows x64
332+
-**Automatic Publishing**: Publishes to crates.io on tag
333+
-**Binary Distribution**: Ready-to-use binaries for all platforms
334+
-**Checksums**: SHA256 verification for security
335+
336+
**Version Management:**
337+
```bash
338+
# Create a new release
339+
git tag v0.2.0
340+
git push origin v0.2.0
341+
342+
# The workflow automatically:
343+
# 1. Builds binaries for all platforms
344+
# 2. Publishes to crates.io
345+
# 3. Creates GitHub release with assets
346+
# 4. Generates checksums for verification
347+
```
348+
349+
**Crates.io Badge:** [![Crates.io](https://img.shields.io/crates/v/mcp_rust_examples)](https://crates.io/crates/mcp_rust_examples)
350+
269351
## 🤝 **Contributing**
270352

271353
We welcome contributions from the global community! This project thrives on diverse perspectives and experiences.

0 commit comments

Comments
 (0)