Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions frameworks/rocket/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "httparena-rocket"
version = "0.1.0"
edition = "2021"

[dependencies]
rocket = { version = "0.5", features = ["json"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
num_cpus = "1"
rusqlite = { version = "0.31", features = ["bundled"] }
flate2 = "1"
tokio = { version = "1", features = ["full"] }

[profile.release]
opt-level = 3
codegen-units = 1
lto = "thin"
panic = "abort"
11 changes: 11 additions & 0 deletions frameworks/rocket/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM rust:1.88 AS build
WORKDIR /app
COPY Cargo.toml .
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src/ target/release/httparena-rocket* target/release/deps/httparena_rocket*
COPY src ./src
RUN RUSTFLAGS="-C target-cpu=native" cargo build --release

FROM debian:bookworm-slim
COPY --from=build /app/target/release/httparena-rocket /server
EXPOSE 8080
CMD ["/server"]
21 changes: 21 additions & 0 deletions frameworks/rocket/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"display_name": "rocket",
"language": "Rust",
"type": "framework",
"engine": "rocket",
"description": "Rocket 0.5 on Tokio with Rustls for HTTP/2, compiled with -O3 and thin LTO.",
"repo": "https://github.com/SergioBenitez/Rocket",
"enabled": true,
"tests": [
"baseline",
"noisy",
"pipelined",
"limited-conn",
"json",
"upload",
"compression",
"mixed",
"baseline-h2",
"static-h2"
]
}
Loading
Loading