Skip to content

Commit 26b457b

Browse files
committed
[Rust] Add WTX - WebSocket
1 parent e2f6beb commit 26b457b

5 files changed

Lines changed: 429 additions & 0 deletions

File tree

frameworks/wtx-ws/Cargo.lock

Lines changed: 308 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/wtx-ws/Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "httparena-wtx-ws"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
socket2 = { default-features = false, features = ["all"], version = "0.6" }
8+
tokio = { default-features = false, features = ["macros", "rt-multi-thread"], version = "1.0" }
9+
wtx = { default-features = false, features = ["crypto-ring", "optimizations", "tokio", "web-socket-handshake"], version = "0.47" }
10+
11+
[profile.release]
12+
codegen-units = 1
13+
lto = "thin"
14+
opt-level = 3
15+
panic = "abort"

frameworks/wtx-ws/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM rust:1.95 AS build
2+
RUN rustup default nightly-2026-05-07
3+
WORKDIR /app
4+
COPY Cargo.toml .
5+
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src/ target/release/httparena-wtx-ws* target/release/deps/httparena_wtx-ws*
6+
COPY src ./src
7+
RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
8+
9+
FROM debian:bookworm-slim
10+
COPY --from=build /app/target/release/httparena-wtx-ws /server
11+
EXPOSE 8080
12+
CMD ["/server"]

frameworks/wtx-ws/meta.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"display_name": "wtx",
3+
"language": "Rust",
4+
"type": "production",
5+
"engine": "wtx",
6+
"description": "WTX - WebSocket Server",
7+
"repo": "https://github.com/c410-f3r/wtx",
8+
"enabled": true,
9+
"tests": [
10+
"echo-ws",
11+
"echo-ws-pipeline"
12+
]
13+
}

0 commit comments

Comments
 (0)