Skip to content

chore: init hls-server cargo project#4

Merged
dastarruer merged 4 commits into
masterfrom
chore/init-cargo-project
Apr 17, 2026
Merged

chore: init hls-server cargo project#4
dastarruer merged 4 commits into
masterfrom
chore/init-cargo-project

Conversation

@dastarruer

@dastarruer dastarruer commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add fenix to flake.nix inputs
  • Add rust packages to flake.nix devshell
  • Create hls-server cargo project with cargo init

Summary by CodeRabbit

  • Chores

    • Development environment updated to use an alternative Rust toolchain source and public cache, adding a full Rust toolchain, rust-analyzer nightly, and Rust-focused pre-commit checks (formatting, linting, and TOML validation).
    • Build output now ignored by version control.
  • New Features

    • New server component initialized with a Cargo project, toolchain pinning, and a simple runnable "Hello, world!" entrypoint.

@coderabbitai

coderabbitai Bot commented Apr 16, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@dastarruer has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes and 59 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 45 minutes and 59 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2a011835-57a9-4cfe-b13d-9603628e1880

📥 Commits

Reviewing files that changed from the base of the PR and between 5fa9577 and 353693e.

⛔ Files ignored due to path filters (2)
  • flake.lock is excluded by !**/*.lock
  • hls-server/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • flake.nix
  • hls-server/.gitignore
  • hls-server/Cargo.toml
  • hls-server/rust-toolchain.toml
  • hls-server/src/main.rs
📝 Walkthrough

Walkthrough

Adds a new Rust workspace crate hls-server with toolchain pinning and gitignore, and updates the Nix flake to use the Fenix input, configure binary caches, expose a Fenix Rust toolchain in devShells, and enable Rust-focused pre-commit hooks.

Changes

Cohort / File(s) Summary
Nix flake & inputs
flake.nix
Added nixConfig with extra-substituters and extra-trusted-public-keys; introduced fenix flake input and adjusted package initialization to use the Fenix overlay.
Dev shell & Rust tooling
flake.nix (devShells...)*
Extended devShells.${system}.default to include Fenix-provided Rust components (cargo, clippy, rust-src, rustc, rustfmt) and rust-analyzer-nightly.
Pre-commit hooks
flake.nix (pre-commit-check.hooks)*
Enabled/added Rust hooks: clippy (uses pkgs.fenix.complete, all features, deny warnings, manifest path), rustfmt (check mode, manifest path), plus check-toml and taplo.
New Rust project files
hls-server/Cargo.toml, hls-server/src/main.rs, hls-server/rust-toolchain.toml, hls-server/.gitignore
Added hls-server Cargo manifest (edition 2024), simple main() printing "Hello, world!", pinned toolchain 1.85.0 with components, and .gitignore entry for target/.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped into the flake and found a shiny key,
A Fenix flame to warm my nightly tree.
A tiny server sprang with "Hello, world!"—so neat,
Toolchains lined up tidy, clippy on its feet.
Hop, code, compile—this burrow smells like tea.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: initializing a new Cargo project for hls-server. This aligns with the primary objective of creating an hls-server Cargo project and is concise and specific.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/init-cargo-project

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dastarruer

Copy link
Copy Markdown
Owner Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Apr 16, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@flake.nix`:
- Around line 138-146: Inside the with pkgs; block you have redundant pkgs.
prefixes and an unintended nightly toolchain: replace
pkgs.fenix.complete.withComponents [...] with fenix.complete.withComponents
[...] and change pkgs.rust-analyzer-nightly to rust-analyzer-nightly; if you
intended a stable reproducible dev environment, switch fenix.complete to
fenix.stable.withComponents [...] (or fenix.latest) instead of the nightly
toolchain, and optionally consider adding "rust-analyzer" to the withComponents
list rather than pulling rust-analyzer-nightly separately.

In `@hls-server/Cargo.toml`:
- Line 4: The crate sets edition = "2024" which requires rustc >= 1.85 (MSRV),
but this requirement is not documented; add a rust-toolchain.toml at the crate
root pinning the toolchain to 1.85 or newer (e.g., "channel = 1.85") or
alternatively add an explicit MSRV note to the crate README/CONTRIBUTING stating
"Requires rustc >= 1.85" so contributors/CI outside the Nix devshell won't get a
confusing edition error; ensure the new rust-toolchain.toml is committed
alongside the Cargo.toml change.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8abcd80f-2458-4e47-a330-a0083da728a4

📥 Commits

Reviewing files that changed from the base of the PR and between 926846e and 5663573.

⛔ Files ignored due to path filters (2)
  • flake.lock is excluded by !**/*.lock
  • hls-server/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • flake.nix
  • hls-server/.gitignore
  • hls-server/Cargo.toml
  • hls-server/src/main.rs

Comment thread flake.nix Outdated
Comment thread hls-server/Cargo.toml
@dastarruer
dastarruer force-pushed the chore/init-cargo-project branch from 5663573 to 5fa9577 Compare April 17, 2026 12:06

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@flake.nix`:
- Around line 175-182: The devshell is installing a nightly toolchain via
fenix.complete.withComponents and rust-analyzer-nightly while
hls-server/rust-toolchain.toml pins stable 1.85.0; update the flake to use the
same pinned channel by replacing fenix.complete.withComponents (and
rust-analyzer-nightly) with a stable-based provider such as
fenix.fromToolchainFile pointing at ./hls-server/rust-toolchain.toml or
fenix.stable.withComponents [...], ensuring the symbols
fenix.complete.withComponents and rust-analyzer-nightly are removed/adjusted and
fenix.fromToolchainFile or fenix.stable.withComponents is used so the devshell
toolchain matches rust-toolchain.toml.
- Around line 123-154: The clippy and rustfmt blocks currently use
pkgs.fenix.complete (nightly) causing a toolchain mismatch with
hls-server/rust-toolchain.toml (stable 1.85.0); update both the clippy and
rustfmt definitions (the blocks named clippy and rustfmt that set
packageOverrides and settings) to use fenix.fromToolchainFile { file =
./hls-server/rust-toolchain.toml; sha256 = "..." } (use lib.fakeSha256
initially) instead of pkgs.fenix.complete so the Nix-provided
cargo/clippy/rustfmt match the pinned channel, and apply the same change to the
devShell usage of fenix.complete.withComponents to ensure all pre-commit hooks
and the devShell use the fromToolchainFile toolchain.

In `@hls-server/Cargo.toml`:
- Around line 1-4: Add the package.rust-version field to Cargo.toml to declare
the minimum supported Rust toolchain (MSRV); update the [package] section by
adding a rust-version = "x.y" entry (using the same minor/patch as your
rust-toolchain.toml toolchain) so Cargo will enforce the MSRV during dependency
resolution and CI outside the devshell. Reference the Cargo.toml [package] block
and the rust-version field name when making the change.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3407be03-34c6-470b-a30a-b3866055edf0

📥 Commits

Reviewing files that changed from the base of the PR and between 5663573 and 5fa9577.

⛔ Files ignored due to path filters (2)
  • flake.lock is excluded by !**/*.lock
  • hls-server/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • flake.nix
  • hls-server/.gitignore
  • hls-server/Cargo.toml
  • hls-server/rust-toolchain.toml
  • hls-server/src/main.rs

Comment thread flake.nix Outdated
Comment thread flake.nix Outdated
Comment thread hls-server/Cargo.toml
@dastarruer
dastarruer force-pushed the chore/init-cargo-project branch from 5fa9577 to 353693e Compare April 17, 2026 12:20
@dastarruer
dastarruer merged commit 91edf74 into master Apr 17, 2026
1 check passed
@dastarruer
dastarruer deleted the chore/init-cargo-project branch April 17, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant