Skip to content
Closed

Feat #91

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
f6ebd54
fix: resolve systematic no_std compilation errors in wrt-component
avrabe Jun 11, 2025
2bcfbf6
fix(memory): replace direct NoStdProvider usage with budget-aware fac…
avrabe Jun 12, 2025
951d9f8
feat(format): complete wrt-format clean architecture migration
avrabe Jun 14, 2025
4d22024
feat(architecture): implement comprehensive clean architecture migrat…
avrabe Jun 14, 2025
d2e436a
feat(architecture): complete clean architecture migration with final …
avrabe Jun 14, 2025
4e16f9c
fix(architecture): resolve provider type compatibility issues in reso…
avrabe Jun 14, 2025
02f953c
fix(wrtd): resolve binary execution issues and compilation errors
avrabe Jun 15, 2025
f7fda55
feat(foundation): add safe memory allocation API
avrabe Jun 15, 2025
993b6fe
refactor(runtime): migrate to safe memory allocation and fix type issues
avrabe Jun 15, 2025
ccc53bb
fix(foundation): resolve circular imports and logging issues
avrabe Jun 15, 2025
1ae87cd
feat(architecture): implement mixed std/no_std environment with safet…
avrabe Jun 15, 2025
a9caaa9
feat(asil): implement comprehensive safety-critical resource manageme…
avrabe Jun 16, 2025
532e716
feat(capability): implement capability-based functional safety system…
avrabe Jun 16, 2025
464601b
fix(architecture): resolve runtime build errors and legacy API issues
avrabe Jun 16, 2025
6aefb97
docs: eliminate false claims and implement comprehensive documentatio…
avrabe Jun 17, 2025
6964845
docs(architecture): update documentation to reflect actual implementa…
avrabe Jun 17, 2025
cea1f82
docs(installation): consolidate duplicate installation instructions
avrabe Jun 17, 2025
0ddbd4d
docs(guidelines): add documentation style guide and maintenance check…
avrabe Jun 17, 2025
3a154b0
docs(final-cleanup): remove remaining false implementation claims
avrabe Jun 17, 2025
ff94977
docs(cross-refs): fix critical broken documentation links
avrabe Jun 17, 2025
114ea4b
docs(cleanup): consolidate external documentation into docs/source
avrabe Jun 17, 2025
af256d7
docs(critical-fixes): remove false implementation claims and add prop…
avrabe Jun 17, 2025
2896d53
docs(comprehensive-cleanup): remove false claims and consolidate docu…
avrabe Jun 17, 2025
c500f24
feat(architecture): complete unified cargo-wrt build system migration
avrabe Jun 19, 2025
7e7745b
feat(ci): add code validation checks to cargo-wrt
avrabe Jun 19, 2025
38e8422
feat(dev): add pre-commit hooks and setup command to cargo-wrt
avrabe Jun 19, 2025
5d25771
feat(cleanup): remove all shell scripts - complete cargo-wrt migration
avrabe Jun 19, 2025
91ee771
feat(build): add comprehensive tool version management and Python iso…
avrabe Jun 19, 2025
213fe46
feat(build): replace grep with native Rust text search implementation
avrabe Jun 19, 2025
374b01b
feat(docs): implement multi-version documentation system with switche…
avrabe Jun 19, 2025
c08b6c8
docs: remove legacy architecture files and unused documentation scripts
avrabe Jun 19, 2025
a4538b4
feat(build): enhance build system with verification tools and platfor…
avrabe Jun 19, 2025
cd4af68
docs: update build tool references from xtask/justfile to cargo-wrt
avrabe Jun 19, 2025
0d54071
refactor(types): eliminate confusing Vec/String type aliases
avrabe Jun 20, 2025
a415e83
feat(verification): add comprehensive Kani formal verification proofs
avrabe Jun 20, 2025
85c7ef5
feat(asil): complete ASIL-D capability-based system implementation
avrabe Jun 20, 2025
67e2e06
docs: add compliance documentation and architecture diagrams
avrabe Jun 20, 2025
280f430
refactor(memory): eliminate legacy WRT_MEMORY_COORDINATOR in wrt-foun…
avrabe Jun 20, 2025
24f584d
feat(memory): migrate wrt-foundation to capability-based memory system
avrabe Jun 20, 2025
1215343
fix(decoder): add missing trait imports and fix method calls
avrabe Jun 20, 2025
b8871b9
feat(memory): complete Phase 2 legacy memory migration
avrabe Jun 20, 2025
a28bbd9
feat(tests): eliminate unsafe patterns from foundation test files
avrabe Jun 20, 2025
f522a17
feat(format): eliminate unsafe patterns from wrt-format test files
avrabe Jun 20, 2025
5a698df
feat(cleanup): eliminate ALL unsafe guard.release() patterns
avrabe Jun 20, 2025
e618f1f
fix(memory): eliminate remaining NoStdProvider::new() legacy patterns
avrabe Jun 20, 2025
152f655
docs: update documentation to reflect current memory system
avrabe Jun 20, 2025
4de5740
fix: complete elimination of all legacy memory patterns
avrabe Jun 20, 2025
2fb826d
docs: update CLAUDE.md to reflect completed memory system migration
avrabe Jun 20, 2025
44de576
feat(wrt-parser): complete unified WebAssembly parser implementation
avrabe Jun 20, 2025
60ba985
feat(wrt-build-core): implement unified diagnostic system with LSP co…
avrabe Jun 21, 2025
af5d04b
feat(wrt-build-core): add diagnostic caching and filtering system
avrabe Jun 21, 2025
ed35e3a
feat(wrt-build-core): integrate diagnostics into build operations
avrabe Jun 21, 2025
8facc33
feat(cargo-wrt): add comprehensive diagnostic CLI interface
avrabe Jun 21, 2025
169b52a
feat(ci): add GitHub Actions workflow for PR diagnostic analysis
avrabe Jun 21, 2025
63e93ec
docs(CLAUDE.md): add comprehensive diagnostic system documentation
avrabe Jun 21, 2025
84fb6a7
chore: remove obsolete files and update dependencies
avrabe Jun 21, 2025
d5d8a1d
feat(foundation): complete unified capability-based memory system
avrabe Jun 21, 2025
02ebf89
feat(component): comprehensive async runtime and fuel management
avrabe Jun 21, 2025
227b1f6
feat(component): enhance canonical ABI with resource support
avrabe Jun 21, 2025
0d50cfe
feat(parser): unified WebAssembly parser with advanced validation
avrabe Jun 21, 2025
10ab3d4
feat(runtime): comprehensive format bridge and state management
avrabe Jun 21, 2025
11ca63a
feat(wasi): enhanced capability-aware WASI implementation
avrabe Jun 21, 2025
258333e
feat(wrt): main crate integration and decoder improvements
avrabe Jun 21, 2025
462f622
fix(runtime): improve stackless execution engine
avrabe Jun 21, 2025
65587f2
feat(runtime): complete WebAssembly memory instruction support
avrabe Jun 21, 2025
d9f3877
fix(runtime): finalize stackless engine instruction handling
avrabe Jun 21, 2025
fc18f8d
fix(ci): update GitHub Actions to use non-deprecated versions
avrabe Jun 21, 2025
b092484
fix(ci): clarify diagnostic metrics in PR comments
avrabe Jun 21, 2025
96a7e43
fix(platform): resolve compilation errors in wrt-platform crate
avrabe Jun 21, 2025
419380c
feat(coverage): implement best-effort mode for documentation builds
avrabe Jun 21, 2025
813c96b
fix(platform): resolve SIMD intrinsics and threading module compilati…
avrabe Jun 21, 2025
febbe63
feat(cli): add command tracing and dry-run capabilities
avrabe Jun 21, 2025
76b85b1
feat(ci): detect cascading errors from PR changes
avrabe Jun 21, 2025
1186e21
fix(platform): add threading feature gate to create_thread_pool function
avrabe Jun 21, 2025
40365d0
feat(asil): implement ASIL-D safety improvements for async and error …
avrabe Jun 21, 2025
201c904
feat(error): add comprehensive error recovery and debugging infrastru…
avrabe Jun 21, 2025
225d233
feat(engine): implement complete WebAssembly instruction set in stack…
avrabe Jun 21, 2025
4492cf5
refactor(types): simplify type naming and add trait implementations
avrabe Jun 21, 2025
4f5c1f1
chore(ci): improve build system and CI/CD workflows
avrabe Jun 21, 2025
b4499f3
fix(error): resolve compilation issues in recovery module
avrabe Jun 21, 2025
309149e
fix(error): properly fix recovery module compilation issues
avrabe Jun 21, 2025
4fb9a64
fix(error): resolve no_std compilation issue with ErrorCategory
avrabe Jun 21, 2025
f15ad93
fix(build): resolve CI build failures and improve no_std compatibility
avrabe Jun 21, 2025
84b4213
fix(error): resolve no_std compilation issues in recovery module
avrabe Jun 21, 2025
8b7e0d1
feat(safety): adjust ASIL safety levels for system interface crates
avrabe Jun 21, 2025
eea7047
feat(async): complete WebAssembly execution integration
avrabe Jun 21, 2025
687e055
feat(async): add comprehensive async runtime infrastructure
avrabe Jun 21, 2025
387072f
feat(component): enhance component model and async integration tests
avrabe Jun 21, 2025
1a45e73
feat(build): enhance build system with comprehensive diagnostics
avrabe Jun 21, 2025
ccad521
feat(decoder): enhance WebAssembly format detection and streaming
avrabe Jun 21, 2025
02da24f
feat(error): enhance error handling with ASIL compliance and factory …
avrabe Jun 21, 2025
aacc1df
refactor(build): apply code formatting and improve build system consi…
avrabe Jun 22, 2025
6e01885
refactor(component): enhance test coverage and apply formatting impro…
avrabe Jun 22, 2025
c1a9e90
refactor(debug): enhance debugging infrastructure and apply formatting
avrabe Jun 22, 2025
0499aa9
refactor(decoder): enhance WebAssembly parsing and apply formatting i…
avrabe Jun 22, 2025
7c8a174
refactor(format): enhance format handling and core test infrastructure
avrabe Jun 22, 2025
4cd08b0
fix(ci): resolve dependency review license detection issues
avrabe Jun 22, 2025
88b7694
fix(ci): exclude chrono and dagger-sdk from license detection
avrabe Jun 22, 2025
91a01c0
fix(ci): remove non-existent doc_examples_test from workflow
avrabe Jun 22, 2025
6b49346
fix(ci): add --force flag to cargo install in documentation workflow
avrabe Jun 22, 2025
ed12d72
chore(ci): remove test-examples workflow
avrabe Jun 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 20 additions & 15 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -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
59 changes: 59 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions .github/kani-badge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"schemaVersion": 1,
"label": "formal verification",
"message": "KANI",
"color": "brightgreen",
"namedLogo": "rust",
"logoColor": "white",
"style": "for-the-badge",
"cacheSeconds": 86400
}
140 changes: 82 additions & 58 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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)
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
Loading
Loading