Rules for numeric type conversions in Luma. Use when writing or reviewing code that casts between integer or float types, especially across different widths.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Guidelines for writing platform-specific code in Luma. Use when adding or modifying code that behaves differently on Unix vs Windows, including shell commands, file paths, process spawning, or platform-specific tests.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Prefer compile-time platform selection over runtime branching:
// Preferred
#[cfg(unix)]
fn shell_command() -> &'static str { "sh" }
#[cfg(windows)]
fn shell_command() -> &'static str { "cmd" }
// Avoid
fn shell_command() -> &'static str {
if cfg!(windows) { "cmd" } else { "sh" }
}
Use #[cfg(unix)], #[cfg(windows)], or module-level #[cfg(...)] attributes.
Platform-specific code lives in separate files:
src/tool/shell/
mod.rs ← public API, platform-agnostic
unix.rs ← #[cfg(unix)]
windows.rs ← #[cfg(windows)]
The parent module exposes a single unified API. Callers never import platform modules directly.
Guard platform-specific tests at compile time:
#[cfg(test)]
mod tests {
#[cfg(unix)]
#[test]
fn unix_specific_behavior() { ... }
#[cfg(windows)]
#[test]
fn windows_specific_behavior() { ... }
}
Do not duplicate test logic when expectations can be shared across platforms.
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Rules for numeric type conversions in Luma. Use when writing or reviewing code that casts between integer or float types, especially across different widths.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Workflow for creating, updating, or superseding RFCs in Luma. Use when the task involves opening a new RFC, updating RFC status, marking an RFC as superseded or implemented, or deciding whether a change needs an RFC at all.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.