-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from gracig/v.0.5.0
V.0.5.0
- Loading branch information
Showing
15 changed files
with
1,875 additions
and
812 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[profile.rust-analyzer] | ||
inherits = "dev" | ||
debug-assertions = true | ||
|
||
[profile.dev] | ||
debug = true | ||
debug-assertions = false | ||
incremental = true | ||
|
||
|
||
[target.x86_64-unknown-linux-musl] | ||
linker = "rust-lld" | ||
|
||
[profile.release] | ||
opt-level = "z" # Optimize for size | ||
lto = true # Enable Link Time Optimization | ||
codegen-units = 1 # Reduce codegen units to increase optimization | ||
strip = "debuginfo" # Strip debug information |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Use the official Amazon Linux image | ||
FROM amazonlinux:latest | ||
|
||
ARG USERNAME=amazonlinux | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
RUN yum update -y \ | ||
&& yum install -y shadow-utils sudo \ | ||
&& yum clean all | ||
|
||
# Create the user | ||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
&& echo "$USERNAME ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
# Install development tools and dependencies | ||
RUN yum groupinstall -y "Development Tools" \ | ||
&& yum install -y \ | ||
git \ | ||
vim \ | ||
tar \ | ||
gzip \ | ||
openssl-devel \ | ||
perl \ | ||
perl-core \ | ||
perl-IPC-Cmd \ | ||
wget \ | ||
glibc-langpack-en \ | ||
&& yum clean all | ||
|
||
# Switch to the created user | ||
USER $USERNAME | ||
|
||
# Install Rust and Cargo tools as the amazonlinux user | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ | ||
&& ~/.cargo/bin/cargo install cargo-lambda \ | ||
&& ~/.cargo/bin/cargo install just \ | ||
&& ~/.cargo/bin/cargo install --git https://github.com/fpco/amber \ | ||
&& ~/.cargo/bin/cargo install pqrs \ | ||
&& ~/.cargo/bin/cargo install --git https://github.com/helix-editor/helix helix-term --locked \ | ||
&& ~/.cargo/bin/rustup install nightly \ | ||
&& ~/.cargo/bin/rustup target add x86_64-unknown-linux-musl \ | ||
&& ~/.cargo/bin/cargo install cargo-udeps | ||
|
||
# Set environment variables | ||
ENV PATH="/home/$USERNAME/.cargo/bin:${PATH}" | ||
ENV LANG=en_US.UTF-8 | ||
ENV LANGUAGE=en_US:en | ||
ENV LC_ALL=en_US.UTF-8 | ||
ENV OPENSSL_DIR=/usr \ | ||
OPENSSL_LIB_DIR=/usr/lib64 \ | ||
OPENSSL_INCLUDE_DIR=/usr/include \ | ||
CC=gcc | ||
|
||
# Set the working directory | ||
WORKDIR /workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"name": "Amazon Linux Rust Dev Container", | ||
"context": "..", | ||
"dockerFile": "Dockerfile", | ||
"postCreateCommand": "rustup update", | ||
"runArgs": [ | ||
"--env-file", | ||
".devcontainer/.env" | ||
], | ||
"mounts": [ | ||
"source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached", | ||
"source=/home/ggraciani/.ssh/id_ed25519hit,target=/home/amazonlinux/.ssh/id_ed25519hit,type=bind,consistency=cached", | ||
"source=/home/ggraciani/.ssh/known_hosts,target=/home/amazonlinux/.ssh/known_hosts,type=bind,consistency=cached" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"amazonwebservices.aws-toolkit-vscode", | ||
"arrterian.nix-env-selector", | ||
"bbenoist.nix", | ||
"bierner.markdown-preview-github-styles", | ||
"bradlc.vscode-tailwindcss", | ||
"brettm12345.nixfmt-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"earthly.earthfile-syntax-highlighting", | ||
"editorconfig.editorconfig", | ||
"github.copilot", | ||
"github.copilot-chat", | ||
"github.vscode-github-actions", | ||
"golang.go", | ||
"hashicorp.terraform", | ||
"hediet.vscode-drawio", | ||
"janisdd.vscode-edit-csv", | ||
"jeremyrajan.webpack", | ||
"mark-hansen.hledger-vscode", | ||
"marp-team.marp-vscode", | ||
"mechatroner.rainbow-csv", | ||
"mkhl.shfmt", | ||
"ms-azuretools.vscode-docker", | ||
"ms-playwright.playwright", | ||
"ms-python.debugpy", | ||
"ms-python.isort", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-toolsai.jupyter", | ||
"ms-toolsai.jupyter-keymap", | ||
"ms-toolsai.jupyter-renderers", | ||
"ms-toolsai.vscode-jupyter-cell-tags", | ||
"ms-toolsai.vscode-jupyter-slideshow", | ||
"ms-vscode-remote.remote-containers", | ||
"ms-vscode.hexeditor", | ||
"ms-vscode.vscode-speech", | ||
"octref.vscode-ts-config-plugin", | ||
"phu1237.vs-browser", | ||
"polymeilex.wgsl", | ||
"rangav.vscode-thunder-client", | ||
"rebornix.ruby", | ||
"redhat.vscode-yaml", | ||
"rust-lang.rust-analyzer", | ||
"skellock.just", | ||
"tamasfe.even-better-toml", | ||
"timonwong.shellcheck", | ||
"tomoki1207.pdf", | ||
"usernamehw.errorlens", | ||
"vadimcn.vscode-lldb", | ||
"wgsl-analyzer.wgsl-analyzer", | ||
"wingrunr21.vscode-ruby", | ||
"zxh404.vscode-proto3", | ||
"fill-labs.dependi" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.