chore(deps): replace static_assertions with native const assertions
dependencies
## Summary
`static_assertions v1.1.0` is used in several places across the kernel for compile-time checks. Since this is a nightly Rust project, most uses can be replaced with stable/nightly language features.
## Usage audit
| Macro | Locations | Replacement |
|---|---|---|
| `const_assert_eq!` | `kernel/src/arch/riscv64/mem.rs`, `kernel/src/arch/riscv64/device/plic.rs`, `kernel/src/wasm/vm/vmcontext.rs`, `kernel/src/wasm/vm/instance.rs` | `const { assert_eq!(...) }` (stable since 1.57) |
| `const_assert!` | `kernel/src/wasm/store/mod.rs` | `const { assert!(...) }` |
| `assert_impl_all!` | `kernel/src/wasm/store/mod.rs` — verifies `StoreOpaque: Send + Sync` | Requires a small helper function with trait bounds (see below) |
For `assert_impl_all!`, the idiomatic native replacement is:
```rust
const fn _assert_send_sync<T: Send + Sync>() {}
const _: () = _assert_send_sync::<StoreOpaque>();
```
## Action
1. Replace all `const_assert_eq!` / `const_assert!` uses with `const { assert_eq!(...) }` / `const { assert!(...) }`.
2. Replace `assert_impl_all!` with inline const-fn helpers.
3. Remove `static_assertions` from all `Cargo.toml` files.
## Impact
Removes 1 external crate. Zero runtime impact.
0 条评论