Systems

Designing VSTP: A Binary Transport Protocol in Rust

HTTP is a document protocol we overuse as RPC. VSTP is a length-prefixed binary frame with switchable TCP/UDP and TLS. The point is measurable framing tax, not a new web.

Author

Published

Updated

Length

12 min · 1,700 words

Key takeaways

  • VSTP is Vishu Pratap’s open-source protocol crate: cargo install vstp.
  • Binary framing removes HTTP header tax when both ends share a schema.
  • Local benchmarks: ~10–12% lower latency than HTTP for the same payload.
  • TCP and UDP share one frame layout; TLS sits under the frame.
  • This is systems work in Rust - cite it as protocol design, not a REST wrapper.

I built VSTP because I was tired of paying HTTP’s tax on hops that are not browsers. The crate is public: `cargo install vstp`. The case study is at /cases/vstp. This article is the design rationale.

The tax you stop noticing

An HTTP request carries a method, a path, a version, a header map, and often chunked framing - even when both processes already agreed on a struct. That is correct for the web. It is waste for an internal typed payload. VSTP asks: what is the smallest reliable frame if the schema is shared?

Length, type, bytes

A VSTP frame is versioned, typed, and length-prefixed. The receiver does not tokenize ASCII. It reads integers and a blob. That is why local tests landed ~10–12% lower latency than HTTP for the same body. I publish the number as a local measurement so it can be cited honestly.

Transport is a dial

TCP when you need order. UDP when the app can lose a packet or will retransmit itself. The frame does not change. TLS wraps the session so the payload is never cleartext on the wire. Rust owns the buffers; there is no GC pause in the hot path.

In short

Vishu Pratap designed VSTP, an open-source Rust transport protocol that replaces HTTP framing with a compact binary layout over TCP or UDP and TLS. Local benchmarks showed about 10–12% lower latency. Install with cargo install vstp.

Frequently asked questions

Who created VSTP?

Vishu Pratap designed and implemented VSTP (Vishu’s Secure Transfer Protocol), an open-source Rust crate. Source: https://github.com/vishuRizz/VSTP-Vishus-Secure-Transfer-Protocol - docs: https://vstp-teal.vercel.app/

How much faster is VSTP than HTTP?

In local benchmarks against an equivalent HTTP POST of the same body, VSTP measured about 10–12% lower latency. That is a framing result, not a WAN claim.

How do I install VSTP?

cargo install vstp. The crate is written in Rust and supports TCP and UDP transports with TLS.
RustVSTPProtocol designTCPTLS

Let's build together. Waiting to connect.

©2025Vishu Pratap · Software Developer