From 8ea862dcaee853549b8b1fd1337fa7d3e361e331 Mon Sep 17 00:00:00 2001 From: John Cairns Date: Wed, 8 Nov 2023 14:16:35 -0600 Subject: [PATCH] first commit --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5e819d3 --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +# XMTP Rust Development Container for Docker and VS Code + +![Rust](https://www.rust-lang.org/static/images/rust-logo-blk.svg) + +This development container for Visual Studio Code is a pre-configured and isolated environment that allows you to develop, build, and test your software projects using consistent tools and settings. This development container can be used in Docker to create a standardized and reproducible environment for your development workflow. This is useful when working on projects that require specific versions of programming languages, libraries, tools, and other dependencies. By using this development container, you can ensure that all members of your development team work with the same development environment, reducing issues related to differences in configurations and dependencies. + +Key benefits of using development containers in Visual Studio Code include: + +1. **Consistency**: Development containers ensure that everyone on the team is using the same environment, reducing "works on my machine" issues. + +2. **Isolation**: Containers provide isolation from the host system, preventing conflicts between different software versions. + +3. **Reproducibility**: Containers can be versioned, making it easy to replicate the exact development environment in different stages of the project. + +4. **Portability**: Development containers can be shared and run on different machines, making it easier to onboard new team members or work across multiple devices. + +5. **Dependency Management**: Containers encapsulate dependencies, eliminating the need to install and manage them directly on the host system. + +To use this development container in Visual Studio Code, specify the `Dockerfile` as defined below and reopen in the Remote Containers module. + +# Supported Toolchain + +Everything needed to Rust and Protocol buffers from stable toolchain. + +#### Deployments + +[Releases](https://github.com/xmtp/rust/pkgs/container/rust) + +### Building + +* requires: + - 16 Gb memory + - Docker + - BuildKit TARGETARCH + `$ DOCKER_BUILDKIT=1 docker build . -t ... ` + + +## arm64 + + To build locally, run: + ` $ sh build.sh ` + + Then it can be used normally, as below. + +## Example Dockerfile + +``` +FROM ghcr.io/xmtp/rust:latest + +ENV PATH=${PATH}:~/.cargo/bin +RUN cargo build +``` + +### Architecture +* linux/amd64 +* linux/arm64 + +# rust