Skip to content

feat: split-off embedded-rust from rust flavor#1358

Queued
Ron (rjaegers) wants to merge 4 commits into
mainfrom
feature/split-embedded-rust-from-rust
Queued

feat: split-off embedded-rust from rust flavor#1358
Ron (rjaegers) wants to merge 4 commits into
mainfrom
feature/split-embedded-rust-from-rust

Conversation

@rjaegers

Copy link
Copy Markdown
Member

🚀 Hey, I have created a Pull Request

Description of changes

This pull request introduces a new amp-devcontainer-embedded-rust image for embedded Rust development, along with the necessary configuration, documentation, and CI/CD workflow updates to support and test it. The new image extends the existing Rust container with ARM Cortex-M cross-compilation, flashing, and debugging tools, and includes dedicated integration tests and release automation.

New Embedded Rust Devcontainer

  • Added .devcontainer/embedded-rust/devcontainer.json and .devcontainer/embedded-rust/devcontainer-metadata.json to define the embedded Rust devcontainer, specifying the base image, VS Code extensions, and environment variables. [1] [2]
  • Added .devcontainer/embedded-rust/tool-inventory.json to list the tools included in the embedded Rust container.
  • Added templates/embedded-rust/devcontainer-template.json for template and version management.
  • Added test/embedded-rust/integration-tests.bats to provide integration tests for building and verifying ARM Cortex-M binaries.

Dockerfile and Build Logic Updates

  • Updated .devcontainer/rust/Dockerfile to support an embedded flavor via the BUILD_EMBEDDED_FLAVOR argument, conditionally installing ARM targets and embedded tools (flip-link, probe-rs-tools) only for the embedded variant. [1] [2] [3]
  • Removed embedded-specific tools from the standard Rust tool inventory.

CI/CD and Release Pipeline Updates

  • Updated all relevant GitHub Actions workflows to recognize and build the new embedded-rust flavor, including build, test, vulnerability scan, dependency update, image cleanup, and release workflows. [1] [2] [3] [4] [5] [6]
  • Updated release configuration to track and bump the embedded Rust template version.

Documentation Updates

  • Updated README.md to document the new amp-devcontainer-embedded-rust image, its features, and how it differs from the standard Rust container. [1] [2]
  • Updated .github/RELEASE_TEMPLATE.md to include the new image and its tool listing. [1] [2]
  • Updated .github/TOOL_VERSION_ISSUE_TEMPLATE.md to track embedded Rust tools for version checks.

✔️ Checklist

  • I have followed the contribution guidelines for this repository
  • I have added tests for new behavior, and have not broken any existing tests
  • I have added or updated relevant documentation
  • I have verified that all added components are accounted for in the SBOM
  • I understand the image size delta and agree the functionality justifies it

Copilot AI review requested due to automatic review settings July 14, 2026 13:47
@rjaegers Ron (rjaegers) requested a review from a team as a code owner July 14, 2026 13:47
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-base:edgeghcr.io/philips-software/amp-devcontainer-base:pr-1358

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 75.35 MB 75.35 MB +129 B (+0%) 🔼
linux/arm64 73.43 MB 73.43 MB 34 B (0%) 🔽

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 23 0 0 0.25s
✅ DOCKERFILE hadolint 4 0 0 0.27s
✅ JSON npm-package-json-lint yes no no 0.59s
✅ JSON prettier 42 2 0 0 0.96s
✅ JSON v8r 42 0 0 16.05s
⚠️ MARKDOWN markdownlint 13 0 5 0 1.27s
✅ MARKDOWN markdown-table-formatter 13 1 0 0 0.28s
✅ REPOSITORY betterleaks yes no no 1.39s
✅ REPOSITORY checkov yes no no 29.2s
✅ REPOSITORY gitleaks yes no no 1.08s
✅ REPOSITORY git_diff yes no no 0.02s
✅ REPOSITORY grype yes no no 59.4s
⚠️ REPOSITORY osv-scanner yes 1 no 0.69s
✅ REPOSITORY secretlint yes no no 2.15s
✅ REPOSITORY syft yes no no 2.99s
✅ REPOSITORY trivy yes no no 12.9s
✅ REPOSITORY trivy-sbom yes no no 0.39s
✅ REPOSITORY trufflehog yes no no 6.57s
⚠️ SPELL lychee 110 2 0 116.61s
✅ YAML prettier 32 0 0 0 1.27s
✅ YAML v8r 32 0 0 14.58s
✅ YAML yamllint 32 0 0 1.34s

Detailed Issues

⚠️ SPELL / lychee - 2 errors
📝 Summary
---------------------
🔍 Total..........153
🔗 Unique.........126
✅ Successful.....143
⏳ Timeouts.........3
🔀 Redirected......19
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........2
⛔ Unsupported......2

Errors in .github/TOOL_VERSION_ISSUE_TEMPLATE.md
[403] https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads (at 38:7) | Rejected status code: 403 Forbidden

Errors in test/cpp/features/security.feature
[TIMEOUT] https://slsa.dev/spec/v1.0/levels (at 20:30) | Request timed out
[TIMEOUT] https://slsa.dev/spec/v1.0/threats (at 28:19) | Request timed out
[ERROR] https://slsa.dev/spec/v1.0/threats (at 42:44) | Connection failed. Check network connectivity and firewall settings
[TIMEOUT] https://slsa.dev/spec/v1.0/verifying-artifacts (at 24:25) | Request timed out

Hint: Followed 19 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: You can configure accepted/rejected response codes with `-a` or `--accept`
⚠️ MARKDOWN / markdownlint - 5 errors
.github/RELEASE_TEMPLATE.md:17:34 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
.github/RELEASE_TEMPLATE.md:17:178 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
.github/RELEASE_TEMPLATE.md:18:34 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
.github/RELEASE_TEMPLATE.md:18:178 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
docs/adr/0000-record-architecture-decisions.md:30:401 error MD013/line-length Line length [Expected: 400; Actual: 520]
⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
Scanned .devcontainer/docs/requirements.txt file and found 14 packages
Scanned .devcontainer/cpp/requirements.txt file and found 20 packages
Scanned package-lock.json file and found 73 packages
Scanned test/rust/workspace/cargo/Cargo.lock file and found 1 package
Scanned test/rust/workspace/test/Cargo.lock file and found 1 package
Scanned test/rust/workspace/clippy/Cargo.lock file and found 1 package
Scanned test/embedded-rust/workspace/cortex-m/Cargo.lock file and found 20 packages
Scanned test/embedded-rust/workspace/cortex-mf/Cargo.lock file and found 20 packages
End status: 100 dirs visited, 329 inodes visited, 8 Extract calls, 55.415604ms elapsed, 55.415794ms wall time

Total 2 packages affected by 2 known vulnerabilities (0 Critical, 0 High, 0 Medium, 0 Low, 2 Unknown) from 1 ecosystem.
0 vulnerabilities can be fixed.

+-----------------------------------+------+-----------+------------+---------+---------------+---------------------------------------------------+
| OSV URL                           | CVSS | ECOSYSTEM | PACKAGE    | VERSION | FIXED VERSION | SOURCE                                            |
+-----------------------------------+------+-----------+------------+---------+---------------+---------------------------------------------------+
| https://osv.dev/RUSTSEC-2026-0110 |      | crates.io | bare-metal | 0.2.5   | --            | test/embedded-rust/workspace/cortex-m/Cargo.lock  |
| https://osv.dev/RUSTSEC-2026-0110 |      | crates.io | bare-metal | 0.2.5   | --            | test/embedded-rust/workspace/cortex-mf/Cargo.lock |
+-----------------------------------+------+-----------+------------+---------+---------------+---------------------------------------------------+

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.6.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,DOCKERFILE_HADOLINT,JSON_V8R,JSON_PRETTIER,JSON_NPM_PACKAGE_JSON_LINT,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_BETTERLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

Comment thread .github/RELEASE_TEMPLATE.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR splits embedded Rust tooling out of the existing Rust devcontainer flavor into a dedicated embedded-rust flavor/image, updating build logic, CI matrices, tests, and documentation so embedded Rust support is isolated and versioned independently.

Changes:

  • Introduces a new .devcontainer/embedded-rust flavor (plus template + tool inventory) and an embedded-rust-test devcontainer for CI validation.
  • Updates the Rust Dockerfile to conditionally install ARM Cortex-M targets and embedded tools when BUILD_EMBEDDED_FLAVOR=true.
  • Moves Cortex-M integration tests from the rust test suite into a new test/embedded-rust suite and updates workflows/docs to include the new image.

Reviewed changes

Copilot reviewed 19 out of 27 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/rust/integration-tests.bats Removes embedded Cortex-M tests from the standard Rust flavor suite.
test/embedded-rust/integration-tests.bats Adds embedded Rust integration tests for Cortex-M and Cortex-MF builds.
test/embedded-rust/workspace/cortex-m/src/main.rs Adds a minimal no_std Cortex-M test binary entrypoint.
test/embedded-rust/workspace/cortex-m/Cargo.toml Defines dependencies for the Cortex-M test binary.
test/embedded-rust/workspace/cortex-m/Cargo.lock Locks dependencies for reproducible Cortex-M test builds.
test/embedded-rust/workspace/cortex-m/.cargo/config.toml Sets the default build target to thumbv7em-none-eabi.
test/embedded-rust/workspace/cortex-mf/src/main.rs Adds a minimal no_std Cortex-MF test binary entrypoint.
test/embedded-rust/workspace/cortex-mf/Cargo.toml Defines dependencies for the Cortex-MF test binary.
test/embedded-rust/workspace/cortex-mf/Cargo.lock Locks dependencies for reproducible Cortex-MF test builds.
test/embedded-rust/workspace/cortex-mf/.cargo/config.toml Sets the default build target to thumbv7em-none-eabihf.
templates/embedded-rust/devcontainer-template.json Adds a new devcontainer template entry for embedded Rust with versioning hooks.
release-please-config.json Tracks embedded Rust template version fields for automated releases.
README.md Documents the new embedded Rust image and updates the Rust image description accordingly.
.github/workflows/vulnerability-scan.yml Expands scan matrix to include embedded-rust.
.github/workflows/update-dependencies.yml Expands dependency update matrix to include embedded-rust.
.github/workflows/release-build.yml Expands release matrix to include embedded-rust.
.github/workflows/pr-image-cleanup.yml Adds embedded Rust package to PR image cleanup list.
.github/workflows/image-cleanup.yml Adds embedded Rust package to scheduled image cleanup list.
.github/workflows/build-push-test.yml Adds embedded-rust to the build/test matrix and passes BUILD_EMBEDDED_FLAVOR build-arg.
.github/TOOL_VERSION_ISSUE_TEMPLATE.md Adds embedded Rust tooling to quarterly version-check checklist.
.github/RELEASE_TEMPLATE.md Adds embedded Rust image + tools section to release notes template.
.devcontainer/rust/tool-inventory.json Removes embedded-only tools from the standard Rust tool inventory.
.devcontainer/rust/Dockerfile Adds BUILD_EMBEDDED_FLAVOR gating for ARM targets and embedded tool installs/SBOM notes.
.devcontainer/embedded-rust/tool-inventory.json Introduces embedded Rust tool inventory allowlist (incl. probe-rs-tools/flip-link).
.devcontainer/embedded-rust/devcontainer.json Adds embedded Rust devcontainer definition building Rust Dockerfile with embedded flag enabled.
.devcontainer/embedded-rust/devcontainer-metadata.json Adds embedded Rust devcontainer metadata (extensions/env).
.devcontainer/embedded-rust-test/devcontainer.json Adds CI/test devcontainer referencing the published embedded Rust image.

Comment thread .github/workflows/build-push-test.yml
Comment thread test/embedded-rust/integration-tests.bats
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-docs:edgeghcr.io/philips-software/amp-devcontainer-docs:pr-1358

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 200.14 MB 200.14 MB +224 B (+0%) 🔼
linux/arm64 196.34 MB 196.34 MB 149 B (0%) 🔽

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-embedded-rust:edgeghcr.io/philips-software/amp-devcontainer-embedded-rust:pr-1358

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 0 B 469.03 MB +469.03 MB (+∞) 🔼
linux/arm64 0 B 419.8 MB +419.8 MB (+∞) 🔼

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-rust:edgeghcr.io/philips-software/amp-devcontainer-rust:pr-1358

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 468.82 MB 405.96 MB 62.87 MB (-13.41%) 🔽
linux/arm64 419.56 MB 357.53 MB 62.03 MB (-14.78%) 🔽

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-cpp:edgeghcr.io/philips-software/amp-devcontainer-cpp:pr-1358

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 372.07 MB 372.07 MB +1.28 kB (+0%) 🔼
linux/arm64 352.2 MB 352.2 MB +445 B (+0%) 🔼

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

📦 Container Size Analysis

Note

Comparing ghcr.io/philips-software/amp-devcontainer-embedded-cpp:edgeghcr.io/philips-software/amp-devcontainer-embedded-cpp:pr-1358

📈 Size Comparison Table

OS/Platform Previous Current Change Trend
linux/amd64 560.44 MB 560.44 MB 1.13 kB (0%) 🔽
linux/arm64 538.89 MB 538.89 MB +677 B (+0%) 🔼

@rjaegers Ron (rjaegers) temporarily deployed to acceptance-testing July 14, 2026 13:58 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Test Results

 25 files  +4   25 suites  +4   20m 0s ⏱️ -37s
 44 tests ±0   44 ✅ ±0  0 💤 ±0  0 ❌ ±0 
185 runs  ±0  185 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 17e1a4e. ± Comparison against base commit e074133.

♻️ This comment has been updated with latest results.

Comment thread .devcontainer/embedded-rust/devcontainer.json
Comment thread .devcontainer/embedded-rust/devcontainer-metadata.json Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 14:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 27 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/build-push-test.yml
Copilot AI review requested due to automatic review settings July 15, 2026 14:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 27 changed files in this pull request and generated 2 comments.

Comment thread .devcontainer/embedded-rust/devcontainer-metadata.json
Comment thread test/embedded-rust/integration-tests.bats
@rjaegers Ron (rjaegers) temporarily deployed to acceptance-testing July 15, 2026 15:03 — with GitHub Actions Inactive
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ron <45816308+rjaegers@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 15, 2026 15:11
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 27 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/build-push-test.yml
Comment thread test/embedded-rust/integration-tests.bats
@rjaegers Ron (rjaegers) deployed to acceptance-testing July 15, 2026 15:25 — with GitHub Actions Active
@rjaegers Ron (rjaegers) added this pull request to the merge queue Jul 15, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants