Bläddra i källkod

Add Tachyon — a very slow and extremely unsafe Rust server (#10000)

* Add TachyonConcept

* attach README.md

* add link to repo

* Add json support for benchmark

---------

Co-authored-by: Feuerbach Vladislav <[email protected]>
Co-authored-by: vladcoderlab <[email protected]>
TachyonConcepts 4 dagar sedan
förälder
incheckning
b749f1f8cf

+ 43 - 0
frameworks/Rust/tachyon-concept/README.md

@@ -0,0 +1,43 @@
+# Tachyon
+
+[Tachyon Repo](https://github.com/TachyonConcepts/TachyonConcept)
+
+**Tachyon** is a web server written in 100% `unsafe` Rust.  
+Yes — **100%**. There isn’t a single `safe` block in the entire codebase. Safety is a suggestion, not a rule.
+
+This implementation is intentionally modest in scope and **supports only the `/plaintext` benchmark**. No JSON, no databases, no distractions.
+
+## Goals
+
+Tachyon is a server that makes no attempt to be fast, correct, or relevant.  
+It serves plaintext. Slowly. **VERY** slowly.  
+Nah... really... very slow.
+
+## Requirements
+
+- Linux kernel **6.0+**
+- Rust **nightly**
+- CPU with **AVX2** support
+
+> We require a modern Linux kernel to ensure our experimental use of io_uring does *not* work on older systems.
+> Nightly Rust is used to maintain maximum instability across compiler versions.
+
+## Running Locally
+
+```bash
+echo "2048 4096 8192"     > /proc/sys/net/ipv4/tcp_wmem
+echo "8192 16384 32768"   > /proc/sys/net/ipv4/tcp_rmem
+echo "4096 131072 262144" > /proc/sys/net/ipv4/tcp_mem
+
+sysctl -w net.core.somaxconn=65535
+sysctl -w net.ipv4.tcp_max_syn_backlog=65535
+
+sysctl -w net.ipv4.tcp_fastopen=3
+sysctl -w net.ipv4.tcp_tw_reuse=1
+sysctl -w net.ipv4.tcp_fin_timeout=10
+
+ulimit -n 65535
+ulimit -s unlimited
+
+git clone https://github.com/TachyonConcepts/TachyonConcept
+cargo run --release

+ 45 - 0
frameworks/Rust/tachyon-concept/benchmark_config.json

@@ -0,0 +1,45 @@
+{
+  "framework": "tachyon-concept",
+  "tests": [
+    {
+      "default": {
+        "json_url": "/json",
+        "plaintext_url": "/plaintext",
+        "port": 8080,
+        "approach": "Realistic",
+        "classification": "Platform",
+        "database": "None",
+        "framework": "None",
+        "language": "Rust",
+        "flavor": "None",
+        "orm": "None",
+        "platform": "None",
+        "webserver": "Tachyon",
+        "os": "Linux",
+        "database_os": "Linux",
+        "display_name": "Tachyon-Concept",
+        "notes": "",
+        "versus": "None"
+      },
+      "ub": {
+        "json_url": "/json",
+        "plaintext_url": "/plaintext",
+        "port": 8080,
+        "approach": "Realistic",
+        "classification": "Platform",
+        "database": "None",
+        "framework": "None",
+        "language": "Rust",
+        "flavor": "None",
+        "orm": "None",
+        "platform": "None",
+        "webserver": "Tachyon",
+        "os": "Linux",
+        "database_os": "Linux",
+        "display_name": "Tachyon-Concept-UB",
+        "notes": "",
+        "versus": "None"
+      }
+    }
+  ]
+}

+ 10 - 0
frameworks/Rust/tachyon-concept/tachyon-concept-ub.dockerfile

@@ -0,0 +1,10 @@
+FROM rust:latest
+ENV DEBIAN_FRONTEND=noninteractive
+WORKDIR /app
+RUN rustup install nightly
+RUN git clone https://github.com/TachyonConcepts/TachyonConcept .
+RUN RUSTFLAGS="-C target-cpu=native -C opt-level=3 -C target-feature=+avx2,+bmi2" cargo install --path .
+RUN cargo clean
+RUN chmod +x /app/run_ub.sh
+EXPOSE 8080
+CMD /app/run_ub.sh

+ 10 - 0
frameworks/Rust/tachyon-concept/tachyon-concept.dockerfile

@@ -0,0 +1,10 @@
+FROM rust:latest
+ENV DEBIAN_FRONTEND=noninteractive
+WORKDIR /app
+RUN rustup install nightly
+RUN git clone https://github.com/TachyonConcepts/TachyonConcept .
+RUN RUSTFLAGS="-C target-cpu=native -C opt-level=3 -C target-feature=+avx2,+bmi2" cargo install --path .
+RUN cargo clean
+RUN chmod +x /app/run.sh
+EXPOSE 8080
+CMD /app/run.sh