Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/s-core-devcontainer/.devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
"version": "1.7.1",
"resolved": "ghcr.io/devcontainers/features/python@sha256:cf9b6d879790a594b459845b207c5e1762a0c8f954bb8033ff396e497f9c301b",
"integrity": "sha256:cf9b6d879790a594b459845b207c5e1762a0c8f954bb8033ff396e497f9c301b"
},
"ghcr.io/devcontainers/features/rust": {
"version": "1.5.0",
"resolved": "ghcr.io/devcontainers/features/rust@sha256:0c55e65f2e3df736e478f26ee4d5ed41bae6b54dac1318c443e31444c8ed283c",
"integrity": "sha256:0c55e65f2e3df736e478f26ee4d5ed41bae6b54dac1318c443e31444c8ed283c"
}
}
}
11 changes: 11 additions & 0 deletions src/s-core-devcontainer/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
"ghcr.io/devcontainers/features/python": {
"version": "3.12.11"
},
"ghcr.io/devcontainers/features/rust": {
"version": "1.83.0",
"components": [
"cargo",
"clippy",
// "miri", // only available at nightly
"rust-analyzer",
"rust-src",
"rustfmt"
Comment on lines +35 to +40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tools you should check in src/s-core-devcontainer/test-project/test.sh

]
},
"./s-core-local": {}
},
"remoteUser": "vscode",
Expand Down
10 changes: 0 additions & 10 deletions src/s-core-devcontainer/.devcontainer/s-core-local/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ echo "${bazel_compile_commands_amd64_sha256} /tmp/bazel-compile-commands.deb" |
apt-get install -y --no-install-recommends --fix-broken /tmp/bazel-compile-commands.deb
rm /tmp/bazel-compile-commands.deb

# Code completion for Rust code of Bazel projects (language server part)
# (see https://bazelbuild.github.io/rules_rust/rust_analyzer.html and https://rust-analyzer.github.io/book/rust_analyzer_binary.html)
# The version is pinned to a specific release, and the SHA256 checksum is provided by the devcontainer-features.json file.
# NOTE: For an unknown reason, rust-analyzer uses dates for downloading of releases, while the executable reports an actual release.
curl -L https://github.com/rust-lang/rust-analyzer/releases/download/${rust_analyzer_date}/rust-analyzer-x86_64-unknown-linux-gnu.gz > /tmp/rust-analyzer.gz
echo "${rust_analyzer_amd64_sha256} /tmp/rust-analyzer.gz" | sha256sum -c - || exit -1
gunzip -d /tmp/rust-analyzer.gz
mv /tmp/rust-analyzer /usr/local/bin/rust-analyzer
chmod +x /usr/local/bin/rust-analyzer

# qemu-system-arm
apt-get install -y --no-install-recommends --fix-broken qemu-system-arm="${qemu_system_arm_version}*"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ check "validate buildifier is working and has the correct version" bash -c "buil
check "validate starpls is working and has the correct version" bash -c "starpls version | grep '${starpls_version}'"
check "validate bazel-compile-commands is working and has the correct version" bash -c "bazel-compile-commands --version 2>&1 | grep '${bazel_compile_commands_version}'"

# Rust tooling
check "validate rust-analyzer is working and has the correct version" bash -c "rust-analyzer --version 2>&1 | grep '${rust_analyzer_version}'"

# Qemu target-related tools
check "validate qemu-system-aarch64 is working and has the correct version" bash -c "qemu-system-aarch64 --version | grep '${qemu_system_arm_version}'"
check "validate sshpass is working and has the correct version" bash -c "sshpass -V | grep '${sshpass_version}'"
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,3 @@ bazel_compile_commands:
# The following sha256sums are for the deb package bazel-compile-commands_<version>-noble_amd64.deb
# It is generated by running 'sha256sum bazel-compile-commands_<version>-noble_amd64.deb'
sha256: 97239b316df58fd3370a8aa6350790ececd5e4a1de30efb42d45cb1c300a179a

rust_analyzer:
date: 2025-08-25
version: 0.3.2593-standalone
amd64:
# The following sha256sum is for the binary rust-analyzer-x86_64-unknown-linux-gnu.gz
# from the GitHub release page of rust-analyzer
# It is generated by running 'sha256sum rust-analyzer-x86_64-unknown-linux-gnu.gz'
sha256: 487fb1cb99e567fd6b818cc88a7c1452d5260da57dbc171fc1359a4b604348ae
7 changes: 7 additions & 0 deletions src/s-core-devcontainer/test-project/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ check "validate clang-format is working and has the correct version" bash -c "cl
check "validate clang-tidy is working and has the correct version" bash -c "clang-tidy --version | grep '20.1.8'"
check "validate clang is working and has the correct version" bash -c "clang --version | grep '20.1.8'"

# Rust tooling
check "validate rustc is working and has the correct version" bash -c "rustc --version | grep '1.83.0'"
check "validate cargo is working and has the correct version" bash -c "cargo --version | grep '1.83.0'"
check "validate cargo clippy is working and has the correct version" bash -c "cargo clippy --version | grep '0.1.83'"
check "validate rustfmt is working and has the correct version" bash -c "rustfmt --version | grep '1.8.0-stable'"
check "validate rust-analyzer is working and has the correct version" bash -c "rust-analyzer --version | grep '1.83.0'"

# Tests from the local s-core-local feature
source /devcontainer/features/s-core-local/tests/test_default.sh

Expand Down