From 6efff7a2745a5cd1359695090cd313b726a304bb Mon Sep 17 00:00:00 2001 From: "Tristan Poland (Trident_For_U)" <34868944+tristanpoland@users.noreply.github.com> Date: Wed, 25 Sep 2024 17:50:33 -0400 Subject: [PATCH] Added a reust devcontainer for windows development --- .devcontainer/devcontainer.json | 31 +++++++++++++++++++++++++++++++ installers-deb.sh | 1 + repbuild/src/main.rs | 6 +++--- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 installers-deb.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f8fff10 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,31 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/rust +{ + "name": "Rust", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye" + + // Use 'mounts' to make the cargo cache persistent in a Docker Volume. + // "mounts": [ + // { + // "source": "devcontainer-cargo-cache-${devcontainerId}", + // "target": "/usr/local/cargo", + // "type": "volume" + // } + // ] + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "rustc --version", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/installers-deb.sh b/installers-deb.sh new file mode 100644 index 0000000..f4d5f29 --- /dev/null +++ b/installers-deb.sh @@ -0,0 +1 @@ +sudo apt-get update && sudo apt install -y qemu-utils qemu-system-x86 qemu-system-gui clang \ No newline at end of file diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs index af25649..7a58d38 100644 --- a/repbuild/src/main.rs +++ b/repbuild/src/main.rs @@ -345,11 +345,11 @@ fn run(release: bool, target: Target) -> Result<(), Error> { com.args([ "-bios", &ovmf_path.change_context(Error::OvmfFetch)?, "-drive", "file=target/disk.img,format=raw", - "-device", "vmware-svga", +// "-device", "vmware-svga", "-m", "2G", "-smp", "1", - "-machine", "accel=kvm", - "-cpu", "host", +// "-machine", "accel=kvm", +// "-cpu", "host", "-device", "isa-debug-exit,iobase=0xf4,iosize=0x04", ]); }