Skip to content

Rewrite the uSockets core in Rust - #34037

Open
Jarred-Sumner wants to merge 45 commits into
mainfrom
claude/usockets-rust-rewrite
Open

Rewrite the uSockets core in Rust#34037
Jarred-Sumner wants to merge 45 commits into
mainfrom
claude/usockets-rust-rewrite

[autofix.ci] apply automated fixes (attempt 3/3)

39e9610
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 12, 2026 in 25m 17s

Code review found 6 potential issues

Found 2 candidates, confirmed 6. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 6
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit Cargo.toml:89 Inconsistent Windows ECONNRESET fallback: socket.rs uses 108, backend/mod.rs uses 10054
🟡 Nit src/event_loop/README.md:270 Stale README.md tick-lifecycle diagram: step 6 (onAfterEventLoop) removed by this PR

Annotations

Check warning on line 89 in Cargo.toml

See this annotation in the file changed.

@claude claude / Claude Code Review

Inconsistent Windows ECONNRESET fallback: socket.rs uses 108, backend/mod.rs uses 10054

The Windows `ECONNRESET_ERRNO` fallback constant is defined inconsistently across two sites porting the same C symbol: `src/usockets/socket.rs:171` uses `108` (with a comment explaining C-parity via MSVC CRT `errno.h`), while `src/usockets/backend/mod.rs:72` uses `10054` (`WSAECONNRESET`). In the deleted C, both loop.c:466 and loop.c:797 used the single `ECONNRESET` symbol, which resolved to 108. Impact is minimal (only the rare `SO_ERROR==0` fallback), but either both should be 108 (C parity) o

Check warning on line 270 in src/event_loop/README.md

See this annotation in the file changed.

@claude claude / Claude Code Review

Stale README.md tick-lifecycle diagram: step 6 (onAfterEventLoop) removed by this PR

The tick-lifecycle ASCII diagram at `src/event_loop/README.md:104` still shows `│  6. Call VM.onAfterEventLoop()      │`, but this PR removes `on_after_event_loop()` / `after_event_loop_callback` from `VirtualMachine`, `MiniEventLoop`, the `EventLoopCtx` link_interface, and every call site (grep confirms README.md is the only remaining reference in `src/`). The PR already updates this same README at lines 267–278 for the new poll registry, so this looks like a missed line — drop step 6 and renum