Project
ide
Description
Running cortex plugin new my-plugin --advanced generates an advanced Rust plugin template whose src/lib.rs produces 7 compiler warnings when built. Three imports are unused: alloc::string::String, alloc::vec::Vec, and the alloc::vec macro. Two enum types have variants that are never constructed: UiRegion variants Header, Footer, SidebarLeft, SidebarRight (only StatusBar is used), and ToastLevel variants Warning and Error (only Info and Success are used). Two FFI functions declared in the extern "C" block are never called: get_context and emit_event. A freshly scaffolded advanced template should compile cleanly with zero warnings.
Error Message
warning: unused import: `alloc::string::String` (src/lib.rs:15)
warning: unused import: `alloc::vec::Vec` (src/lib.rs:16)
warning: unused import: `alloc::vec` (src/lib.rs:17)
warning: variants `Header`, `Footer`, `SidebarLeft`, and `SidebarRight` are never constructed (src/lib.rs:55)
warning: variants `Warning` and `Error` are never constructed (src/lib.rs:93)
warning: function `get_context` is never used (src/lib.rs:26)
warning: function `emit_event` is never used (src/lib.rs:30)
warning: `adv-test` (lib) generated 7 warnings
Debug Logs
N/A
System Information
- Cortex TUI v0.0.7
- OS: Linux x86_64
Screenshots

Steps to Reproduce
- Run
cortex plugin new adv-test --advanced -o /tmp/test -d "Test" -a "Dev"
cd /tmp/test/adv-test
- Run
cargo build --target wasm32-wasip1 --release
- Observe 7 compiler warnings about unused imports, dead enum variants, and unused FFI functions
Expected Behavior
The generated advanced plugin template should compile with zero warnings. The template should either use all declared imports, enum variants, and FFI functions, or not include the unused ones.
Actual Behavior
The advanced template includes 3 unused imports, 6 unused enum variants across 2 enums, and 2 unused FFI function declarations, producing 7 compiler warnings on every build.
Project
ide
Description
Running
cortex plugin new my-plugin --advancedgenerates an advanced Rust plugin template whosesrc/lib.rsproduces 7 compiler warnings when built. Three imports are unused:alloc::string::String,alloc::vec::Vec, and thealloc::vecmacro. Two enum types have variants that are never constructed:UiRegionvariantsHeader,Footer,SidebarLeft,SidebarRight(onlyStatusBaris used), andToastLevelvariantsWarningandError(onlyInfoandSuccessare used). Two FFI functions declared in theextern "C"block are never called:get_contextandemit_event. A freshly scaffolded advanced template should compile cleanly with zero warnings.Error Message
Debug Logs
N/A
System Information
Screenshots
Steps to Reproduce
cortex plugin new adv-test --advanced -o /tmp/test -d "Test" -a "Dev"cd /tmp/test/adv-testcargo build --target wasm32-wasip1 --releaseExpected Behavior
The generated advanced plugin template should compile with zero warnings. The template should either use all declared imports, enum variants, and FFI functions, or not include the unused ones.
Actual Behavior
The advanced template includes 3 unused imports, 6 unused enum variants across 2 enums, and 2 unused FFI function declarations, producing 7 compiler warnings on every build.