Skip to content

Commit c2ce396

Browse files
Add pkgx support with package.yml configuration
Co-authored-by: elasticdotventures <[email protected]>
1 parent df250b4 commit c2ce396

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,32 @@
1010

1111
## Installation
1212

13+
### Using Cargo (Standard)
14+
1315
```bash
1416
git clone https://github.com/promptexecution/rust-cargo-docs-rag-mcp.git
1517
cd rust-cargo-docs-rag-mcp
1618
cargo build --release
1719
cargo install --path .
1820
```
1921

22+
### Using pkgx
23+
24+
[pkgx](https://pkgx.dev) is a universal package manager that can build and run this project without requiring a system-wide Rust installation:
25+
26+
```bash
27+
# Install using pkgx (automatically handles Rust dependencies)
28+
pkgx install
29+
30+
# Or build directly with pkgx
31+
pkgx +rust +cargo cargo build --release
32+
33+
# Run without installing
34+
pkgx +rust +cargo cargo run --bin cratedocs -- stdio
35+
```
36+
37+
The project includes a `package.yml` file for pkgx integration, making it easy to build and test across different environments.
38+
2039
## Running the Server
2140

2241
There are multiple ways to run the documentation server:

justfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
install:
22
cargo install --git https://github.com/promptexecution/rust-cargo-docs-rag-mcp --locked
33

4+
# Build with pkgx (ensures correct Rust version and dependencies)
5+
pkgx-build:
6+
pkgx +rust +cargo cargo build --release
7+
8+
# Run with pkgx
9+
pkgx-run:
10+
pkgx +rust +cargo cargo run --bin cratedocs http --address 0.0.0.0:3000 --debug
11+
12+
# Test with pkgx
13+
pkgx-test:
14+
pkgx +rust +cargo cargo test
15+
416
run:
517
cargo run --bin cratedocs http --address 0.0.0.0:3000 --debug
618

package.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
distributable:
2+
url: https://github.com/PromptExecution/rust-cargo-docs-rag-mcp/archive/refs/tags/v{{version}}.tar.gz
3+
strip-components: 1
4+
5+
provides:
6+
- bin/cratedocs
7+
8+
versions:
9+
github: PromptExecution/rust-cargo-docs-rag-mcp/tags
10+
11+
build:
12+
dependencies:
13+
rust-lang.org: '>=1.70'
14+
rust-lang.org/cargo: '*'
15+
script: |
16+
cargo install --path . --root {{prefix}}
17+
18+
test:
19+
script: |
20+
cratedocs version
21+
cratedocs test --tool help

0 commit comments

Comments
 (0)