jiengup commented on PR #3656:
URL: https://github.com/apache/iggy/pull/3656#issuecomment-4950349703

   > Which issue does this PR address?
   > 
   > Relates to # (devcontainer support for reproducible development 
environment)
   > 
   > ## Rationale
   > The repository lacked a devcontainer configuration, making onboarding 
inconsistent — each developer needs to manually install the correct Rust 
toolchain, Node.js, and system dependencies. Moreover, for local development on 
other platforms (e.g, macOS), the `compio-driver` will fallback to `poll` 
instead of `io-uring`, which will make source code tracing difficult and 
different with iggy design. On GitHub Codespaces, the default 8GB machine ran 
out of memory during rust-analyzer indexing, causing repeated SIGTERM crashes.
   > 
   > ## What changed?
   > Added `.devcontainer/Dockerfile` and `.devcontainer/devcontainer.json` 
that:
   > 
   > * Mirror the production Dockerfile dependencies (Rust 1.96 via rustup, 
libssl-dev, libhwloc-dev, libudev-dev, nodejs) so the dev environment matches 
CI.
   > * Configure `hostRequirements` (4-core / 16GB) to prevent rust-analyzer 
OOM kills on Codespaces.
   > * Cap build parallelism (`CARGO_BUILD_JOBS=4`) and enable 
proc-macros/build-scripts for usable IDE features while staying within memory 
limits.
   > * Forward ports for all transports (HTTP 3000, QUIC 8080, TCP 8090, 
WebSocket 8092) plus the web UI dev server (3050).
   > * Run `npm --prefix web ci` on container creation so the web frontend is 
ready immediately.
   > 
   > ## Local Execution
   > * Passed — container builds, `cargo check` succeeds, rust-analyzer code 
navigation (Go to Definition / autocomplete) works.
   > * Verified on both local Docker Desktop (macOS arm64) and GitHub 
Codespaces (4-core/16GB). Both enviroments can navigate to the io-uring driver 
code in `compio`.
   > 
   > ## AI Usage
   > LLM is used to generate the devcontainer configuration files and all the 
changes are checked by the human.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to