Crates.io | wtx |
lib.rs | wtx |
version | 0.25.0 |
source | src |
created_at | 2023-08-14 13:32:30.63587 |
updated_at | 2024-11-26 20:53:30.807283 |
description | A collection of different transport implementations and related tools focused primarily on web technologies. |
homepage | https://c410-f3r.github.io/wtx |
repository | https://github.com/c410-f3r/wtx |
max_upload_size | |
id | 944172 |
size | 1,268,276 |
A collection of different transport implementations and related tools focused primarily on web technologies. Contains the implementations of 6 IETF RFCs (6265, 6455, 7541, 7692, 8441, 9113), 2 formal specifications (gRPC, PostgreSQL) and several other invented ideas.
Every feature is optional and must be set at compile time. Please see the intended documentation for further information.
Embedded devices with a working heap allocator can use this no_std
crate.
Many things that generally improve performance are used in the project, to name a few:
cargo tree -e normal --features postgres
.Since memory are usually held at the instance level instead of being created and dropped on the fly, it is worth noting that its usage can growth significantly depending on the use-case. If appropriated, try using a shared pool of resources or try limiting how much data can be exchanged between parties.
Checkout wtx-bench to see a variety of benchmarks or feel free to point any misunderstandings or misconfigurations.
There are mainly 2 things that impact performance, the chosen runtime and the number of pre-allocated bytes. Specially for servers that have to create a new instance for each handshake, pre-allocating a high number of bytes for short-lived or low-transfer connections can have a negative impact.
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.
When using a feature that requires network connection, it is often necessary to perform encrypted communication and since wtx
is not hard-coded with a specific stream implementation, it is up to you to choose the best TLS provider.
Some utilities like TokioRustlsConnector
or TokioRustlsAcceptor
are available to make things more convenient but keep in mind that it is still necessary to activate a crate that provides certificates for client usage.
Demonstrations of different use-cases can be found in the wtx-instances
directory as well as in the documentation.
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
.