Skip to content

Commit 695c3da

Browse files
authored
feat: add crates.io publish workflow and cargo installation docs (#81)
* fix: improve error handling and avoid the panic * feat: publish to crates.io * chore: update cargo toml
1 parent fcb5552 commit 695c3da

6 files changed

Lines changed: 79 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to Crates.io
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
15+
- name: Cache Rust
16+
uses: actions/cache@v4
17+
with:
18+
path: |
19+
~/.rustup/toolchains
20+
~/.cargo/registry
21+
~/.cargo/git
22+
target
23+
key: ${{ runner.os }}-rust-${{ steps.toolchain.outputs.cachekey }}
24+
restore-keys: ${{ runner.os }}-rust-
25+
26+
- name: Install Rust Toolchain
27+
uses: dtolnay/rust-toolchain@stable
28+
29+
- name: Publish to Crates.io
30+
env:
31+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
32+
run: cargo publish --token $CARGO_REGISTRY_TOKEN

Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ version = "0.4.0"
44
edition = "2024"
55
repository = "https://github.com/rust-mcp-stack/rust-mcp-filesystem"
66
authors = ["Ali Hashemi"]
7+
categories = ["command-line-interface", "command-line-utilities"]
78
description = "Blazing-fast, asynchronous MCP server for seamless filesystem operations."
89
homepage = "https://github.com/rust-mcp-stack/rust-mcp-filesystem"
9-
10+
keywords = [
11+
"filesystem mcp server in rust",
12+
"rust-mcp-stack",
13+
"mcp filesystem",
14+
"rust-mcp-filesystem",
15+
]
16+
homepage = "https://rust-mcp-stack.github.io/rust-mcp-filesystem"
17+
license = "MIT"
1018

1119
[package.metadata.wix]
1220
upgrade-guid = "944FE3C9-C8C2-4114-8C8F-5330720E781F"

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ powershell -ExecutionPolicy Bypass -c "irm https://github.com/rust-mcp-stack/rus
4747
brew install rust-mcp-stack/tap/rust-mcp-filesystem
4848
```
4949

50+
#### **Cargo**
51+
52+
```sh
53+
cargo install rust-mcp-filesystem --locked
54+
```
5055

5156
- **NPM**
5257

docs/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ powershell -ExecutionPolicy Bypass -c "irm https://github.com/rust-mcp-stack/rus
4040
brew install rust-mcp-stack/tap/rust-mcp-filesystem
4141
```
4242

43+
#### **Cargo**
44+
45+
```sh
46+
cargo install rust-mcp-filesystem --locked
47+
```
48+
4349
##### **NPM**
4450

4551
```sh

docs/guide/install.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ powershell -ExecutionPolicy Bypass -c "irm https://github.com/rust-mcp-stack/rus
1818

1919
<!-- x-release-please-end -->
2020

21+
#### **Cargo**
22+
23+
```sh
24+
cargo install rust-mcp-filesystem --locked
25+
```
26+
27+
##### **NPM**
28+
29+
```sh
30+
npm i -g @rustmcp/rust-mcp-filesystem@latest
31+
```
32+
> The npm package is provided for convenience. It runs the same underlying Rust binary but can be installed and used as a standard npm package.
33+
2134
#### **Homebrew**
2235

2336
```sh

docs/quickstart.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ powershell -ExecutionPolicy Bypass -c "irm https://github.com/rust-mcp-stack/rus
1818

1919
<!-- x-release-please-end -->
2020

21+
#### **Cargo**
22+
23+
```sh
24+
cargo install rust-mcp-filesystem --locked
25+
```
26+
27+
##### **NPM**
28+
29+
```sh
30+
npm i -g @rustmcp/rust-mcp-filesystem@latest
31+
```
32+
> The npm package is provided for convenience. It runs the same underlying Rust binary but can be installed and used as a standard npm package.
33+
34+
2135
#### **Homebrew**
2236

2337
```sh

0 commit comments

Comments
 (0)