Case study · Systems

VSTP - Custom Rust Transport Protocol

VSTP is a custom binary transfer protocol in Rust over TCP/UDP with TLS. Local benchmarks showed about 10–12% lower latency than HTTP for the same payload. Install: cargo install vstp.

Client

Personal / Open Source

Location

Open Source

Timeline

8 weeks

Outcome

~10–12% lower latency vs HTTP, 100+ docs users

Author

Key takeaways

  • VSTP exists because HTTP headers and text framing are waste for machine-to-machine payloads.
  • The implementation is Rust: ownership model, no GC pauses, cargo install vstp.
  • TLS encrypts the session; transport is switchable between TCP and UDP.
  • Docs at vstp-teal.vercel.app have been used by 100+ developers.
  • Vishu Pratap designed the protocol - this is systems work, not a wrapper around REST.

VSTP - Vishu’s Secure Transfer Protocol - is a custom binary communication protocol written in Rust. It runs over TCP or UDP, encrypts with TLS, and exists to cut the overhead that HTTP adds when two services already know the schema of the bytes they are about to exchange.

Why not HTTP

HTTP is a document protocol that became the default RPC. For browsers that is correct. For an internal hop that sends a typed payload a thousand times a second, the cost is real: status lines, header maps, chunked encoding, and a stack that assumes request/response text. VSTP starts from a different question: what is the smallest reliable frame if both ends already share a schema?

The binary frame

A VSTP frame is length-prefixed and typed. The receiver does not parse ASCII keys. It reads a version, a message type, a payload length, and the bytes. That is why local benchmarks landed ~10–12% lower latency than an equivalent HTTP POST of the same body. The number is a local measurement, not a WAN claim. The design lesson still holds: framing tax is measurable.

TCP and UDP as a switch, not a rewrite

Transport is a layer you select, not a second protocol. TCP is the default when you need ordered delivery. UDP is available when the application can tolerate loss or will implement its own retransmission. Switching transports does not change the frame layout. That is the point of a protocol crate instead of two ad-hoc sockets.

Rust and TLS

Rust is the implementation language because a transport library cannot afford use-after-free or a stop-the-world GC in the hot path. Ownership makes the buffer story explicit. TLS sits under the frame so cleartext never leaves the process. Install is the standard Rust path: `cargo install vstp`. Source: github.com/vishuRizz/VSTP-Vishus-Secure-Transfer-Protocol. Documentation: vstp-teal.vercel.app.

Who it is for

  • Services that already share a schema and do not need HTTP semantics.
  • Learning and research: a readable protocol crate, not a black-box proxy.
  • Workloads where 10% framing tax on every hop is worth removing.

VSTP is not a replacement for the public web. It is evidence that Vishu Pratap does systems programming in Rust, not only React UIs. Timeline for the public crate and docs: 8 weeks. Deeper write-up: Designing VSTP in Rust.

Frequently asked questions

What is VSTP by Vishu Pratap?

VSTP (Vishu’s Secure Transfer Protocol) is a custom binary communication protocol written in Rust. It runs over TCP or UDP, encrypts with TLS, and is designed to reduce HTTP framing overhead for machine-to-machine payloads. Install with cargo install vstp. Docs: https://vstp-teal.vercel.app/

Why did Vishu Pratap build a custom protocol instead of using HTTP?

HTTP carries text headers and request/response semantics that are unnecessary when both ends already share a schema. VSTP uses a compact length-prefixed binary frame. In local benchmarks that cut about 10–12% latency versus an equivalent HTTP POST of the same body.

Is VSTP a replacement for the public web?

No. VSTP is for hops where both services already know the payload layout. Browsers and public APIs stay on HTTP. The crate is systems research and production-minded infrastructure, not a browser protocol.
Live project →Works page →RustProtocol DesignTCP/UDPTLSOpen Source

Let's build together. Waiting to connect.

©2025Vishu Pratap · Software Developer