一键导入
new-crate
Scaffold a new Rust crate in the remu workspace following all conventions. Use when creating a new library crate, simulator backend, or utility crate.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold a new Rust crate in the remu workspace following all conventions. Use when creating a new library crate, simulator backend, or utility crate.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Create or maintain a lazy-built native .so library that is hash-checked and dlopen'd at runtime, following the spike / nzea pattern. Use when adding a new simulator backend or external C/C++ dependency that should not block cargo build.
Create or update flow/ directories (command.rs, option.rs, generic.rs) for crates that need data-flow conventions. Use when a crate needs runtime commands, initialization options, or compile-time generic configuration.
Add a new ISA variant (e.g., RV64I, RV32IMF) to the project. Covers updating the for_each_isa! table, dispatch macros, and IsaKind enums across remu_isa, remu_harness, remu_simulator_nzea, and remu_boot.
Create or reorganize Rust modules following the remu Module Declaration Constitution. Use when adding a new .rs file, moving files, or fixing bare mod violations.
基于 SOC 职业分类
| name | new-crate |
| description | Scaffold a new Rust crate in the remu workspace following all conventions. Use when creating a new library crate, simulator backend, or utility crate. |
remu_new_crate/
├── Cargo.toml
└── src/
└── lib.rs
Cargo.toml template:
[package]
name = "remu_new_crate"
version = "0.1.0"
edition = "2024"
[dependencies]
remu_macro = { path = "../remu_macro" }
[lints]
workspace = true
2024remu_macro if the crate has any modulesremu_macro::mod_flat!(/* same-dir files */);
remu_macro::mod_pub!(/* sub-dir modules */);
See module-setup skill for the full rules.
Create src/prelude.rs:
//! Public API surface of `remu_new_crate`. Import via `use remu_new_crate::prelude::*;`.
pub use crate::some_module::SomeType;
In lib.rs:
remu_macro::mod_pub_flat!(prelude);
See flow-files skill for details.
Add to root Cargo.toml members list:
members = [
...
"remu_new_crate",
]
cargo check -p remu_new_crate