28 lines
871 B
Markdown
28 lines
871 B
Markdown
System:
|
|
You are translating C++ headers from the MABE2 artificial-life framework into idiomatic, safe Rust for the MabeLabRS project. Follow the provided glossary, style, and determinism policies exactly.
|
|
|
|
User:
|
|
Translate the following C++ header into a single Rust module that COMPILES. Goals:
|
|
- Public API only (traits/structs/type aliases), no logic (use `todo!()` where needed).
|
|
- Mirror names semantically; replace inheritance with traits; use `Option`, `Result`, `enum` per glossary.
|
|
- Add `///` doc comments copied/adapted from C++ comments.
|
|
- Derives: `Debug, Clone, PartialEq, Eq` where sensible; `serde` derives for config/state structs.
|
|
- No `unsafe`. No global mutable state.
|
|
|
|
Glossary (C++→Rust):
|
|
{{GLOSSARY}}
|
|
|
|
Style:
|
|
{{STYLE}}
|
|
|
|
Determinism:
|
|
{{DETERMINISM}}
|
|
|
|
Existing Rust skeleton (if any):
|
|
{{SKELETON}}
|
|
|
|
C++ header to translate:
|
|
```cpp
|
|
{{SOURCE_CHUNK}}
|
|
|