Skip to content

Set up Cursor Cloud dev environment for sgl-model-gateway - #1

Draft
Moersity wants to merge 1 commit into
mainfrom
cursor/setup-dev-environment-4807
Draft

Set up Cursor Cloud dev environment for sgl-model-gateway#1
Moersity wants to merge 1 commit into
mainfrom
cursor/setup-dev-environment-4807

Conversation

@Moersity

@Moersity Moersity commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

Sets up and verifies a working Cursor Cloud development environment for this repo. SGLang is a GPU-first monorepo and this VM has no GPU, so the fully CPU-runnable product — sgl-model-gateway/ (the Rust HTTP/gRPC model router) — was the target for build/lint/test/run. This PR only adds AGENTS.md (no source changes); the environment itself is captured via the VM snapshot + update script.

What was set up (captured in the VM snapshot)

  • System deps: libssl-dev, pkg-config, protobuf-compiler, build-essential, redis-server, python3.12-venv.
  • Rust toolchain pinned to 1.90 (matches CI scripts/ci/cuda/ci_install_gateway_dependencies.sh) + nightly for rustfmt.
  • Global cargo config at /usr/local/cargo/config.toml forcing CC=gcc/CXX=g++ and linker = "g++", because the system default cc/c++ is clang, which can't find libstdc++ <cstdint> (breaks esaxx-rs) and trips rust-lld with unable to find library -lstdc++.
  • pre-commit in ~/.venvs/precommit for repo-wide lint.

Update script (dependency refresh only): cargo fetch for the gateway.

Verification (Rust 1.90, CPU-only)

Check Command Result
Build cargo build --bin sgl-model-gateway Finished OK
Lint cargo clippy --all-targets --all-features -- -D warnings exit 0
Format cargo +nightly fmt -- --check exit 0
Tests cargo test --no-fail-fast 782 passed, 0 failed (16 binaries)
Repo lint pre-commit run --all-files all hooks Passed

End-to-end demo (hello world)

Launched the gateway in IGW mode (--enable-igw, no GPU workers needed), then exercised control plane + data plane against a lightweight mock worker:

  • /liveness → OK, /health → 200
  • /parse/reasoning (deepseek_r1) correctly split <think>…</think> from the answer
  • /parse/function_call (json) extracted a get_weather tool call
  • Registered a worker via POST /workers (health/metadata discovered), visible in /workers and /v1/models
  • Routed a real POST /v1/chat/completions client → gateway → worker → client

End-to-end gateway demo transcript
CI checks summary

Notes

  • policies::tree::tests::test_tree_structure_integrity_after_stress is a randomized 8-thread stress test that can flake ("Tenant … should have positive size"); it passes in isolation and in the pinned-toolchain full run.
  • The Python sglang runtime and sgl-kernel require NVIDIA CUDA and are intentionally out of scope on this CPU-only VM.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

… sgl-model-gateway

Co-authored-by: Moersity <Moersity@users.noreply.github.com>
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.

2 participants