Skip to content

feat: implement multi-transport support and CLI refactoring#127

Open
AlexCannonball wants to merge 1 commit into
coder3101:mainfrom
AlexCannonball:feat/add-tcp-and-pipe-transports
Open

feat: implement multi-transport support and CLI refactoring#127
AlexCannonball wants to merge 1 commit into
coder3101:mainfrom
AlexCannonball:feat/add-tcp-and-pipe-transports

Conversation

@AlexCannonball
Copy link
Copy Markdown
Contributor

@AlexCannonball AlexCannonball commented May 10, 2026

closes #126

Summary

This PR implements a flexible transport layer for protols, significantly improving debugging capabilities and performance.

Key Changes

  • Multi-transport Support: Fully implemented TCP (port/socket) and Pipe (Unix Domain Sockets / Named Pipes) transports in accordance with the LSP specification.
  • CLI Refactoring: moved from main.rs to a separate file.
  • Improved Performance: Native async I/O support for socket/pipe transports.
    • Safety check for Unix sockets to prevent accidental overwriting of regular files.
  • Debugging & DX:
    • Added a dedicated TCP mode for easier debugging in Dev Containers.
    • Included VS Code launch.json and task configurations for a seamless debug workflow.
    • Added a docs/debugging.md guide.
  • Testing: Added unit tests for CLI parsing and cross-platform path normalization.
  • Project Metadata: Updated Cargo.toml description for better clarity. As i see from https://github.com/coder3101/tree-sitter-proto, the LSP supports proto2, proto3, and editions, rather than just proto3.

The updated CLI --help output:

image

Notes

⚠️ I was unable to check the build on Windows. I'd suggest merging it after #128 to be confident about Windows-specific code.

Support for --clientProcessId is intentionally omitted from this PR:

To support the case that the editor starting a server crashes an editor should also pass its process id to the server. This allows the server to monitor the editor process and to shutdown itself if the editor process dies. The process id passed on the command line should be the same as the one passed in the initialize parameters. The command line argument to use is --clientProcessId.

I'd proposed making it in a separate follow-up to keep the focus on the transport layer infrastructure.

@AlexCannonball AlexCannonball force-pushed the feat/add-tcp-and-pipe-transports branch from 6acbbb2 to 4136d47 Compare May 10, 2026 17:02
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.

Feature Request: Support for TCP and Pipe/Socket transports

1 participant