-
Notifications
You must be signed in to change notification settings - Fork 6
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
17 changed files
with
109 additions
and
61 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,44 +1,51 @@ | ||
FROM ubuntu:latest | ||
|
||
ARG DEFAULT_USER=devel | ||
|
||
ARG USERNAME=devel | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
# Install basic utilities and prerequisites. | ||
# bsdmainutils - provides hexdump, used by integration tests | ||
# neovim - for convenience and modern editing | ||
RUN apt-get update -y && \ | ||
apt-get install -y \ | ||
bsdmainutils \ | ||
build-essential \ | ||
curl \ | ||
git \ | ||
language-pack-en \ | ||
neovim \ | ||
sed \ | ||
sudo \ | ||
wget \ | ||
zsh | ||
wget | ||
|
||
# Install gh cli | ||
# Reference: https://github.com/cli/cli/blob/trunk/docs/install_linux.md | ||
RUN mkdir -p -m 755 /etc/apt/keyrings && \ | ||
wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ | ||
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && \ | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ | ||
apt-get update -y && \ | ||
apt-get install -y gh | ||
|
||
# Add a non-root user that we'll do our best to use for development. | ||
RUN useradd -m devel && \ | ||
RUN userdel ubuntu && \ | ||
groupadd --gid $USER_GID $USERNAME && \ | ||
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \ | ||
echo "devel ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | ||
|
||
# Switch to user. | ||
USER ${DEFAULT_USER} | ||
USER devel | ||
|
||
# Set up path to include rust components. | ||
ENV PATH="${PATH}:/home/${DEFAULT_USER}/.cargo/bin" | ||
WORKDIR /tmp | ||
ENV PATH="${PATH}:/home/devel/.cargo/bin" | ||
|
||
# Copy scripts to temp dir. | ||
WORKDIR /tmp | ||
|
||
# Install rust and plugins | ||
COPY install-rust-and-friends.sh . | ||
RUN ./install-rust-and-friends.sh | ||
|
||
# Install assorted development utilities | ||
COPY install-dev-tools.sh . | ||
RUN ./install-dev-tools.sh | ||
|
||
# Bring modern conveniences to shell. | ||
COPY make-shell-comfortable.sh . | ||
RUN ./make-shell-comfortable.sh | ||
# Install rust toolchain and cargo tools. | ||
COPY install-rust-tools.sh . | ||
RUN ./install-rust-tools.sh | ||
|
||
# Switch back to home dir for normal usage. | ||
WORKDIR /home/${DEFAULT_USER} | ||
WORKDIR /home/devel |
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 |
---|---|---|
|
@@ -11,5 +11,6 @@ | |
} | ||
}, | ||
"features": {}, | ||
"remoteUser": "devel" | ||
"remoteUser": "devel", | ||
"updateRemoteUserUID": true | ||
} |
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 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# brush documentation | ||
|
||
The docs are grouped into: | ||
|
||
* [How-to guides](how-to/README.md) | ||
* [Tutorials](tutorials/README.md) | ||
* [Reference material](reference/README.md) | ||
|
||
If you're just getting started building this project, you should consult the [How to Build](how-to/build.md) guide. | ||
|
||
--- | ||
|
||
> _Note: The structure of our docs is inspired by the [Diátaxis](https://diataxis.fr/) approach; we've found over time that best helps readers find the material most relevant to them, as well as provides a rough shape for where to place the right docs._ |
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,5 @@ | ||
# How-to guides | ||
|
||
* [How to build](build.md) | ||
* [How to run tests](run-tests.md) | ||
* [How to run benchmarks](run-benchmarks.md) |
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,5 @@ | ||
# How to build and run | ||
|
||
1. Install Rust toolchain. We recommend using [rustup](https://rustup.rs/). | ||
1. Build `brush`: `cargo build` | ||
1. Run `brush`: `cargo run` |
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,17 @@ | ||
# How to run benchmarks | ||
|
||
To run performance benchmarks: | ||
|
||
```bash | ||
cargo bench --workspace | ||
``` | ||
|
||
## Collecting flamegraphs | ||
|
||
To collect flamegraphs from performance benchmarks (running for 10 seconds): | ||
|
||
```bash | ||
cargo bench --workspace -- --profile-time 10 | ||
``` | ||
|
||
The flamegraphs will be created as `.svg` files and placed under `target/criterion/<benchmark_name>/profile`. |
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,19 @@ | ||
# How to run tests | ||
|
||
To run all workspace tests: | ||
|
||
```bash | ||
cargo test --workspace | ||
``` | ||
|
||
To run just integration tests: | ||
|
||
```bash | ||
cargo test --test integration_tests | ||
``` | ||
|
||
To run a specific integration test case | ||
|
||
```bash | ||
cargo test --test integration_tests -- '<name of test case>' | ||
``` |
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,3 @@ | ||
# Reference | ||
|
||
* [Integration testing](integration-testing.md) |
File renamed without changes.
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,3 @@ | ||
# Tutorials | ||
|
||
_To be written_ |