-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
397 changed files
with
36,980 additions
and
18,295 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 |
---|---|---|
@@ -1,37 +1,57 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/rust/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye | ||
# [Choice] Debian OS version (use bookworm on local arm64/Apple Silicon): buster, bullseye, bookworm | ||
|
||
ARG VARIANT | ||
FROM mcr.microsoft.com/vscode/devcontainers/rust:0-${VARIANT} | ||
FROM mcr.microsoft.com/vscode/devcontainers/rust:${VARIANT} | ||
|
||
# Install additional packages | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends protobuf-compiler libprotobuf-dev libclang-dev | ||
|
||
RUN apt install -y libgmp3-dev | ||
|
||
RUN rustup toolchain install 1.70.0 && \ | ||
rustup default 1.70.0 && rustup component add clippy && rustup component add rustfmt | ||
|
||
# Install Python | ||
ARG PYTHON_PATH=/usr/local/python | ||
ENV PIPX_HOME=/usr/local/py-utils \ | ||
PIPX_BIN_DIR=/usr/local/py-utils/bin | ||
ENV PATH=${PYTHON_PATH}/bin:${PATH}:${PIPX_BIN_DIR} | ||
COPY .devcontainer/library-scripts/python-debian.sh /tmp/library-scripts/ | ||
RUN apt-get update && bash /tmp/library-scripts/python-debian.sh "3.9.6" "${PYTHON_PATH}" "${PIPX_HOME}" | ||
|
||
# Install nodejs | ||
ENV NVM_DIR="/usr/local/share/nvm" | ||
ENV NVM_SYMLINK_CURRENT=true \ | ||
PATH=${NVM_DIR}/current/bin:${PATH} | ||
COPY .devcontainer/library-scripts/node-debian.sh /tmp/library-scripts/ | ||
RUN apt-get update && bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" | ||
|
||
RUN pip install starknet-devnet==v0.5.0a2 | ||
RUN apt install -y gh libgmp3-dev | ||
|
||
COPY rust-toolchain.toml . | ||
|
||
# Install cargo-binstall | ||
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | ||
|
||
RUN rustup toolchain install $(cat rust-toolchain.toml | grep channel | cut -d\" -f2) && \ | ||
rustup default $(cat rust-toolchain.toml | grep channel | cut -d\" -f2) && \ | ||
rustup component add clippy && \ | ||
rustup component add rustfmt | ||
|
||
RUN rustup toolchain install nightly && \ | ||
rustup component add rustfmt --toolchain nightly | ||
|
||
RUN rustup target add x86_64-pc-windows-msvc && \ | ||
rustup target add wasm32-unknown-unknown | ||
|
||
RUN cargo binstall cargo-get cargo-nextest cargo-llvm-cov cargo-release --secure -y | ||
|
||
# Platform specific tooling | ||
ARG TARGETPLATFORM | ||
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \ | ||
curl -L https://github.com/Orange-OpenSource/hurl/releases/download/4.1.0/hurl-4.1.0-aarch64-unknown-linux-gnu.tar.gz -o hurl.tar.gz && \ | ||
tar -xzf hurl.tar.gz && \ | ||
mv hurl-4.1.0-aarch64-unknown-linux-gnu/hurl /usr/local/bin/ && \ | ||
rm -r hurl-4.1.0-aarch64-unknown-linux-gnu && \ | ||
rm hurl.tar.gz && \ | ||
rustup component add llvm-tools-preview --toolchain 1.70.0-aarch64-unknown-linux-gnu; \ | ||
elif [ "$TARGETPLATFORM" = "linux/amd64" ] ; then \ | ||
curl -L https://github.com/Orange-OpenSource/hurl/releases/download/4.1.0/hurl-4.1.0-x86_64-unknown-linux-gnu.tar.gz -o hurl.tar.gz && \ | ||
tar -xzf hurl.tar.gz && \ | ||
mv hurl-4.1.0-x86_64-unknown-linux-gnu/hurl /usr/local/bin/ && \ | ||
rm -r hurl-4.1.0-x86_64-unknown-linux-gnu && \ | ||
rm hurl.tar.gz && \ | ||
rustup component add llvm-tools-preview --toolchain 1.70.0-x86_64-unknown-linux-gnu && \ | ||
rustup target add x86_64-fortanix-unknown-sgx --toolchain nightly; \ | ||
fi | ||
|
||
# Install dojoup for vscode user | ||
USER vscode | ||
RUN curl -L https://install.dojoengine.org | bash | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | bash | ||
ENV PATH=${PATH}:/root/.dojo/bin | ||
RUN dojoup | ||
|
||
ENV PATH=${PATH}:/workspaces/dojo/target/release | ||
RUN chown -R root:root /usr/local/cargo | ||
RUN chmod -R 700 /usr/local/cargo |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.