docs: add local development setup guide and pin Rust 1.93.0#77
docs: add local development setup guide and pin Rust 1.93.0#77
Conversation
📝 WalkthroughWalkthroughThe pull request adds comprehensive local development documentation to the README and introduces a Rust toolchain configuration file pinning the compiler version to 1.93.0. The README now provides setup prerequisites, installation instructions, usage commands for building and testing, and documentation of the devtools helper utility. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add rust-toolchain.toml to pin Rust version (matrix-sdk 0.16.0 breaks on >= 1.94). Extend README with setup instructions covering rustup, database setup, sqlite3_rsync, devtools reference, and running locally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
123099e to
e8f7e36
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Around line 11-13: Multiple fenced code blocks in README.md lack language
identifiers which triggers lint MD040; update each triple-backtick block (e.g.,
the curl install line, mkdir -p ~/.local/share/btcmap, brew install
sqlite-rsync, the "Host btcmap-api" SSH block, cargo build/test/run, ./devtools
fetch-main-db, and the curl http://localhost:8000/v2/areas block) to include
appropriate languages such as bash or sshconfig (for example change ``` to
```bash or ```sshconfig) so all code fences are annotated for the linter.
- Line 79: The README entry for `image-db` is inaccurate; update the single-line
table entry so it reflects current devtools behavior: state that `image-db
[query]` opens the main BTCMap database (e.g. ~/.local/share/btcmap/btcmap.db)
and note that `fetch-image-db` is the command that targets images.db, or
alternatively change devtools so `image-db` points to
~/.local/share/btcmap/images.db and then keep the README text as-is; refer to
the `image-db` and `fetch-image-db` command names and the paths
~/.local/share/btcmap/btcmap.db and ~/.local/share/btcmap/images.db when making
the change.
- Line 3: Change the third-line heading from H3 to H2 by replacing the "###"
prefix on the line containing "### Check our [API
Docs](https://github.com/teambtcmap/btcmap-api/blob/master/docs%2FREADME.md) for
more information." with "##" so the document moves from H1 to H2 and follows
proper markdown heading hierarchy.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ce34aefd-61a6-4a10-9006-b6f903f6da31
📒 Files selected for processing (2)
README.mdrust-toolchain.toml
| # BTC Map API | ||
|
|
||
| ### Check our [API Docs](https://github.com/teambtcmap/btcmap-api/blob/master/docs%2FREADME.md) for more information. No newline at end of file | ||
| ### Check our [API Docs](https://github.com/teambtcmap/btcmap-api/blob/master/docs%2FREADME.md) for more information. |
There was a problem hiding this comment.
Fix heading level increment at Line 3.
### jumps from H1 at Line 1; make this an H2 to satisfy markdown structure rules and improve doc navigation.
Suggested diff
-### Check our [API Docs](https://github.com/teambtcmap/btcmap-api/blob/master/docs%2FREADME.md) for more information.
+## Check our [API Docs](https://github.com/teambtcmap/btcmap-api/blob/master/docs%2FREADME.md) for more information.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### Check our [API Docs](https://github.com/teambtcmap/btcmap-api/blob/master/docs%2FREADME.md) for more information. | |
| ## Check our [API Docs](https://github.com/teambtcmap/btcmap-api/blob/master/docs%2FREADME.md) for more information. |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` at line 3, Change the third-line heading from H3 to H2 by
replacing the "###" prefix on the line containing "### Check our [API
Docs](https://github.com/teambtcmap/btcmap-api/blob/master/docs%2FREADME.md) for
more information." with "##" so the document moves from H1 to H2 and follows
proper markdown heading hierarchy.
| ``` | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | ||
| ``` |
There was a problem hiding this comment.
Add languages to fenced code blocks for lint compliance.
Multiple fenced blocks are missing language identifiers (MD040).
Suggested diff
- ```
+ ```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
- ```
+ ```bash
mkdir -p ~/.local/share/btcmap
```
- ```
+ ```bash
# macOS
brew install sqlite-rsync
```
- ```
+ ```sshconfig
Host btcmap-api
User root
Hostname <server-ip>
```
-```
+```bash
cargo build- +bash
cargo test
-```
+```bash
./devtools fetch-main-db
- +bash
cargo run
-```
+```bash
curl http://localhost:8000/v2/areas
</details>
Also applies to: 19-21, 25-28, 32-36, 40-42, 46-48, 54-56, 62-64, 68-70
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.22.0)</summary>
[warning] 11-11: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
Verify each finding against the current code and only fix it if needed.
In @README.md around lines 11 - 13, Multiple fenced code blocks in README.md
lack language identifiers which triggers lint MD040; update each triple-backtick
block (e.g., the curl install line, mkdir -p ~/.local/share/btcmap, brew install
sqlite-rsync, the "Host btcmap-api" SSH block, cargo build/test/run, ./devtools
fetch-main-db, and the curl http://localhost:8000/v2/areas block) to include
appropriate languages such as bash or sshconfig (for example change tobash or ```sshconfig) so all code fences are annotated for the linter.
</details>
<!-- fingerprinting:phantom:triton:hawk:5ae5d6e5-7657-4c8b-8cbe-c964dca3b164 -->
<!-- This is an auto-generated comment by CodeRabbit -->
| | Command | Description | | ||
| |---------|-------------| | ||
| | `main-db [query]` | Open the main database in sqlite3 (or run a query) | | ||
| | `image-db [query]` | Open the image database in sqlite3 | |
There was a problem hiding this comment.
image-db description does not match current devtools behavior.
Line 79 says image-db opens the image database, but devtools currently points image-db at ~/.local/share/btcmap/btcmap.db (main DB), while fetch-image-db uses images.db. This makes the docs inaccurate for local debugging workflows.
If you want, I can draft a small follow-up patch for devtools so image-db targets ~/.local/share/btcmap/images.db consistently.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` at line 79, The README entry for `image-db` is inaccurate; update
the single-line table entry so it reflects current devtools behavior: state that
`image-db [query]` opens the main BTCMap database (e.g.
~/.local/share/btcmap/btcmap.db) and note that `fetch-image-db` is the command
that targets images.db, or alternatively change devtools so `image-db` points to
~/.local/share/btcmap/images.db and then keep the README text as-is; refer to
the `image-db` and `fetch-image-db` command names and the paths
~/.local/share/btcmap/btcmap.db and ~/.local/share/btcmap/images.db when making
the change.
Add rust-toolchain.toml to pin Rust version (matrix-sdk 0.16.0 breaks on >= 1.94). Extend README with setup instructions covering rustup, database setup, sqlite3_rsync, devtools reference, and running locally.
Summary by CodeRabbit
Documentation
Chores