Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

WTX

crates.io deps.rs docs.rs license rustc tests

WTX is a human-written collection of different transport implementations and related tools focused primarily on web technologies. Features the in-house development of +10 IETF RFCs along side other elements.

Works on embedded devices with heap allocators. If you find this crate interesting, please consider giving it a star ⭐ on GitHub.

High-level benchmarks

Checkout wtx-bench or HttpArena and feel free to indicate possible misunderstandings.

gRPCHTTP/2WebSocket
HttpArena - gRPCHttpArena - HTTP/2HttpArena - WebSocket

Low-level benchmarks

Anything marked with #[bench] in the repository is considered a low-level benchmark in the sense that they measure very specific operations that generally serve as the basis for other parts.

Take a look at https://bencher.dev/perf/wtx to see all low-level benchmarks over different periods of time.

Development benchmarks

These numbers provide an estimate of the expected waiting times when developing with WTX. If desired, you can compare them with other similar Rust projects through the dev-bench.sh script.

TechnologyRequired Deps 1All Deps 2Clean CheckClean Debug BuildClean Opt BuildOpt size
gRPC Client2164.80s6.04s6.53s736K
HTTP/2 Client Pool2154.60s5.84s6.44s728K
HTTP/2 Server Framework2347.87s10.53s10.60s996K
Postgres Client13265.12s6.19s6.69s652K
WebSocket Client10224.24s5.04s5.31s560K

Crypto Backend

Taking aside very few exceptions, WTX does not have built-in cryptographic algorithms, as such, it is necessary to select a backend when working with features that require them.

  • crypto-aws-lc-rs
  • crypto-graviola
  • crypto-openssl
  • crypto-ring

Calling methods will halt/panic the application if no backend is selected. These panicking branches will hopefully be erased by dead code analysis if the crypto feature is somehow active but never actually used.

In practice many things require cryptography algorithms. For example, PostgreSQL uses HMAC and secure HTTP cookie uses AEAD.

Examples

Demonstrations of different use-cases can be found in the wtx-examples directory as well as in the documentation located at https://c410-f3r.github.io/wtx.

Limitations

  • WTX is not widely used and has not undergone security audits, therefore, use it at your own risk. However, reproducible contributions that improve security are always welcome.

  • Does not support systems with a pointer length of 16 bits.

  • Expects the infallible sum of the lengths of an arbitrary number of slices, otherwise the program will likely trigger an overflow that can possibly result in unexpected operations. For example, in a 32bit system such a scenario should be viable without swap memory or through specific limiters like ulimit.


  1. Internal dependencies required by the feature.

  2. The sum of optional and required dependencies used by the associated binaries.