diff --git a/.clippy.toml b/.clippy.toml
index 17e23573..3926ecaf 100644
--- a/.clippy.toml
+++ b/.clippy.toml
@@ -1,20 +1,25 @@
-# Fixed clippy config
-warn-on-all-wildcard-imports = true
-doc-valid-idents = ["WebAssembly", "WASI"]
+# Clippy configuration for PulseEngine code quality
-# Lint configurations
-msrv = "1.86.0" # Minimum supported Rust version
+# Enforce documentation
+missing-docs-in-crate-items = true
-# Clippy is strict about the following lints
+# MSRV (Minimum Supported Rust Version)
+msrv = "1.75.0"
+
+# Cognitive complexity threshold
cognitive-complexity-threshold = 30
-type-complexity-threshold = 500
-too-many-arguments-threshold = 10
-too-many-lines-threshold = 500
-# Explicitly disallow some patterns
-disallowed-names = []
-disallowed-methods = []
-disallowed-types = []
+# Function size limits
+too-many-lines-threshold = 100
+
+# Type complexity
+type-complexity-threshold = 250
+
+# Disallowed names
+disallowed-names = ["foo", "bar", "baz", "quux"]
+
+# Allow some common patterns in no_std
+allow-expect-in-tests = true
+allow-unwrap-in-tests = true
-# Documentation checks
-missing-docs-in-crate-items = true # Instead of missing-docs-in-private-items
+# Note: undocumented-unsafe-blocks lint not available in current Rust version
\ No newline at end of file
diff --git a/.githooks/pre-commit b/.githooks/pre-commit
new file mode 100755
index 00000000..307706ec
--- /dev/null
+++ b/.githooks/pre-commit
@@ -0,0 +1,59 @@
+#!/bin/bash
+# Pre-commit hook to prevent test files in src/ directories
+
+# Colors for output
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[1;33m'
+NC='\033[0m' # No Color
+
+echo "๐ Checking for test files in src/ directories..."
+
+# Find all test files in src/ directories
+test_files=$(find . -path "./target" -prune -o -path "./.git" -prune -o -path "./src/*" -name "*_test.rs" -print -o -path "./src/*" -name "*_tests.rs" -print -o -path "./src/*" -name "test.rs" -print -o -path "./src/*" -name "tests.rs" -print | grep -v target | grep -v .git)
+
+if [ -n "$test_files" ]; then
+ echo -e "${RED}โ Error: Test files found in src/ directories!${NC}"
+ echo -e "${YELLOW}Test files should be placed in the tests/ directory, not in src/${NC}"
+ echo ""
+ echo "Found test files:"
+ echo "$test_files" | while read -r file; do
+ echo -e " ${RED}$file${NC}"
+ done
+ echo ""
+ echo "Please move these files to the appropriate tests/ directory before committing."
+ exit 1
+fi
+
+# Check if cargo-wrt is available
+if command -v cargo-wrt &> /dev/null; then
+ # Run validation check using cargo-wrt
+ echo "๐ Running cargo-wrt validation checks..."
+ if ! cargo-wrt validate --check-test-files; then
+ echo -e "${RED}โ Validation failed!${NC}"
+ exit 1
+ fi
+else
+ echo -e "${YELLOW}โ ๏ธ Warning: cargo-wrt not found. Install it for better validation:${NC}"
+ echo " cargo install --path cargo-wrt"
+fi
+
+echo -e "${GREEN}โ
No test files found in src/ directories${NC}"
+
+# Run cargo fmt check
+echo ""
+echo "๐ Checking code formatting with cargo fmt..."
+
+# Use the project's unified build tool for formatting check
+if ! cargo-wrt check --strict; then
+ echo -e "${RED}โ Error: Code formatting issues detected!${NC}"
+ echo ""
+ echo "Please run 'cargo-wrt check' or 'cargo fmt' to format your code before committing."
+ echo ""
+ echo "To bypass this check (not recommended), use:"
+ echo " git commit --no-verify"
+ exit 1
+fi
+
+echo -e "${GREEN}โ
Code formatting check passed${NC}"
+exit 0
\ No newline at end of file
diff --git a/.github/kani-badge.json b/.github/kani-badge.json
new file mode 100644
index 00000000..719215eb
--- /dev/null
+++ b/.github/kani-badge.json
@@ -0,0 +1,10 @@
+{
+ "schemaVersion": 1,
+ "label": "formal verification",
+ "message": "KANI",
+ "color": "brightgreen",
+ "namedLogo": "rust",
+ "logoColor": "white",
+ "style": "for-the-badge",
+ "cacheSeconds": 86400
+}
\ No newline at end of file
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fe2b9f50..4f6b6651 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,7 +22,7 @@ permissions:
env:
CARGO_TERM_COLOR: always
- # RUST_LOG: "info,xtask=debug,dagger_sdk=debug" # Optional: for more detailed Dagger logs
+ # RUST_LOG: "info,cargo_wrt=debug,dagger_sdk=debug" # Optional: for more detailed Dagger logs
jobs:
ci_checks_and_docs:
@@ -49,12 +49,15 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- toolchain: stable # Or match your rust-toolchain.toml for building xtask
+ toolchain: stable # Or match your rust-toolchain.toml for building cargo-wrt
override: true
- - name: Install xtask dependencies (if any, e.g. for xtask itself)
- run: cargo build --package xtask # Ensures xtask and its direct deps are built/cached
+ - name: Install and setup cargo-wrt with all tools
+ run: |
+ cargo build --package cargo-wrt # Ensures cargo-wrt and its direct deps are built/cached
+ cargo install --path cargo-wrt # Install cargo-wrt for use in subsequent steps
+ cargo-wrt setup --all # Setup all development tools automatically
- name: Run CI Integrity Checks (lint, fmt, deny, spell, headers, etc.)
- run: cargo xtask ci-integrity-checks
+ run: cargo-wrt verify --detailed
- name: Setup Java for PlantUML (if CheckDocsStrict Dagger pipeline needs it from host - unlikely)
uses: actions/setup-java@v4
if: false # Assuming Dagger pipeline for docs is self-contained
@@ -66,14 +69,39 @@ jobs:
run: |
sudo apt-get update && sudo apt-get install -y python3-pip plantuml
pip3 install -r docs/source/requirements.txt
- - name: Run Strict Documentation Check (Daggerized)
- run: cargo xtask check-docs-strict
+ - name: Run Strict Documentation Check
+ run: cargo-wrt docs --private
- name: Initialize Requirements File (if missing)
- run: cargo xtask init-requirements
+ run: cargo-wrt verify --asil c # Requirements initialization is handled automatically
- name: Run Requirements Verification
- run: cargo xtask verify-requirements
+ run: cargo-wrt verify --asil c --detailed
- name: Generate Safety Summary for Documentation
- run: cargo xtask generate-safety-summary
+ run: cargo-wrt verify --asil c --detailed # Safety summary is generated automatically
+
+ code_quality:
+ name: Code Quality Checks
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ override: true
+ components: rustfmt, clippy
+ - name: Install and setup cargo-wrt
+ run: |
+ cargo build --package cargo-wrt
+ cargo install --path cargo-wrt
+ cargo-wrt setup --check # Verify tools are available
+ - name: Check for test files in src/
+ run: cargo-wrt validate --check-test-files
+ - name: Check module documentation coverage
+ run: cargo-wrt validate --check-docs
+ - name: Check code formatting
+ run: cargo fmt --all -- --check
+ - name: Run clippy checks
+ run: cargo clippy --workspace --all-targets -- -D warnings
core_tests_and_analysis:
name: Core Tests, Analysis & Coverage
@@ -99,23 +127,28 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- toolchain: stable # For xtask. Nightly for UDeps should be handled IN Dagger.
+ toolchain: stable # For cargo-wrt. Nightly for UDeps should be handled internally.
override: true
components: llvm-tools-preview # For coverage
- - name: Install xtask dependencies
- run: cargo build --package xtask
- - name: Run Tests (Daggerized)
- run: cargo xtask run-tests
- - name: Check Unused Dependencies (Daggerized, uses Nightly internally)
- run: cargo xtask UDeps
- - name: Run Security Audit (Daggerized)
- run: cargo xtask SecurityAudit
- - name: Run Coverage Tests (Daggerized)
- run: cargo xtask Coverage # This xtask should produce lcov.info and junit.xml
+ - name: Install and setup cargo-wrt with tools
+ run: |
+ cargo build --package cargo-wrt
+ cargo install --path cargo-wrt
+ cargo-wrt setup --all # Setup all required tools for testing and analysis
+ - name: Run Tests
+ run: cargo-wrt test
+ - name: Run Code Validation Checks
+ run: cargo-wrt validate --all
+ - name: Check Unused Dependencies
+ run: cargo-wrt check --strict
+ - name: Run Security Audit
+ run: cargo-wrt verify --asil c
+ - name: Run Coverage Tests
+ run: cargo-wrt coverage --html # This should produce lcov.info and junit.xml
- name: Run Basic Safety Checks
run: |
cargo test -p wrt-foundation asil_testing -- --nocapture || true
- cargo xtask check-requirements || cargo xtask init-requirements
+ cargo-wrt verify --asil c || true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
@@ -152,23 +185,26 @@ jobs:
profile: minimal
toolchain: stable
override: true
- - name: Install xtask dependencies
- run: cargo build --package xtask
+ - name: Install and setup cargo-wrt for safety verification
+ run: |
+ cargo build --package cargo-wrt
+ cargo install --path cargo-wrt
+ cargo-wrt setup --check # Verify required tools for safety verification
- name: Check Requirements File
- run: cargo xtask check-requirements
+ run: cargo-wrt verify --asil c
continue-on-error: true
- name: Initialize Requirements if Missing
- run: cargo xtask init-requirements
+ run: cargo-wrt verify --asil c # Requirements are initialized automatically
if: failure() # Only run if check-requirements failed
- name: Run ASIL Test Suite
run: cargo test -p wrt-foundation asil_testing -- --nocapture
continue-on-error: true
- name: Generate Comprehensive Safety Report (JSON)
- run: cargo xtask safety-report --format json --output safety-verification-full.json
+ run: cargo-wrt verify --asil d --detailed > safety-verification-full.json
- name: Generate Comprehensive Safety Report (HTML)
- run: cargo xtask safety-report --format html --output safety-verification-report.html
+ run: cargo-wrt verify --asil d --detailed # HTML report generated automatically
- name: Generate Safety Dashboard
- run: cargo xtask safety-dashboard
+ run: cargo-wrt verify --asil d --detailed # Dashboard included in detailed verification
- name: Upload Safety Artifacts
uses: actions/upload-artifact@v4
with:
@@ -179,7 +215,7 @@ jobs:
docs/source/_generated_safety_summary.rst
retention-days: 90
- name: Safety Verification Gate
- run: cargo xtask ci-safety --threshold 70.0 --fail-on-safety-issues --json-output
+ run: cargo-wrt verify --asil d
extended_static_analysis:
name: Extended Static Analysis (Miri, Kani)
@@ -208,20 +244,21 @@ jobs:
with:
profile: minimal
# Kani/Miri might need nightly or specific stable. Adjust as needed.
- # The Daggerized xtask should ideally manage this internally.
- toolchain: stable # Or nightly if Kani/Miri need it directly for xtask compilation
+ # The cargo-wrt should ideally manage this internally.
+ toolchain: stable # Or nightly if Kani/Miri need it directly for cargo-wrt compilation
override: true
- # Add components if they can be installed via rustup and xtask doesn't handle it
+ # Add components if they can be installed via rustup and cargo-wrt doesn't handle it
# components: miri, kani # (kani might need manual install steps)
- - name: Install xtask dependencies
- run: cargo build --package xtask
- # Ensure you have `RunMiriChecks` and `RunKaniChecks` Daggerized xtask commands
- - name: Run Miri Checks (Daggerized)
- run: cargo xtask RunMiriChecks
- - name: Run Kani Checks (Daggerized)
- # Kani setup can be complex, ensure Dagger pipeline handles it.
- # May require installing Kani Verifier if not a rustup component.
- run: cargo xtask RunKaniChecks
+ - name: Install and setup cargo-wrt for extended analysis
+ run: |
+ cargo build --package cargo-wrt
+ cargo install --path cargo-wrt
+ cargo-wrt setup --all # Setup all tools including Kani and Miri
+ # Run advanced static analysis
+ - name: Run Miri Checks
+ run: cargo-wrt verify --asil d --no-kani
+ - name: Run Kani Checks
+ run: cargo-wrt kani-verify --asil-profile d --verbose
# Coverage job is still Linux-only as tarpaulin only supports Linux
coverage:
@@ -241,28 +278,15 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- - name: Check if just is available
- id: check-just
- run: |
- if command -v just &> /dev/null; then
- echo "JUST_INSTALLED=true" >> $GITHUB_ENV
- echo "Just is already installed"
- else
- echo "JUST_INSTALLED=false" >> $GITHUB_ENV
- echo "Just needs to be installed"
- fi
- - name: Install just
- if: env.JUST_INSTALLED != 'true'
- run: cargo install just --locked
- name: Setup Rust targets
- run: just setup-rust-targets
+ run: rustup target add wasm32-unknown-unknown wasm32-wasip1 wasm32-wasip2 || true
- name: Run coverage tests
- run: just coverage
+ run: cargo-wrt coverage --html
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- file: target/coverage/lcov.info
+ file: target/llvm-cov/lcov.info
fail_ci_if_error: false
audit:
diff --git a/.github/workflows/kani-verification.yml b/.github/workflows/kani-verification.yml
new file mode 100644
index 00000000..bc381eff
--- /dev/null
+++ b/.github/workflows/kani-verification.yml
@@ -0,0 +1,300 @@
+name: Formal Verification with KANI
+
+on:
+ push:
+ branches: [ main, develop ]
+ paths:
+ - '**.rs'
+ - '**/Cargo.toml'
+ - '**/Kani.toml'
+ - '.github/workflows/kani-verification.yml'
+ pull_request:
+ branches: [ main, develop ]
+ paths:
+ - '**.rs'
+ - '**/Cargo.toml'
+ - '**/Kani.toml'
+ - '.github/workflows/kani-verification.yml'
+ schedule:
+ # Run weekly verification on Sunday at 2 AM UTC
+ - cron: '0 2 * * 0'
+ workflow_dispatch:
+ inputs:
+ asil_level:
+ description: 'ASIL verification level'
+ required: true
+ default: 'c'
+ type: choice
+ options:
+ - a
+ - b
+ - c
+ - d
+ package:
+ description: 'Specific package to verify (optional)'
+ required: false
+ default: ''
+
+env:
+ RUST_BACKTRACE: 1
+ CARGO_TERM_COLOR: always
+
+jobs:
+ # Quick verification for all PRs
+ quick-verification:
+ name: Quick Verification (ASIL-A)
+ runs-on: ubuntu-latest
+ if: github.event_name == 'pull_request'
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: nightly-2024-01-01
+ components: rust-src
+
+ - name: Cache Cargo
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/git/db/
+ target/
+ key: ${{ runner.os }}-cargo-kani-${{ hashFiles('**/Cargo.lock') }}
+
+ - name: Install and setup cargo-wrt with Kani
+ run: |
+ cargo build --package cargo-wrt
+ cargo install --path cargo-wrt --force
+ cargo-wrt setup --all # Setup all tools including Kani automatically
+
+ - name: Verify tool setup
+ run: cargo-wrt setup --check
+
+ - name: Run Quick Verification
+ run: |
+ cargo-wrt kani-verify --asil-profile a --package wrt-integration-tests
+ continue-on-error: true
+
+ - name: Upload Quick Report
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: kani-quick-report
+ path: target/kani-reports/verification_report_*.md
+
+ # Matrix verification for different ASIL levels and packages
+ matrix-verification:
+ name: Verify ${{ matrix.package }} @ ${{ matrix.asil }}
+ runs-on: ubuntu-latest
+ if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
+ strategy:
+ fail-fast: false
+ matrix:
+ asil: [b, c]
+ package:
+ - wrt-foundation
+ - wrt-component
+ - wrt-sync
+ - wrt-integration-tests
+ include:
+ # Add ASIL-D verification for critical packages only
+ - asil: d
+ package: wrt-integration-tests
+ - asil: d
+ package: wrt-foundation
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: nightly-2024-01-01
+ components: rust-src
+
+ - name: Cache Cargo
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/git/db/
+ target/
+ key: ${{ runner.os }}-cargo-kani-${{ matrix.package }}-${{ hashFiles('**/Cargo.lock') }}
+
+ - name: Install and setup cargo-wrt with Kani
+ run: |
+ cargo build --package cargo-wrt
+ cargo install --path cargo-wrt --force
+ cargo-wrt setup --all # Setup all tools including Kani automatically
+
+ - name: Verify tool setup
+ run: cargo-wrt setup --check
+
+ - name: Run Verification
+ run: |
+ cargo-wrt kani-verify --asil-profile ${{ matrix.asil }} --package ${{ matrix.package }}
+ timeout-minutes: 30
+
+ - name: Upload Verification Report
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: kani-report-${{ matrix.package }}-${{ matrix.asil }}
+ path: target/kani-reports/
+
+ - name: Check for Failures
+ if: failure()
+ run: |
+ echo "::error::Formal verification failed for ${{ matrix.package }} at ${{ matrix.asil }} level"
+ cat target/kani-reports/verification_report_*.md
+
+ # Comprehensive verification for main branch
+ comprehensive-verification:
+ name: Comprehensive Verification (All Packages)
+ runs-on: ubuntu-latest
+ if: github.ref == 'refs/heads/main' || github.event_name == 'schedule'
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: nightly-2024-01-01
+ components: rust-src
+
+ - name: Cache Cargo
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/git/db/
+ target/
+ key: ${{ runner.os }}-cargo-kani-comprehensive-${{ hashFiles('**/Cargo.lock') }}
+
+ - name: Install and setup cargo-wrt with Kani
+ run: |
+ cargo build --package cargo-wrt
+ cargo install --path cargo-wrt --force
+ cargo-wrt setup --all # Setup all tools including Kani automatically
+
+ - name: Verify tool setup
+ run: cargo-wrt setup --check
+
+ - name: Run Comprehensive Verification
+ run: |
+ ASIL_LEVEL="${{ github.event.inputs.asil_level || 'c' }}"
+ PACKAGE="${{ github.event.inputs.package || '' }}"
+
+ if [ -n "$PACKAGE" ]; then
+ cargo-wrt kani-verify --asil-profile $ASIL_LEVEL --package $PACKAGE --verbose
+ else
+ cargo-wrt kani-verify --asil-profile $ASIL_LEVEL --verbose
+ fi
+ timeout-minutes: 60
+
+ - name: Generate Coverage Report
+ if: github.event.inputs.asil_level == 'asil-d' || github.event_name == 'schedule'
+ run: |
+ echo "## Coverage Report" >> target/kani-reports/coverage_summary.md
+ echo "" >> target/kani-reports/coverage_summary.md
+ if [ -f target/kani-reports/coverage_*.txt ]; then
+ cat target/kani-reports/coverage_*.txt >> target/kani-reports/coverage_summary.md
+ else
+ echo "No coverage data available" >> target/kani-reports/coverage_summary.md
+ fi
+ continue-on-error: true
+
+ - name: Upload Comprehensive Report
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: kani-comprehensive-report
+ path: target/kani-reports/
+
+ - name: Comment PR with Results
+ if: github.event_name == 'pull_request'
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const fs = require('fs');
+ const reportPath = 'target/kani-reports/verification_report_*.md';
+ const reports = require('glob').sync(reportPath);
+
+ if (reports.length > 0) {
+ const content = fs.readFileSync(reports[0], 'utf8');
+
+ // Extract summary
+ const summaryMatch = content.match(/## Summary[\s\S]*?##/);
+ const summary = summaryMatch ? summaryMatch[0] : 'Verification completed.';
+
+ github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: `## ๐ KANI Formal Verification Results\n\n${summary}\n\n[Full Report](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})`
+ });
+ }
+
+ # Summary job to ensure all verifications passed
+ verification-summary:
+ name: Verification Summary
+ runs-on: ubuntu-latest
+ needs: [quick-verification, matrix-verification]
+ if: always()
+ steps:
+ - name: Check Verification Results
+ run: |
+ if [ "${{ needs.quick-verification.result }}" == "failure" ] ||
+ [ "${{ needs.matrix-verification.result }}" == "failure" ]; then
+ echo "::error::One or more verification jobs failed"
+ exit 1
+ fi
+ echo "โ
All verification jobs completed successfully"
+
+ - name: Download All Reports
+ uses: actions/download-artifact@v4
+ with:
+ pattern: kani-report-*
+ merge-multiple: true
+
+ - name: Generate Summary Report
+ run: |
+ echo "# KANI Verification Summary" > summary.md
+ echo "" >> summary.md
+ echo "**Date**: $(date)" >> summary.md
+ echo "**Commit**: ${{ github.sha }}" >> summary.md
+ echo "" >> summary.md
+
+ # Count successes and failures
+ TOTAL=$(find . -name "verification_report_*.md" | wc -l)
+ PASSED=$(grep -l "โ
PASSED" verification_report_*.md 2>/dev/null | wc -l || echo 0)
+ FAILED=$((TOTAL - PASSED))
+
+ echo "## Results" >> summary.md
+ echo "- Total Packages Verified: $TOTAL" >> summary.md
+ echo "- Passed: $PASSED" >> summary.md
+ echo "- Failed: $FAILED" >> summary.md
+ echo "" >> summary.md
+
+ if [ $FAILED -gt 0 ]; then
+ echo "## Failed Verifications" >> summary.md
+ grep -l "โ FAILED" verification_report_*.md | while read report; do
+ echo "- $(basename $report)" >> summary.md
+ done
+ fi
+
+ cat summary.md
+
+ - name: Upload Summary
+ uses: actions/upload-artifact@v4
+ with:
+ name: verification-summary
+ path: summary.md
\ No newline at end of file
diff --git a/.github/workflows/pr-diagnostics.yml b/.github/workflows/pr-diagnostics.yml
new file mode 100644
index 00000000..96170b95
--- /dev/null
+++ b/.github/workflows/pr-diagnostics.yml
@@ -0,0 +1,441 @@
+name: PR Diagnostic Analysis
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ pull-requests: write
+ checks: write
+
+jobs:
+ diagnostic-analysis:
+ name: Analyze Build Diagnostics
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout PR
+ uses: actions/checkout@v4
+ with:
+ # Fetch full history for diff analysis
+ fetch-depth: 0
+
+ - name: Setup Rust
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ components: clippy, rustfmt
+
+ - name: Cache cargo registry
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ target
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-cargo-
+
+ - name: Install cargo-wrt
+ run: |
+ cargo install --path cargo-wrt --force
+
+ - name: Get base branch diagnostics
+ id: base-diagnostics
+ run: |
+ # Checkout base branch to get baseline
+ git checkout ${{ github.event.pull_request.base.sha }}
+
+ # Run analysis on base branch
+ cargo-wrt build --output json --cache --clear-cache > base-diagnostics.json || true
+ cargo-wrt check --output json --cache > base-check.json || true
+
+ # Store baseline
+ cp base-diagnostics.json baseline-build.json
+ cp base-check.json baseline-check.json
+
+ echo "base_errors=$(jq '.summary.errors' baseline-build.json)" >> $GITHUB_OUTPUT
+ echo "base_warnings=$(jq '.summary.warnings' baseline-build.json)" >> $GITHUB_OUTPUT
+
+ - name: Return to PR branch
+ run: |
+ git checkout ${{ github.event.pull_request.head.sha }}
+
+ - name: Analyze PR diagnostics
+ id: pr-diagnostics
+ run: |
+ # Run full analysis on PR branch
+ cargo-wrt build --output json --cache --clear-cache > pr-diagnostics.json || true
+ cargo-wrt check --output json --cache > pr-check.json || true
+
+ # Extract metrics
+ PR_ERRORS=$(jq '.summary.errors' pr-diagnostics.json)
+ PR_WARNINGS=$(jq '.summary.warnings' pr-diagnostics.json)
+
+ echo "pr_errors=$PR_ERRORS" >> $GITHUB_OUTPUT
+ echo "pr_warnings=$PR_WARNINGS" >> $GITHUB_OUTPUT
+
+ # Calculate differences
+ BASE_ERRORS=${{ steps.base-diagnostics.outputs.base_errors }}
+ BASE_WARNINGS=${{ steps.base-diagnostics.outputs.base_warnings }}
+
+ ERROR_DIFF=$((PR_ERRORS - BASE_ERRORS))
+ WARNING_DIFF=$((PR_WARNINGS - BASE_WARNINGS))
+
+ echo "error_diff=$ERROR_DIFF" >> $GITHUB_OUTPUT
+ echo "warning_diff=$WARNING_DIFF" >> $GITHUB_OUTPUT
+
+ - name: Generate diff analysis
+ id: diff-analysis
+ run: |
+ # Create a comprehensive script to analyze PR impact
+ cat > analyze_pr_changes.py << 'EOF'
+ import json
+ import subprocess
+ import sys
+
+ def get_changed_files():
+ """Get list of files changed in this PR"""
+ result = subprocess.run([
+ 'git', 'diff', '--name-only',
+ '${{ github.event.pull_request.base.sha }}..HEAD'
+ ], capture_output=True, text=True)
+ return result.stdout.strip().split('\n') if result.stdout.strip() else []
+
+ def load_diagnostics(file_path):
+ """Load diagnostics from JSON file"""
+ try:
+ with open(file_path, 'r') as f:
+ data = json.load(f)
+ return data.get('diagnostics', [])
+ except (FileNotFoundError, json.JSONDecodeError):
+ return []
+
+ def create_diagnostic_key(diag):
+ """Create a unique key for diagnostic comparison"""
+ return f"{diag['file']}:{diag['range']['start']['line']}:{diag['range']['start']['character']}:{diag['severity']}:{diag.get('code', 'no-code')}"
+
+ def analyze_pr_impact(base_diagnostics, pr_diagnostics, changed_files):
+ """Analyze the impact of PR changes"""
+ # Create sets for comparison
+ base_diag_keys = {create_diagnostic_key(d): d for d in base_diagnostics}
+ pr_diag_keys = {create_diagnostic_key(d): d for d in pr_diagnostics}
+
+ # Find new diagnostics (in PR but not in base)
+ new_diagnostic_keys = set(pr_diag_keys.keys()) - set(base_diag_keys.keys())
+ new_diagnostics = [pr_diag_keys[key] for key in new_diagnostic_keys]
+
+ # Categorize new diagnostics
+ new_in_changed_files = []
+ new_in_unchanged_files = []
+
+ for diag in new_diagnostics:
+ file_path = diag['file']
+ if any(file_path.startswith(changed_file) for changed_file in changed_files):
+ new_in_changed_files.append(diag)
+ else:
+ new_in_unchanged_files.append(diag)
+
+ # Also get all diagnostics in changed files (for existing error context)
+ all_in_changed_files = []
+ for diag in pr_diagnostics:
+ file_path = diag['file']
+ if any(file_path.startswith(changed_file) for changed_file in changed_files):
+ all_in_changed_files.append(diag)
+
+ return {
+ 'new_in_changed_files': new_in_changed_files,
+ 'new_in_unchanged_files': new_in_unchanged_files,
+ 'all_in_changed_files': all_in_changed_files,
+ 'summary': {
+ 'new_errors_changed_files': len([d for d in new_in_changed_files if d['severity'] == 'error']),
+ 'new_warnings_changed_files': len([d for d in new_in_changed_files if d['severity'] == 'warning']),
+ 'new_errors_unchanged_files': len([d for d in new_in_unchanged_files if d['severity'] == 'error']),
+ 'new_warnings_unchanged_files': len([d for d in new_in_unchanged_files if d['severity'] == 'warning']),
+ 'total_errors_changed_files': len([d for d in all_in_changed_files if d['severity'] == 'error']),
+ 'total_warnings_changed_files': len([d for d in all_in_changed_files if d['severity'] == 'warning']),
+ 'changed_files_affected': len(set(d['file'] for d in all_in_changed_files)),
+ 'unchanged_files_affected': len(set(d['file'] for d in new_in_unchanged_files)),
+ }
+ }
+
+ # Get changed files
+ changed_files = get_changed_files()
+ print(f"Changed files: {changed_files}")
+
+ # Load diagnostics
+ base_diagnostics = load_diagnostics('baseline-build.json')
+ pr_diagnostics = load_diagnostics('pr-diagnostics.json')
+
+ print(f"Base diagnostics: {len(base_diagnostics)}")
+ print(f"PR diagnostics: {len(pr_diagnostics)}")
+
+ # Analyze impact
+ analysis = analyze_pr_impact(base_diagnostics, pr_diagnostics, changed_files)
+
+ # Save detailed results
+ with open('pr-impact-analysis.json', 'w') as f:
+ json.dump(analysis, f, indent=2)
+
+ # Also save the legacy format for backward compatibility
+ legacy_format = {
+ 'diagnostics': analysis['all_in_changed_files'],
+ 'summary': {
+ 'total': len(analysis['all_in_changed_files']),
+ 'errors': analysis['summary']['total_errors_changed_files'],
+ 'warnings': analysis['summary']['total_warnings_changed_files'],
+ 'files_affected': analysis['summary']['changed_files_affected']
+ }
+ }
+
+ with open('pr-changed-diagnostics.json', 'w') as f:
+ json.dump(legacy_format, f, indent=2)
+
+ print(f"Analysis summary: {analysis['summary']}")
+ EOF
+
+ python analyze_pr_changes.py
+
+ # Store detailed analysis results
+ NEW_ERRORS_CHANGED=$(jq '.summary.new_errors_changed_files' pr-impact-analysis.json)
+ NEW_WARNINGS_CHANGED=$(jq '.summary.new_warnings_changed_files' pr-impact-analysis.json)
+ NEW_ERRORS_UNCHANGED=$(jq '.summary.new_errors_unchanged_files' pr-impact-analysis.json)
+ NEW_WARNINGS_UNCHANGED=$(jq '.summary.new_warnings_unchanged_files' pr-impact-analysis.json)
+ TOTAL_ERRORS_CHANGED=$(jq '.summary.total_errors_changed_files' pr-impact-analysis.json)
+ TOTAL_WARNINGS_CHANGED=$(jq '.summary.total_warnings_changed_files' pr-impact-analysis.json)
+ CHANGED_FILES_AFFECTED=$(jq '.summary.changed_files_affected' pr-impact-analysis.json)
+ UNCHANGED_FILES_AFFECTED=$(jq '.summary.unchanged_files_affected' pr-impact-analysis.json)
+
+ echo "new_errors_changed=$NEW_ERRORS_CHANGED" >> $GITHUB_OUTPUT
+ echo "new_warnings_changed=$NEW_WARNINGS_CHANGED" >> $GITHUB_OUTPUT
+ echo "new_errors_unchanged=$NEW_ERRORS_UNCHANGED" >> $GITHUB_OUTPUT
+ echo "new_warnings_unchanged=$NEW_WARNINGS_UNCHANGED" >> $GITHUB_OUTPUT
+ echo "total_errors_changed=$TOTAL_ERRORS_CHANGED" >> $GITHUB_OUTPUT
+ echo "total_warnings_changed=$TOTAL_WARNINGS_CHANGED" >> $GITHUB_OUTPUT
+ echo "changed_files_affected=$CHANGED_FILES_AFFECTED" >> $GITHUB_OUTPUT
+ echo "unchanged_files_affected=$UNCHANGED_FILES_AFFECTED" >> $GITHUB_OUTPUT
+
+ # Legacy outputs for backward compatibility
+ echo "changed_errors=$TOTAL_ERRORS_CHANGED" >> $GITHUB_OUTPUT
+ echo "changed_warnings=$TOTAL_WARNINGS_CHANGED" >> $GITHUB_OUTPUT
+ echo "files_affected=$CHANGED_FILES_AFFECTED" >> $GITHUB_OUTPUT
+
+ - name: Generate PR comment
+ id: generate-comment
+ run: |
+ cat > pr_comment.md << EOF
+ ## ๐ Build Diagnostics Report
+
+ ### Summary
+ | Metric | Base Branch | This PR | Change |
+ |--------|-------------|---------|---------|
+ | **Errors** | ${{ steps.base-diagnostics.outputs.base_errors }} | ${{ steps.pr-diagnostics.outputs.pr_errors }} | **${{ steps.pr-diagnostics.outputs.error_diff }}** |
+ | **Warnings** | ${{ steps.base-diagnostics.outputs.base_warnings }} | ${{ steps.pr-diagnostics.outputs.pr_warnings }} | **${{ steps.pr-diagnostics.outputs.warning_diff }}** |
+
+ ### ๐ฏ Impact Analysis
+
+ #### Issues in Files You Modified
+ - **${{ steps.diff-analysis.outputs.new_errors_changed }}** new errors introduced by your changes
+ - **${{ steps.diff-analysis.outputs.new_warnings_changed }}** new warnings introduced by your changes
+ - **${{ steps.diff-analysis.outputs.total_errors_changed }}** total errors in modified files
+ - **${{ steps.diff-analysis.outputs.total_warnings_changed }}** total warnings in modified files
+ - **${{ steps.diff-analysis.outputs.changed_files_affected }}** files you modified
+
+ #### Cascading Issues (Your Changes Breaking Other Files)
+ - **${{ steps.diff-analysis.outputs.new_errors_unchanged }}** new errors in unchanged files
+ - **${{ steps.diff-analysis.outputs.new_warnings_unchanged }}** new warnings in unchanged files
+ - **${{ steps.diff-analysis.outputs.unchanged_files_affected }}** unchanged files now affected
+
+ > **Note**: "Cascading issues" are errors in files you didn't modify, caused by your changes (e.g., breaking API changes, dependency issues).
+
+ EOF
+
+ # Add error details if there are errors in changed files
+ if [ "${{ steps.diff-analysis.outputs.changed_errors }}" -gt 0 ]; then
+ echo "### โ Errors in Modified Files" >> pr_comment.md
+ echo "" >> pr_comment.md
+
+ # Extract errors and format them
+ jq -r '.diagnostics[] | select(.severity == "error") | "**\(.file):\(.range.start.line + 1):\(.range.start.character + 1)** - \(.message) (\(.code // "no-code"))"' pr-changed-diagnostics.json | head -10 >> pr_comment.md
+
+ if [ "$(jq '.diagnostics | map(select(.severity == "error")) | length' pr-changed-diagnostics.json)" -gt 10 ]; then
+ echo "" >> pr_comment.md
+ echo "_... and $(( $(jq '.diagnostics | map(select(.severity == "error")) | length' pr-changed-diagnostics.json) - 10 )) more errors_" >> pr_comment.md
+ fi
+ fi
+
+ # Add warning details if there are warnings in changed files
+ if [ "${{ steps.diff-analysis.outputs.changed_warnings }}" -gt 0 ]; then
+ echo "" >> pr_comment.md
+ echo "### โ ๏ธ Warnings in Modified Files" >> pr_comment.md
+ echo "" >> pr_comment.md
+
+ # Extract warnings and format them
+ jq -r '.diagnostics[] | select(.severity == "warning") | "**\(.file):\(.range.start.line + 1):\(.range.start.character + 1)** - \(.message) (\(.code // "no-code"))"' pr-changed-diagnostics.json | head -5 >> pr_comment.md
+
+ if [ "$(jq '.diagnostics | map(select(.severity == "warning")) | length' pr-changed-diagnostics.json)" -gt 5 ]; then
+ echo "" >> pr_comment.md
+ echo "_... and $(( $(jq '.diagnostics | map(select(.severity == "warning")) | length' pr-changed-diagnostics.json) - 5 )) more warnings_" >> pr_comment.md
+ fi
+ fi
+
+ # Add cascading errors section
+ if [ "${{ steps.diff-analysis.outputs.new_errors_unchanged }}" -gt 0 ]; then
+ echo "" >> pr_comment.md
+ echo "### ๐ฅ Cascading Errors (Your Changes Breaking Other Files)" >> pr_comment.md
+ echo "" >> pr_comment.md
+ echo "These errors are in files you didn't modify, but were caused by your changes:" >> pr_comment.md
+ echo "" >> pr_comment.md
+
+ # Extract cascading errors
+ jq -r '.new_in_unchanged_files[] | select(.severity == "error") | "**\(.file):\(.range.start.line + 1):\(.range.start.character + 1)** - \(.message) (\(.code // "no-code"))"' pr-impact-analysis.json | head -10 >> pr_comment.md
+
+ if [ "$(jq '.new_in_unchanged_files | map(select(.severity == "error")) | length' pr-impact-analysis.json)" -gt 10 ]; then
+ echo "" >> pr_comment.md
+ echo "_... and $(( $(jq '.new_in_unchanged_files | map(select(.severity == "error")) | length' pr-impact-analysis.json) - 10 )) more cascading errors_" >> pr_comment.md
+ fi
+ fi
+
+ # Add cascading warnings section
+ if [ "${{ steps.diff-analysis.outputs.new_warnings_unchanged }}" -gt 0 ]; then
+ echo "" >> pr_comment.md
+ echo "### โ ๏ธ Cascading Warnings (Your Changes Affecting Other Files)" >> pr_comment.md
+ echo "" >> pr_comment.md
+ echo "These warnings are in files you didn't modify:" >> pr_comment.md
+ echo "" >> pr_comment.md
+
+ # Extract cascading warnings
+ jq -r '.new_in_unchanged_files[] | select(.severity == "warning") | "**\(.file):\(.range.start.line + 1):\(.range.start.character + 1)** - \(.message) (\(.code // "no-code"))"' pr-impact-analysis.json | head -5 >> pr_comment.md
+
+ if [ "$(jq '.new_in_unchanged_files | map(select(.severity == "warning")) | length' pr-impact-analysis.json)" -gt 5 ]; then
+ echo "" >> pr_comment.md
+ echo "_... and $(( $(jq '.new_in_unchanged_files | map(select(.severity == "warning")) | length' pr-impact-analysis.json) - 5 )) more cascading warnings_" >> pr_comment.md
+ fi
+ fi
+
+ # Add success message if no issues at all
+ if [ "${{ steps.diff-analysis.outputs.total_errors_changed }}" -eq 0 ] && [ "${{ steps.diff-analysis.outputs.total_warnings_changed }}" -eq 0 ] && [ "${{ steps.diff-analysis.outputs.new_errors_unchanged }}" -eq 0 ] && [ "${{ steps.diff-analysis.outputs.new_warnings_unchanged }}" -eq 0 ]; then
+ echo "" >> pr_comment.md
+ echo "### โ
No Issues Detected" >> pr_comment.md
+ echo "Perfect! Your changes don't introduce any new errors or warnings, and don't break any existing code." >> pr_comment.md
+ elif [ "${{ steps.diff-analysis.outputs.new_errors_unchanged }}" -eq 0 ] && [ "${{ steps.diff-analysis.outputs.new_warnings_unchanged }}" -eq 0 ]; then
+ echo "" >> pr_comment.md
+ echo "### โ
No Cascading Issues" >> pr_comment.md
+ echo "Good! Your changes don't break any existing code in other files." >> pr_comment.md
+ fi
+
+ # Add detailed analysis info
+ echo "" >> pr_comment.md
+ echo "---" >> pr_comment.md
+ echo "" >> pr_comment.md
+ echo "๐ **Full diagnostic data available in workflow artifacts**" >> pr_comment.md
+ echo "" >> pr_comment.md
+ echo "๐ง **To reproduce locally:**" >> pr_comment.md
+ echo '```bash' >> pr_comment.md
+ echo "# Install cargo-wrt" >> pr_comment.md
+ echo "cargo install --path cargo-wrt" >> pr_comment.md
+ echo "" >> pr_comment.md
+ echo "# Analyze your changes" >> pr_comment.md
+ echo "cargo-wrt build --output json --filter-severity error" >> pr_comment.md
+ echo "cargo-wrt check --output json --filter-severity warning" >> pr_comment.md
+ echo '```' >> pr_comment.md
+
+ - name: Upload diagnostic artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: pr-diagnostics
+ path: |
+ pr-diagnostics.json
+ pr-check.json
+ pr-changed-diagnostics.json
+ pr-impact-analysis.json
+ baseline-build.json
+ baseline-check.json
+ retention-days: 30
+
+ - name: Comment on PR
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const fs = require('fs');
+ const comment = fs.readFileSync('pr_comment.md', 'utf8');
+
+ // Check if we already have a comment from this workflow
+ const { data: comments } = await github.rest.issues.listComments({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ });
+
+ const botComment = comments.find(comment =>
+ comment.user.type === 'Bot' &&
+ comment.body.includes('๐ Build Diagnostics Report')
+ );
+
+ if (botComment) {
+ // Update existing comment
+ await github.rest.issues.updateComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ comment_id: botComment.id,
+ body: comment
+ });
+ } else {
+ // Create new comment
+ await github.rest.issues.createComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ body: comment
+ });
+ }
+
+ - name: Set check status
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const errorsChanged = ${{ steps.diff-analysis.outputs.new_errors_changed }};
+ const warningsChanged = ${{ steps.diff-analysis.outputs.new_warnings_changed }};
+ const errorsUnchanged = ${{ steps.diff-analysis.outputs.new_errors_unchanged }};
+ const warningsUnchanged = ${{ steps.diff-analysis.outputs.new_warnings_unchanged }};
+
+ const totalNewErrors = errorsChanged + errorsUnchanged;
+ const totalNewWarnings = warningsChanged + warningsUnchanged;
+
+ let conclusion = 'success';
+ let title = 'โ
No build issues introduced';
+ let summary = 'Your changes don\'t introduce any new build errors or warnings.';
+
+ if (totalNewErrors > 0) {
+ conclusion = 'failure';
+ const cascadingInfo = errorsUnchanged > 0 ? ` (including ${errorsUnchanged} cascading errors)` : '';
+ title = `โ ${totalNewErrors} new error(s)${cascadingInfo}`;
+ summary = `Your changes introduce ${totalNewErrors} new error(s) that need to be fixed.`;
+ if (errorsUnchanged > 0) {
+ summary += ` ${errorsUnchanged} of these are in files you didn't modify (cascading errors).`;
+ }
+ } else if (totalNewWarnings > 0) {
+ conclusion = 'neutral';
+ const cascadingInfo = warningsUnchanged > 0 ? ` (including ${warningsUnchanged} cascading warnings)` : '';
+ title = `โ ๏ธ ${totalNewWarnings} new warning(s)${cascadingInfo}`;
+ summary = `Your changes introduce ${totalNewWarnings} new warning(s) that should be reviewed.`;
+ if (warningsUnchanged > 0) {
+ summary += ` ${warningsUnchanged} of these are in files you didn't modify.`;
+ }
+ }
+
+ await github.rest.checks.create({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ name: 'Build Diagnostics',
+ head_sha: context.sha,
+ status: 'completed',
+ conclusion: conclusion,
+ output: {
+ title: title,
+ summary: summary,
+ text: `Errors: ${totalNewErrors}\nWarnings: ${totalNewWarnings}\n\nSee PR comments for detailed breakdown.`
+ }
+ });
\ No newline at end of file
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 7ca880a3..6703a907 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -104,21 +104,23 @@ jobs:
fi
# If VERSIONS_TO_PASS can contain multiple space-separated versions (e.g. from input), ensure uniqueness.
- # The xtask expects space-separated versions.
+ # The cargo-wrt expects space-separated versions.
UNIQUE_VERSIONS=$(echo "$VERSIONS_TO_PASS" | xargs -n1 | sort -u | xargs)
echo "VERSIONS_TO_BUILD=$UNIQUE_VERSIONS" >> $GITHUB_ENV
- echo "Final list of versions to build for xtask: $UNIQUE_VERSIONS"
+ echo "Final list of versions to build for cargo-wrt: $UNIQUE_VERSIONS"
- name: Generate code coverage for documentation
run: |
echo "Generating code coverage for documentation inclusion"
- # Ensure xtask is compiled
- cargo build --package xtask
+ # Ensure cargo-wrt is compiled and installed
+ cargo build --package cargo-wrt
+ cargo install --path cargo-wrt --force
# Add Dagger to PATH
export PATH="$HOME/.dagger/bin:$(pwd)/bin:$PATH"
echo $PATH
- # Run quick coverage analysis to generate coverage.json for docs
- ./target/debug/xtask coverage
+ # Run coverage analysis in best-effort mode for documentation
+ echo "Running coverage analysis in best-effort mode..."
+ cargo-wrt coverage --html --best-effort
env:
RUST_LOG: info
RUST_BACKTRACE: 1
@@ -128,11 +130,11 @@ jobs:
# CI environment flag
CI: true
- - name: Build documentation via Dagger and xtask
+ - name: Build documentation via cargo-wrt
run: |
echo "Building documentation for versions: ${{ env.VERSIONS_TO_BUILD }}"
export PATH="$HOME/.dagger/bin:$(pwd)/bin:$PATH"
- ./target/debug/xtask publish-docs-dagger --versions "${{ env.VERSIONS_TO_BUILD }}" --output-dir ./docs_artifact_final
+ cargo-wrt docs --open --private --output-dir ./docs_output
env:
RUST_LOG: info
RUST_BACKTRACE: 1
@@ -143,13 +145,60 @@ jobs:
# CI environment flag
CI: true
+ - name: Prepare documentation artifact
+ run: |
+ # Create the expected artifact directory
+ mkdir -p ./docs_artifact_final
+
+ # Copy Sphinx HTML documentation if it exists
+ if [ -d "./docs_output/sphinx/html" ]; then
+ echo "๐ Found Sphinx documentation"
+ cp -r ./docs_output/sphinx/html/* ./docs_artifact_final/
+ elif [ -d "./docs/build/html" ]; then
+ echo "๐ Found Sphinx documentation (fallback path)"
+ cp -r ./docs/build/html/* ./docs_artifact_final/
+ fi
+
+ # Copy Rust API documentation
+ if [ -d "./docs_output/doc" ]; then
+ echo "๐ Found Rust API documentation"
+ mkdir -p ./docs_artifact_final/api
+ cp -r ./docs_output/doc/* ./docs_artifact_final/api/
+ elif [ -d "./target/doc" ]; then
+ echo "๐ Found Rust API documentation (fallback path)"
+ mkdir -p ./docs_artifact_final/api
+ cp -r ./target/doc/* ./docs_artifact_final/api/
+ fi
+
+ # Create a simple index.html if none exists
+ if [ ! -f "./docs_artifact_final/index.html" ]; then
+ echo "โ ๏ธ No index.html found, creating redirect to API docs"
+ cat > ./docs_artifact_final/index.html << 'EOF'
+
+
+
+
+ WRT Documentation
+
+
+
+ Redirecting to WRT API Documentation...
+
+
+ EOF
+ fi
+
+ # List what we're uploading
+ echo "๐ฆ Documentation artifact contents:"
+ ls -la ./docs_artifact_final/
+
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
- path: './docs_artifact_final' # Path where Dagger pipeline (via xtask) exports the final result
+ path: './docs_artifact_final' # Path to the prepared documentation artifact
# Deployment job
deploy:
diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml
new file mode 100644
index 00000000..e1d783ad
--- /dev/null
+++ b/.github/workflows/security-audit.yml
@@ -0,0 +1,144 @@
+name: Security Audit and Analysis
+
+on:
+ push:
+ branches: [ main, develop ]
+ pull_request:
+ branches: [ main, develop ]
+ schedule:
+ # Run security audit every Tuesday at 3 AM UTC
+ - cron: '0 3 * * 2'
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ security-audit:
+ name: Security Audit
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@stable
+
+ - name: Cache Cargo
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/git/db/
+ target/
+ key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.lock') }}
+
+ - name: Install cargo-audit
+ run: cargo install --locked cargo-audit --force
+
+ - name: Run Security Audit
+ run: cargo audit --json > audit-report.json
+ continue-on-error: true
+
+ - name: Process Audit Results
+ run: |
+ if [ -f audit-report.json ]; then
+ # Count vulnerabilities by severity
+ HIGH=$(jq '[.vulnerabilities.list[] | select(.advisory.severity == "high")] | length' audit-report.json)
+ MEDIUM=$(jq '[.vulnerabilities.list[] | select(.advisory.severity == "medium")] | length' audit-report.json)
+ LOW=$(jq '[.vulnerabilities.list[] | select(.advisory.severity == "low")] | length' audit-report.json)
+
+ echo "## Security Audit Results" >> $GITHUB_STEP_SUMMARY
+ echo "- High severity: $HIGH" >> $GITHUB_STEP_SUMMARY
+ echo "- Medium severity: $MEDIUM" >> $GITHUB_STEP_SUMMARY
+ echo "- Low severity: $LOW" >> $GITHUB_STEP_SUMMARY
+
+ if [ $HIGH -gt 0 ]; then
+ echo "::error::High severity vulnerabilities found"
+ exit 1
+ fi
+ fi
+
+ - name: Upload Audit Report
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: security-audit-report
+ path: audit-report.json
+
+ safety-analysis:
+ name: Safety Analysis with Clippy
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ components: clippy
+
+ - name: Cache Cargo
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/git/db/
+ target/
+ key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
+
+ - name: Run Safety-Critical Clippy
+ run: |
+ cargo clippy --workspace --all-targets --all-features -- \
+ -D clippy::unwrap_used \
+ -D clippy::expect_used \
+ -D clippy::panic \
+ -D clippy::unreachable \
+ -D clippy::std_instead_of_core \
+ -D clippy::std_instead_of_alloc \
+ -W clippy::unnecessary_box_returns \
+ -W clippy::vec_init_then_push \
+ > clippy-safety-report.txt 2>&1
+ continue-on-error: true
+
+ - name: Process Safety Results
+ run: |
+ if [ -f clippy-safety-report.txt ]; then
+ DENIES=$(grep -c "denied" clippy-safety-report.txt || echo 0)
+ WARNS=$(grep -c "warning" clippy-safety-report.txt || echo 0)
+
+ echo "## Safety Analysis Results" >> $GITHUB_STEP_SUMMARY
+ echo "- Safety violations (denied): $DENIES" >> $GITHUB_STEP_SUMMARY
+ echo "- Safety warnings: $WARNS" >> $GITHUB_STEP_SUMMARY
+
+ if [ $DENIES -gt 0 ]; then
+ echo "::error::Safety-critical violations found"
+ cat clippy-safety-report.txt
+ exit 1
+ fi
+ fi
+
+ - name: Upload Safety Report
+ uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: safety-analysis-report
+ path: clippy-safety-report.txt
+
+ dependency-review:
+ name: Dependency Review
+ runs-on: ubuntu-latest
+ if: github.event_name == 'pull_request'
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/dependency-review-action@v4
+ with:
+ fail-on-severity: high
+ # Allow common open source licenses
+ allow-licenses: MIT, Apache-2.0, BSD-3-Clause, ISC, MPL-2.0, Unlicense
+ # Exclude packages with undetected licenses that we've manually verified
+ # Using PURL format: pkg:cargo/package@version
+ allow-dependencies-licenses: |
+ pkg:cargo/chrono@0.4.*,
+ pkg:cargo/dagger-sdk@0.11.10
\ No newline at end of file
diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml
deleted file mode 100644
index 23b0080c..00000000
--- a/.github/workflows/test-examples.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-name: Test Documentation Examples
-
-on:
- push:
- paths:
- - 'docs/**/*.rst'
- - 'docs/**/*.md'
- - 'examples/**'
- - '.github/workflows/test-examples.yml'
- pull_request:
- paths:
- - 'docs/**/*.rst'
- - 'docs/**/*.md'
- - 'examples/**'
-
-jobs:
- test-examples:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Install Rust
- uses: dtolnay/rust-toolchain@stable
-
- - name: Test documentation examples
- run: |
- cargo test --doc
- cargo test --test doc_examples_test
-
- - name: Build example projects
- run: |
- for example in examples/*/; do
- echo "Building $example"
- (cd "$example" && cargo build)
- done
-
- - name: Run example tests
- run: |
- for example in examples/*/; do
- echo "Testing $example"
- (cd "$example" && cargo test)
- done
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 0107f532..71117fd6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,12 @@
target/
docs/_build/
+docs/build/
docs/source/wrt*
docs/source/changelog.md
+# Documentation virtual environment
+.venv-docs/
+
# Ignore all WASM files but keep WAT files which are the source format
*.wasm
diff --git a/ARCHITECTURAL_ISSUES_20250622_061324.md b/ARCHITECTURAL_ISSUES_20250622_061324.md
new file mode 100644
index 00000000..42f426d4
--- /dev/null
+++ b/ARCHITECTURAL_ISSUES_20250622_061324.md
@@ -0,0 +1,1036 @@
+# Architectural Issues Analysis
+Date: 2025-06-22 06:13:24
+
+## Analyzing failure for: WRT no_std + alloc
+Features: alloc
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Trait Bound Violations
+Feature combinations are creating incompatible trait requirements.
+This suggests improper abstraction boundaries for ASIL compliance.
+
+### Raw Error Output
+```
+ Compiling wrt-error v0.2.0 (/Users/r/git/wrt2/wrt-error)
+ Compiling wrt v0.2.0 (/Users/r/git/wrt2/wrt)
+ Compiling wrt-sync v0.2.0 (/Users/r/git/wrt2/wrt-sync)
+ Compiling wrt-math v0.2.0 (/Users/r/git/wrt2/wrt-math)
+ Compiling wrt-foundation v0.2.0 (/Users/r/git/wrt2/wrt-foundation)
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/budget_provider.rs:18:30
+ |
+18 | CapabilityAwareProvider, CapabilityFactoryBuilder, DynamicMemoryCapability, ProviderCapabilityExt
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:44:6
+ |
+44 | impl CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:276:6
+ |
+276 | impl CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:320:18
+ |
+320 | impl Default for CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:314:27
+ |
+314 | pub fn build(self) -> CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:315:9
+ |
+315 | CapabilityMemoryFactory::new(self.context)
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:47:16
+ |
+47 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:59:26
+ |
+59 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:78:26
+ |
+78 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:101:26
+ |
+101 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:121:10
+ |
+121 | &self.context
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:131:9
+ |
+131 | self.context.register_capability(crate_id, capability)
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:279:16
+ |
+279 | Self { context: MemoryCapabilityContext::default() }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:284:16
+ |
+284 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:293:9
+ |
+293 | self.context.register_dynamic_capability(crate_id, max_allocation)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:299:9
+ |
+```
+
+## Analyzing failure for: WRT ASIL-B (no_std + alloc)
+Features: alloc, safety-asil-b
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Trait Bound Violations
+Feature combinations are creating incompatible trait requirements.
+This suggests improper abstraction boundaries for ASIL compliance.
+
+### Raw Error Output
+```
+ Compiling wrt v0.2.0 (/Users/r/git/wrt2/wrt)
+ Compiling wrt-foundation v0.2.0 (/Users/r/git/wrt2/wrt-foundation)
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/budget_provider.rs:18:30
+ |
+18 | CapabilityAwareProvider, CapabilityFactoryBuilder, DynamicMemoryCapability, ProviderCapabilityExt
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:44:6
+ |
+44 | impl CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:276:6
+ |
+276 | impl CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:320:18
+ |
+320 | impl Default for CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:314:27
+ |
+314 | pub fn build(self) -> CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:315:9
+ |
+315 | CapabilityMemoryFactory::new(self.context)
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:47:16
+ |
+47 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:59:26
+ |
+59 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:78:26
+ |
+78 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:101:26
+ |
+101 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:121:10
+ |
+121 | &self.context
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:131:9
+ |
+131 | self.context.register_capability(crate_id, capability)
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:279:16
+ |
+279 | Self { context: MemoryCapabilityContext::default() }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:284:16
+ |
+284 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:293:9
+ |
+293 | self.context.register_dynamic_capability(crate_id, max_allocation)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:299:9
+ |
+299 | self.context.register_static_capability::(crate_id)?;
+ | ^^^^^^^^^^^^
+
+```
+
+## Analyzing failure for: WRT Development (std)
+Features: std
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Trait Bound Violations
+Feature combinations are creating incompatible trait requirements.
+This suggests improper abstraction boundaries for ASIL compliance.
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Missing Imports/Modules
+Feature flags are not properly managing code visibility.
+This violates ASIL requirement for deterministic compilation.
+
+### Raw Error Output
+```
+ Compiling wrt-error v0.2.0 (/Users/r/git/wrt2/wrt-error)
+ Compiling wrt v0.2.0 (/Users/r/git/wrt2/wrt)
+ Compiling wrt-sync v0.2.0 (/Users/r/git/wrt2/wrt-sync)
+ Compiling wrt-foundation v0.2.0 (/Users/r/git/wrt2/wrt-foundation)
+ Compiling wrt-platform v0.2.0 (/Users/r/git/wrt2/wrt-platform)
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/budget_provider.rs:18:30
+ |
+18 | CapabilityAwareProvider, CapabilityFactoryBuilder, DynamicMemoryCapability, ProviderCapabilityExt
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:44:6
+ |
+44 | impl CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:276:6
+ |
+276 | impl CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:320:18
+ |
+320 | impl Default for CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:314:27
+ |
+314 | pub fn build(self) -> CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:315:9
+ |
+315 | CapabilityMemoryFactory::new(self.context)
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:47:16
+ |
+47 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:59:26
+ |
+59 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:78:26
+ |
+78 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:101:26
+ |
+101 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:121:10
+ |
+121 | &self.context
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:131:9
+ |
+131 | self.context.register_capability(crate_id, capability)
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:279:16
+ |
+279 | Self { context: MemoryCapabilityContext::default() }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:284:16
+ |
+284 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:293:9
+ |
+293 | self.context.register_dynamic_capability(crate_id, max_allocation)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:299:9
+ |
+```
+
+## Analyzing failure for: WRT Development with Optimization
+Features: std, optimize
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Trait Bound Violations
+Feature combinations are creating incompatible trait requirements.
+This suggests improper abstraction boundaries for ASIL compliance.
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Missing Imports/Modules
+Feature flags are not properly managing code visibility.
+This violates ASIL requirement for deterministic compilation.
+
+### Raw Error Output
+```
+ Compiling wrt v0.2.0 (/Users/r/git/wrt2/wrt)
+ Compiling wrt-foundation v0.2.0 (/Users/r/git/wrt2/wrt-foundation)
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/budget_provider.rs:18:30
+ |
+18 | CapabilityAwareProvider, CapabilityFactoryBuilder, DynamicMemoryCapability, ProviderCapabilityExt
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:44:6
+ |
+44 | impl CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:276:6
+ |
+276 | impl CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:320:18
+ |
+320 | impl Default for CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:314:27
+ |
+314 | pub fn build(self) -> CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:315:9
+ |
+315 | CapabilityMemoryFactory::new(self.context)
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:47:16
+ |
+47 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:59:26
+ |
+59 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:78:26
+ |
+78 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:101:26
+ |
+101 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:121:10
+ |
+121 | &self.context
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:131:9
+ |
+131 | self.context.register_capability(crate_id, capability)
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:279:16
+ |
+279 | Self { context: MemoryCapabilityContext::default() }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:284:16
+ |
+284 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:293:9
+ |
+293 | self.context.register_dynamic_capability(crate_id, max_allocation)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:299:9
+ |
+299 | self.context.register_static_capability::(crate_id)?;
+ | ^^^^^^^^^^^^
+
+```
+
+## Analyzing failure for: WRT Server
+Features: std, optimize, platform
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Trait Bound Violations
+Feature combinations are creating incompatible trait requirements.
+This suggests improper abstraction boundaries for ASIL compliance.
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Missing Imports/Modules
+Feature flags are not properly managing code visibility.
+This violates ASIL requirement for deterministic compilation.
+
+### Raw Error Output
+```
+ Compiling wrt v0.2.0 (/Users/r/git/wrt2/wrt)
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/budget_provider.rs:18:30
+ |
+18 | CapabilityAwareProvider, CapabilityFactoryBuilder, DynamicMemoryCapability, ProviderCapabilityExt
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:44:6
+ |
+44 | impl CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:276:6
+ |
+276 | impl CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:320:18
+ |
+320 | impl Default for CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:314:27
+ |
+314 | pub fn build(self) -> CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:315:9
+ |
+315 | CapabilityMemoryFactory::new(self.context)
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:47:16
+ |
+47 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:59:26
+ |
+59 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:78:26
+ |
+78 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:101:26
+ |
+101 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:121:10
+ |
+121 | &self.context
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:131:9
+ |
+131 | self.context.register_capability(crate_id, capability)
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:279:16
+ |
+279 | Self { context: MemoryCapabilityContext::default() }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:284:16
+ |
+284 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:293:9
+ |
+293 | self.context.register_dynamic_capability(crate_id, max_allocation)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:299:9
+ |
+299 | self.context.register_static_capability::(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+```
+
+## Analyzing failure for: WRTD Development Runtime
+Features: std, wrt-execution, dev-panic
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Trait Bound Violations
+Feature combinations are creating incompatible trait requirements.
+This suggests improper abstraction boundaries for ASIL compliance.
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Missing Imports/Modules
+Feature flags are not properly managing code visibility.
+This violates ASIL requirement for deterministic compilation.
+
+### Raw Error Output
+```
+ Compiling wrt v0.2.0 (/Users/r/git/wrt2/wrt)
+ Compiling wrt-panic v0.2.0 (/Users/r/git/wrt2/wrt-panic)
+ Compiling spinning_top v0.2.5
+ Compiling wrt-math v0.2.0 (/Users/r/git/wrt2/wrt-math)
+ Compiling wrt-sync v0.2.0 (/Users/r/git/wrt2/wrt-sync)
+ Compiling linked_list_allocator v0.10.5
+ Compiling wrt-foundation v0.2.0 (/Users/r/git/wrt2/wrt-foundation)
+ Compiling wrt-platform v0.2.0 (/Users/r/git/wrt2/wrt-platform)
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/budget_provider.rs:18:30
+ |
+18 | CapabilityAwareProvider, CapabilityFactoryBuilder, DynamicMemoryCapability, ProviderCapabilityExt
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:44:6
+ |
+44 | impl CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:276:6
+ |
+276 | impl CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:320:18
+ |
+320 | impl Default for CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:314:27
+ |
+314 | pub fn build(self) -> CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:315:9
+ |
+315 | CapabilityMemoryFactory::new(self.context)
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:47:16
+ |
+47 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:59:26
+ |
+59 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:78:26
+ |
+78 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:101:26
+ |
+101 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:121:10
+ |
+121 | &self.context
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:131:9
+ |
+131 | self.context.register_capability(crate_id, capability)
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:279:16
+ |
+279 | Self { context: MemoryCapabilityContext::default() }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:284:16
+ |
+284 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:293:9
+ |
+293 | self.context.register_dynamic_capability(crate_id, max_allocation)?;
+ | ^^^^^^^^^^^^
+
+```
+
+## Analyzing failure for: WRTD Server Runtime
+Features: std, wrt-execution
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Trait Bound Violations
+Feature combinations are creating incompatible trait requirements.
+This suggests improper abstraction boundaries for ASIL compliance.
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Missing Imports/Modules
+Feature flags are not properly managing code visibility.
+This violates ASIL requirement for deterministic compilation.
+
+### Raw Error Output
+```
+ Compiling wrt-panic v0.2.0 (/Users/r/git/wrt2/wrt-panic)
+warning: wrt@0.2.0: Setting WASM_TESTSUITE to /Users/r/git/wrt2/target/debug/build/wrt-c3722ec280d4681b/out/testsuite
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/budget_provider.rs:18:30
+ |
+18 | CapabilityAwareProvider, CapabilityFactoryBuilder, DynamicMemoryCapability, ProviderCapabilityExt
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:44:6
+ |
+44 | impl CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:276:6
+ |
+276 | impl CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:320:18
+ |
+320 | impl Default for CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:314:27
+ |
+314 | pub fn build(self) -> CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:315:9
+ |
+315 | CapabilityMemoryFactory::new(self.context)
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:47:16
+ |
+47 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:59:26
+ |
+59 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:78:26
+ |
+78 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:101:26
+ |
+101 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:121:10
+ |
+121 | &self.context
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:131:9
+ |
+131 | self.context.register_capability(crate_id, capability)
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:279:16
+ |
+279 | Self { context: MemoryCapabilityContext::default() }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:284:16
+ |
+284 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:293:9
+ |
+293 | self.context.register_dynamic_capability(crate_id, max_allocation)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:299:9
+ |
+299 | self.context.register_static_capability::(crate_id)?;
+ | ^^^^^^^^^^^^
+
+```
+
+## Analyzing failure for: Component Model Core
+Features: no_std, alloc, component-model-core
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Trait Bound Violations
+Feature combinations are creating incompatible trait requirements.
+This suggests improper abstraction boundaries for ASIL compliance.
+
+### Raw Error Output
+```
+ Compiling wrt-math v0.2.0 (/Users/r/git/wrt2/wrt-math)
+ Compiling wrt-foundation v0.2.0 (/Users/r/git/wrt2/wrt-foundation)
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/budget_provider.rs:18:30
+ |
+18 | CapabilityAwareProvider, CapabilityFactoryBuilder, DynamicMemoryCapability, ProviderCapabilityExt
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:44:6
+ |
+44 | impl CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:276:6
+ |
+276 | impl CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:320:18
+ |
+320 | impl Default for CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:314:27
+ |
+314 | pub fn build(self) -> CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:315:9
+ |
+315 | CapabilityMemoryFactory::new(self.context)
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:47:16
+ |
+47 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:59:26
+ |
+59 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:78:26
+ |
+78 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:101:26
+ |
+101 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:121:10
+ |
+121 | &self.context
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:131:9
+ |
+131 | self.context.register_capability(crate_id, capability)
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:279:16
+ |
+279 | Self { context: MemoryCapabilityContext::default() }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:284:16
+ |
+284 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:293:9
+ |
+293 | self.context.register_dynamic_capability(crate_id, max_allocation)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:299:9
+ |
+299 | self.context.register_static_capability::(crate_id)?;
+ | ^^^^^^^^^^^^
+
+```
+
+## Analyzing failure for: Component Model Full
+Features: std, component-model-all
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Trait Bound Violations
+Feature combinations are creating incompatible trait requirements.
+This suggests improper abstraction boundaries for ASIL compliance.
+
+### โ ๏ธ ARCHITECTURAL ISSUE: Missing Imports/Modules
+Feature flags are not properly managing code visibility.
+This violates ASIL requirement for deterministic compilation.
+
+### Raw Error Output
+```
+ Compiling wrt-foundation v0.2.0 (/Users/r/git/wrt2/wrt-foundation)
+ Compiling wrt-platform v0.2.0 (/Users/r/git/wrt2/wrt-platform)
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/budget_provider.rs:18:30
+ |
+18 | CapabilityAwareProvider, CapabilityFactoryBuilder, DynamicMemoryCapability, ProviderCapabilityExt
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(deprecated)]` on by default
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:44:6
+ |
+44 | impl CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:276:6
+ |
+276 | impl CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityFactoryBuilder`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:320:18
+ |
+320 | impl Default for CapabilityFactoryBuilder {
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:314:27
+ |
+314 | pub fn build(self) -> CapabilityMemoryFactory {
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated struct `capabilities::factory::CapabilityMemoryFactory`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:315:9
+ |
+315 | CapabilityMemoryFactory::new(self.context)
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+
+ Compiling wrt-math v0.2.0 (/Users/r/git/wrt2/wrt-math)
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:47:16
+ |
+47 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:59:26
+ |
+59 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:78:26
+ |
+78 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:101:26
+ |
+101 | let capability = self.context.get_capability(crate_id)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:121:10
+ |
+121 | &self.context
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityMemoryFactory::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:131:9
+ |
+131 | self.context.register_capability(crate_id, capability)
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:279:16
+ |
+279 | Self { context: MemoryCapabilityContext::default() }
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:284:16
+ |
+284 | Self { context }
+ | ^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:293:9
+ |
+293 | self.context.register_dynamic_capability(crate_id, max_allocation)?;
+ | ^^^^^^^^^^^^
+
+warning: use of deprecated field `capabilities::factory::CapabilityFactoryBuilder::context`: Use MemoryFactory for simpler memory provider creation
+ --> wrt-foundation/src/capabilities/factory.rs:299:9
+ |
+299 | self.context.register_static_capability::(crate_id)?;
+ | ^^^^^^^^^^^^
+```
+
+# Architectural Issues Summary
+
+- Trait bound violations suggesting improper abstractions
+- Missing imports/modules breaking deterministic compilation
+
+## Recommended Actions
+1. Review module boundaries and dependencies
+2. Ensure feature flags properly isolate platform-specific code
+3. Verify all ASIL configurations can build without std library
+4. Remove or properly abstract unsafe code in safety-critical paths
diff --git a/ASYNC_EXECUTOR_COMPLETION_PLAN.md b/ASYNC_EXECUTOR_COMPLETION_PLAN.md
new file mode 100644
index 00000000..dd0ad557
--- /dev/null
+++ b/ASYNC_EXECUTOR_COMPLETION_PLAN.md
@@ -0,0 +1,205 @@
+# Async Executor Completion Plan
+
+## Current Status
+
+### โ
Completed Components
+1. **Fuel Infrastructure** - All fuel tracking, enforcement, and debt/credit systems
+2. **Async Task Management** - Task creation, scheduling, and state management
+3. **ASIL Execution Modes** - Different execution policies for each ASIL level
+4. **Resource Management** - Lifetime tracking, handle tables, and cleanup
+5. **Stream & Future Support** - Async streams and future combinators
+6. **Error Propagation** - Context-aware error handling
+
+### ๐ Partially Complete
+1. **WebAssembly Execution** - Structure exists but using simulation
+ - Location: `fuel_async_executor.rs:1651` - `execute_wasm_function_with_fuel()`
+ - Currently simulates execution instead of calling real WebAssembly functions
+
+### โ Missing Components
+1. **Main Executor Run Loop** - Top-level executor that orchestrates everything
+2. **Component Function Resolution** - Getting actual functions from ComponentInstance
+3. **Yield Point Restoration** - Resuming execution from saved state
+4. **Integration Tests** - End-to-end tests with real WebAssembly modules
+
+## Implementation Plan
+
+### Phase 3.1: Complete WebAssembly Execution Integration
+```rust
+// In execute_wasm_function_with_fuel()
+// 1. Get function index from task's execution context
+let func_idx = task.execution_context.current_function;
+
+// 2. Get module instance from component
+let module_instance = component_instance.get_module_instance()?;
+
+// 3. Execute using StacklessEngine
+let result = engine.execute_function(
+ module_instance,
+ func_idx,
+ &task.execution_context.locals,
+)?;
+
+// 4. Update task state based on result
+match result {
+ ExecutionResult::Completed(values) => {
+ ExecutionStepResult::Completed(serialize_values(values))
+ },
+ ExecutionResult::Yielded(yield_point) => {
+ task.execution_context.save_yield_point(yield_point)?;
+ ExecutionStepResult::Yielded
+ },
+ ExecutionResult::Waiting(resource) => {
+ ExecutionStepResult::Waiting
+ },
+}
+```
+
+### Phase 3.2: Implement Main Executor
+```rust
+pub struct FuelAsyncRuntime {
+ executor: FuelAsyncExecutor,
+ component_registry: ComponentRegistry,
+ global_fuel_budget: u64,
+}
+
+impl FuelAsyncRuntime {
+ pub fn run(&mut self) -> Result<(), Error> {
+ while self.executor.has_tasks() {
+ // Poll ready tasks
+ let polled = self.executor.poll_ready_tasks(100)?;
+
+ // Check global fuel budget
+ if self.executor.total_fuel_consumed() > self.global_fuel_budget {
+ return Err(Error::new(
+ ErrorCategory::Resource,
+ codes::FUEL_EXHAUSTED,
+ "Global fuel budget exhausted",
+ ));
+ }
+
+ // Yield to other system tasks if needed
+ if polled == 0 {
+ // No tasks ready, wait for wakers
+ self.wait_for_wakers()?;
+ }
+ }
+
+ Ok(())
+ }
+}
+```
+
+### Phase 3.3: Component Function Resolution
+```rust
+impl ComponentInstance {
+ /// Get function for async execution
+ pub fn get_async_function(
+ &self,
+ export_name: &str,
+ ) -> Result<(ModuleInstanceId, FunctionIndex), Error> {
+ // Resolve export to function
+ let export = self.exports.get(export_name)?;
+
+ match export {
+ Export::Function { module_id, func_idx } => {
+ Ok((*module_id, *func_idx))
+ },
+ _ => Err(Error::new(
+ ErrorCategory::Type,
+ codes::TYPE_MISMATCH,
+ "Export is not a function",
+ )),
+ }
+ }
+}
+```
+
+### Phase 3.4: Yield Point Implementation
+```rust
+impl ExecutionContext {
+ /// Save yield point for later restoration
+ pub fn save_yield_point(&mut self, yield_point: YieldPoint) -> Result<()> {
+ self.yield_points.push(yield_point)?;
+ self.has_yielded = true;
+ Ok(())
+ }
+
+ /// Restore from yield point
+ pub fn restore_from_yield(&mut self) -> Result