From 405a1dfc77543bb5ca78765238e336e814fb45a2 Mon Sep 17 00:00:00 2001 From: Jens K Date: Tue, 12 Nov 2024 19:41:08 +0000 Subject: [PATCH] chore: initial commit --- .devcontainer/Dockerfile | 28 + .devcontainer/devcontainer.json | 34 + .github/workflows/docker-publish.yml | 33 + .gitignore | 21 + Cargo.lock | 1696 ++++++++++++++++++++++++++ Cargo.toml | 19 + Dockerfile | 40 + README.md | 3 + src/main.rs | 82 ++ 9 files changed, 1956 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/workflows/docker-publish.yml create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 src/main.rs diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..035bdfc --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,28 @@ +FROM debian:bullseye-slim AS builder + +RUN apt-get update && apt-get install -y \ + curl \ + && apt-get clean + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ + sh -s -- -y --default-toolchain nightly + +FROM debian:bullseye-slim + +RUN apt-get update && apt-get install -y \ + git \ + gnupg2 \ + build-essential \ + pkg-config \ + libssl-dev \ + && apt-get clean + +# Copy Rust toolchain from the builder stage +COPY --from=builder /root/.cargo /root/.cargo +COPY --from=builder /root/.rustup /root/.rustup + +# Set PATH for Rust +ENV PATH="/root/.cargo/bin:${PATH}" + +# Confirm installation by showing the Rust version +RUN rustc --version \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..d4ee701 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,34 @@ +{ + "name": "Rust Dev Container", + "build": { + "dockerfile": "Dockerfile" + }, + "workspaceFolder": "/workspace", + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "todo-tree.regex.regex": "(//|#|