diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 99afc80..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -#[build] -#target = "x86_64-unknown-linux-musl" \ No newline at end of file diff --git a/.devcontainer/Dockerfile.buster b/.devcontainer/Dockerfile.buster index 311b167..3f0fce9 100644 --- a/.devcontainer/Dockerfile.buster +++ b/.devcontainer/Dockerfile.buster @@ -23,7 +23,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ PATH=/usr/local/cargo/bin:$PATH:/home/vscode/.cargo/bin RUN apt-get update && \ - apt install -y git libtool valgrind docker-compose lldb sudo zsh wget && \ + apt install -y cmake git libtool valgrind docker-compose lldb sudo zsh wget && \ apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* && \ adduser ${USERNAME} && \ echo "$USERNAME ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers && \ @@ -35,8 +35,9 @@ RUN apt-get update && \ --default-toolchain nightly --default-host x86_64-unknown-linux-gnu \ --component rustfmt --component rust-src --component clippy && \ rm rustup-init && \ - chmod -R a+w $RUSTUP_HOME $CARGO_HOME + chmod -R a+w $RUSTUP_HOME $CARGO_HOME && \ + echo "alias make='cargo make'" >> /etc/profile USER vscode -RUN cargo install cargo-make \ No newline at end of file +RUN cargo install cargo-make convco \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index da7865c..699f815 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -28,7 +28,7 @@ "--security-opt", "seccomp=unconfined" ], - "postStartCommand": "git submodule update --init && docker pull rust:1-alpine", + "postStartCommand": "cargo make setup", "remoteUser": "vscode", "features": { "ghcr.io/devcontainers/features/docker-in-docker": {} diff --git a/Makefile.toml b/Makefile.toml index f4df978..a09f1fa 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -10,4 +10,23 @@ dependencies = ["build"] [tasks.build] workspace = false command = "docker-compose" -args = [ "run", "build", "${@}" ] \ No newline at end of file +args = ["run", "build", "${@}"] + +[tasks.fmt] +command = "cargo" +args = ["fmt"] + +#---------------------------------- +# +# Project setup tasks +# +#---------------------------------- + +[tasks.setup] +dependencies = ["pull-rust-image", "update-submodules"] + +[tasks.pull-rust-image] +shell = "docker pull rust:1-alpine" + +[tasks.update-submodules] +shell = "git submodule update --init" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 06bd405..596dbce 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,7 @@ services: - ${PWD}:/sparse working_dir: /sparse entrypoint: "/usr/local/cargo/bin/cargo build" + tty: true examples_bindshell_target: build: