Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e84d69c
fix: resolve clippy warnings in wrt-error and wrt-sync
avrabe Oct 23, 2025
b4c8cd9
fix(clippy): resolve 53 warnings across wrt-foundation and wrt-decoder
avrabe Oct 23, 2025
fdf755d
fix(clippy): resolve easy warnings in wrt-runtime
avrabe Oct 23, 2025
47e79e4
feat(#118): migrate DataSegment and ElementSegment to StaticVec
avrabe Oct 23, 2025
38af157
feat(#118): migrate FuncType to StaticVec (partial)
avrabe Oct 23, 2025
be88764
feat(#118): fix FuncType compilation errors
avrabe Oct 23, 2025
a4ee8cb
refactor(wrt-host): replace deprecated WrtResult with wrt_error::Result
avrabe Oct 23, 2025
bd198b1
refactor(wrt-instructions): replace deprecated WrtResult
avrabe Oct 23, 2025
3a84bcf
docs(wrt-intercept): add missing Errors sections
avrabe Oct 23, 2025
0a5788e
wip(#118): start BoundedString migration to StaticVec (partial)
avrabe Oct 23, 2025
1e420f7
wip(#118): complete WasmName migration to no-provider API
avrabe Oct 23, 2025
1882dcb
fix(wrt-foundation): update clippy lint name
avrabe Oct 23, 2025
91843fe
fix(#118): add WasmName trait impls and fix downstream usage
avrabe Oct 23, 2025
2b43d8b
wip(#118): fix E0107, E0061, E0392 errors - major progress
avrabe Oct 23, 2025
811793f
wip(#118): continue error fixes - down from 54 to ~30 errors
avrabe Oct 23, 2025
ab303c2
fix(#118): complete StaticVec migration for BoundedString and WasmName
avrabe Oct 23, 2025
250f5d7
fix(#118): extend StaticVec migration to downstream crates
avrabe Oct 23, 2025
12d9b57
fix(#118): migrate BoundedString to StaticVec across runtime crates
avrabe Oct 23, 2025
86dd574
fix(#118): complete StaticVec migration for wrt-runtime and wrt-instr…
avrabe Oct 23, 2025
bcbe761
fix(#118): complete StaticVec migration for wrt-component
avrabe Oct 23, 2025
3f33c1b
fix(#118): add conditional compilation for StacklessEngine::new()
avrabe Oct 23, 2025
e429fbc
fix(#118): resolve workspace feature unification issues
avrabe Oct 23, 2025
c9555bd
fix(#118): complete StaticVec migration for wrtd binary
avrabe Oct 23, 2025
b3949aa
feat(safety): upgrade to Rust edition 2024 and MSRV 1.85
avrabe Oct 23, 2025
fc65c26
feat(safety): upgrade to Rust edition 2024 and MSRV 1.85
avrabe Oct 24, 2025
7b48fbf
fix(edition2024): resolve ownership patterns for Edition 2024
avrabe Oct 24, 2025
af8128b
fix(warnings): comprehensive warning cleanup and compilation fixes
avrabe Oct 24, 2025
2637bd1
fix(warnings): parallel warning cleanup round 2
avrabe Oct 24, 2025
c07d5f8
feat(docs,tests): massive parallel cleanup - documentation, tests, an…
avrabe Oct 24, 2025
4777a10
fix(wrt-component): correct StacklessEngine cfg guards without breaki…
avrabe Oct 24, 2025
a7d9d30
fix(decoder): migrate to BoundedString try_from_str API
avrabe Oct 24, 2025
8b029d1
fix(intercept): add missing Error import in builtins
avrabe Oct 24, 2025
ad136d2
fix(wrtd): migrate to BoundedString try_from_str API
avrabe Oct 24, 2025
e783090
fix(runtime): fix pluggable_async_example feature gates
avrabe Oct 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
missing-docs-in-crate-items = true

# MSRV (Minimum Supported Rust Version)
msrv = "1.75.0"
msrv = "1.85.0"

# Cognitive complexity threshold
cognitive-complexity-threshold = 30
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ resolver = "2" # Use edition 2021 resolver

[workspace.package]
authors = ["The WRT Project Developers"]
edition = "2021"
edition = "2024"
rust-version = "1.85.0"
license = "MIT"
repository = "https://github.com/pulseengine/wrt" # Updated repository URL
version = "0.2.0" # Updated to 0.2.0 for consistency
Expand Down
29 changes: 29 additions & 0 deletions rustc-ice-2025-10-23T15_57_10-55408.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
thread 'main' panicked at src/tools/rustfmt/src/items.rs:567:10:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: 0x11169dd00 - std::backtrace::Backtrace::create::h4eaa9895931d5a5e
1: 0x10f6b59d4 - std[936f9eaeffd33fdf]::panicking::update_hook::<alloc[3502bab2037d81e1]::boxed::Box<rustc_driver_impl[684afdbbaa11f454]::install_ice_hook::{closure#1}>>::{closure#0}
2: 0x11169ec2c - std::panicking::panic_with_hook::he49af8b439ca4075
3: 0x11169e8b4 - std::panicking::panic_handler::{{closure}}::hd8bcbacd159f6f8a
4: 0x111697f64 - std::sys::backtrace::__rust_end_short_backtrace::hc5b8945a8e7f0eb5
5: 0x11167c5a0 - __rustc[f902241ae06a8ef2]::rust_begin_unwind
6: 0x1144059f4 - core::panicking::panic_fmt::hf80e42e70e3a8f33
7: 0x1144059d4 - core::panicking::panic::h0f7ebea62ec1e89f
8: 0x11440511c - core::option::unwrap_failed::hc51895000922f137
9: 0x102eb4a7c - <rustfmt_nightly[3e203a3299db44ee]::visitor::FmtVisitor>::visit_enum
10: 0x102eabfcc - <rustfmt_nightly[3e203a3299db44ee]::visitor::FmtVisitor>::visit_item
11: 0x102ee53e0 - <rustfmt_nightly[3e203a3299db44ee]::visitor::FmtVisitor>::visit_items_with_reordering
12: 0x102eafdcc - <rustfmt_nightly[3e203a3299db44ee]::visitor::FmtVisitor>::walk_mod_items
13: 0x102eb070c - <rustfmt_nightly[3e203a3299db44ee]::visitor::FmtVisitor>::format_separate_mod
14: 0x102e448e8 - <rustfmt_nightly[3e203a3299db44ee]::Session<std[936f9eaeffd33fdf]::io::stdio::Stdout>>::format_input_inner::{closure#0}
15: 0x102e38510 - rustfmt[e47bba0287272a0b]::format_and_emit_report::<std[936f9eaeffd33fdf]::io::stdio::Stdout>
16: 0x102e49d98 - rustfmt[e47bba0287272a0b]::execute
17: 0x102e462f4 - rustfmt[e47bba0287272a0b]::main
18: 0x102e4254c - std[936f9eaeffd33fdf]::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
19: 0x102e42970 - std[936f9eaeffd33fdf]::rt::lang_start::<()>::{closure#0}
20: 0x111688fc4 - std::rt::lang_start_internal::h80f55b629f781c52
21: 0x102e53044 - _main


rustc version: 1.92.0-nightly (2cb4e7dce 2025-10-04)
platform: aarch64-apple-darwin
5 changes: 0 additions & 5 deletions rustfmt-local

This file was deleted.

54 changes: 54 additions & 0 deletions wrt-build-core/src/requirements/documentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,13 @@ impl Default for DocumentationVerificationFramework {
/// Configuration for documentation verification
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DocumentationVerificationConfig {
/// Minimum compliance percentage required for certification.
pub min_certification_compliance: f64,
/// Enable validation of cross-references between documents.
pub enable_cross_reference_validation: bool,
/// Enable checking of API documentation completeness.
pub enable_api_documentation_check: bool,
/// Enable validation of code examples in documentation.
pub enable_example_validation: bool,
}

Expand All @@ -745,33 +749,51 @@ impl Default for DocumentationVerificationConfig {
/// Documentation standards for a specific ASIL level
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DocumentationStandards {
/// Minimum character length for requirement descriptions.
pub min_description_length: usize,
/// Whether implementation documentation is required.
pub requires_implementation_docs: bool,
/// Whether test documentation is required.
pub requires_test_docs: bool,
/// Whether verification documentation is required.
pub requires_verification_document: bool,
/// Maximum number of violations allowed.
pub max_allowed_violations: usize,
/// Required compliance score to pass.
pub required_compliance_score: f64,
}

/// Result of documentation verification
#[derive(Debug, Serialize, Deserialize)]
pub struct DocumentationVerificationResult {
/// Total number of requirements analyzed.
pub total_requirements: usize,
/// Number of requirements with compliant documentation.
pub compliant_requirements: usize,
/// Overall compliance percentage.
pub compliance_percentage: f64,
/// List of documentation violations found.
pub violations: Vec<DocumentationViolation>,
/// Detailed analysis results for each requirement.
pub analysis_results: Vec<DocumentationAnalysis>,
/// Whether the documentation is ready for certification.
pub is_certification_ready: bool,
}

/// Analysis of documentation for a single requirement
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DocumentationAnalysis {
/// Unique identifier of the requirement being analyzed.
pub requirement_id: RequirementId,
/// ASIL level of the requirement.
pub asil_level: AsilLevel,
/// List of documentation violations found.
pub violations: Vec<DocumentationViolation>,
/// Compliance score for this requirement.
pub compliance_score: f64,
/// Documentation standards required for this ASIL level.
pub required_standards: DocumentationStandards,
/// Locations where documentation was analyzed.
pub analyzed_locations: Vec<DocumentationLocation>,
}

Expand All @@ -786,24 +808,38 @@ impl DocumentationAnalysis {
/// A documentation violation that needs to be addressed
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DocumentationViolation {
/// Unique identifier of the requirement with the violation.
pub requirement_id: RequirementId,
/// Type of documentation violation.
pub violation_type: DocumentationViolationType,
/// Severity level of the violation.
pub severity: DocumentationViolationSeverity,
/// Human-readable description of the violation.
pub description: String,
/// Location where the violation was found.
pub location: DocumentationLocation,
}

/// Types of documentation violations
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum DocumentationViolationType {
/// Requirement lacks a description.
MissingDescription,
/// Description lacks sufficient detail.
InsufficientDetail,
/// Implementation code is missing.
MissingImplementation,
/// Implementation exists but is not documented.
UndocumentedImplementation,
/// Test documentation is missing.
MissingTestDocumentation,
/// Verification document is missing.
MissingVerificationDocument,
/// Cross-references between documents are inconsistent.
InconsistentCrossReferences,
/// Code examples are missing.
MissingExamples,
/// Documentation is outdated.
OutdatedDocumentation,
}

Expand Down Expand Up @@ -838,10 +874,15 @@ impl fmt::Display for DocumentationViolationType {
/// Severity levels for documentation violations
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
pub enum DocumentationViolationSeverity {
/// Informational severity.
Info,
/// Low severity violation.
Low,
/// Medium severity violation.
Medium,
/// High severity violation.
High,
/// Critical severity violation requiring immediate attention.
Critical,
}

Expand All @@ -860,11 +901,17 @@ impl fmt::Display for DocumentationViolationSeverity {
/// Location where documentation issue was found
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum DocumentationLocation {
/// Issue found in requirement documentation.
Requirement,
/// Issue found in implementation documentation.
Implementation,
/// Issue found in test documentation.
Test,
/// Issue found in verification documentation.
Verification,
/// Issue found in API documentation.
Api,
/// Issue found in example documentation.
Example,
}

Expand All @@ -884,12 +931,19 @@ impl fmt::Display for DocumentationLocation {
/// Comprehensive documentation report
#[derive(Debug, Serialize, Deserialize)]
pub struct DocumentationReport {
/// Overall compliance percentage across all requirements.
pub overall_compliance: f64,
/// Total number of requirements analyzed.
pub total_requirements: usize,
/// Total number of violations found.
pub total_violations: usize,
/// Number of critical violations found.
pub critical_violations: usize,
/// Compliance percentage by ASIL level.
pub asil_compliance: HashMap<AsilLevel, f64>,
/// List of recommendations for improving documentation.
pub recommendations: Vec<String>,
/// Summary of analysis for each requirement.
pub analysis_summary: Vec<DocumentationAnalysis>,
}

Expand Down
2 changes: 2 additions & 0 deletions wrt-build-core/src/requirements/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ use crate::config::AsilLevel;
pub struct RequirementId(String);

impl RequirementId {
/// Create a new requirement identifier.
pub fn new(id: impl Into<String>) -> Self {
Self(id.into())
}

/// Get the identifier as a string slice.
pub fn as_str(&self) -> &str {
&self.0
}
Expand Down
35 changes: 35 additions & 0 deletions wrt-build-core/src/requirements/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ use crate::{
/// Platform limits discovered from the system
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ComprehensivePlatformLimits {
/// Maximum total memory available in bytes.
pub max_total_memory: usize,
/// Maximum WebAssembly linear memory in bytes.
pub max_wasm_linear_memory: usize,
/// Maximum stack size in bytes.
pub max_stack_bytes: usize,
/// Maximum number of component instances.
pub max_components: usize,
/// Platform identifier.
pub platform_id: PlatformId,
}

Expand All @@ -60,14 +65,23 @@ impl Default for ComprehensivePlatformLimits {
/// Platform identification
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum PlatformId {
/// Linux operating system.
Linux,
/// QNX real-time operating system.
QNX,
/// macOS operating system.
MacOS,
/// Windows operating system.
Windows,
/// VxWorks real-time operating system.
VxWorks,
/// Zephyr embedded operating system.
Zephyr,
/// Tock embedded operating system.
Tock,
/// Generic embedded platform.
Embedded,
/// Unknown platform.
Unknown,
}

Expand Down Expand Up @@ -853,41 +867,62 @@ struct AsilPlatformRequirements {
/// Platform verification result
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PlatformVerificationResult {
/// ASIL level being verified.
pub asil_level: AsilLevel,
/// Platform resource limits discovered.
pub platform_limits: ComprehensivePlatformLimits,
/// List of platform violations found.
pub violations: Vec<PlatformViolation>,
/// Compliance score for this platform.
pub compliance_score: f64,
/// Whether the platform is compliant.
pub is_compliant: bool,
/// Container runtime detected.
pub container_runtime: ContainerRuntime,
/// Platform identifier.
pub platform_id: PlatformId,
}

/// Platform violation
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PlatformViolation {
/// Type of platform violation.
pub violation_type: PlatformViolationType,
/// Severity level of the violation.
pub severity: ViolationSeverity,
/// Human-readable description of the violation.
pub description: String,
/// Current platform value.
pub current_value: usize,
/// Required value for compliance.
pub required_value: usize,
}

/// Types of platform violations
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum PlatformViolationType {
/// Platform has insufficient memory resources.
InsufficientMemory,
/// Platform has insufficient component capacity.
InsufficientComponents,
/// Platform uses an unsupported container runtime.
UnsupportedContainerRuntime,
/// Platform is not supported.
UnsupportedPlatform,
/// Platform configuration is invalid.
InvalidConfiguration,
}

/// Violation severity
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
pub enum ViolationSeverity {
/// Low severity violation.
Low,
/// Medium severity violation.
Medium,
/// High severity violation.
High,
/// Critical severity violation requiring immediate attention.
Critical,
}

Expand Down
Loading
Loading