rust-unsafe
✓不安全代码与 FFI 专家。处理 inseguro, puntero sin formato, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, MaybeUninit, NonNull, comentario de SEGURIDAD, solidez, comportamiento indefinido, UB, 安全抽象,裸指针, 外部函数接口, 内存布局, 未定义行为
Instalación
SKILL.md
| FFI 调用 C | extern "C" { fn libcmalloc(size: usize) -> mut cvoid; } | ✅ | | 实现底层抽象 | Vec, Arc 的内部实现 | ✅ | | 性能优化(已测量) | 热点代码测出瓶颈 | ⚠️ 需验证 | | 逃避借用检查 | 不知道为什么要用 | ❌ |
| G-01 | 不要用 unsafe 逃避编译器安全检查 | | G-02 | 不要盲目为性能使用 unsafe | | G-03 | 不要为类型/方法创建名为 "Unsafe" 的别名 |
| M-01 | 为 struct/tuple/enum 选择合适的内存布局 | | M-02 | 不要修改其他进程的内存变量 | | M-03 | 不要让 String/Vec 自动释放其他进程的内存 | | M-04 | 优先使用 C-API 或 Syscalls 的可重入版本 | | M-05 | 用第三方 crate 处理位域 | | M-06 | 用 MaybeUninit 处理未初始化内存 |
不安全代码与 FFI 专家。处理 inseguro, puntero sin formato, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, MaybeUninit, NonNull, comentario de SEGURIDAD, solidez, comportamiento indefinido, UB, 安全抽象,裸指针, 外部函数接口, 内存布局, 未定义行为 Fuente: huiali/rust-skills.
Datos (listos para citar)
Campos y comandos estables para citas de IA/búsqueda.
- Comando de instalación
npx skills add https://github.com/huiali/rust-skills --skill rust-unsafe- Fuente
- huiali/rust-skills
- Categoría
- </>Desarrollo
- Verificado
- ✓
- Primera vez visto
- 2026-02-01
- Actualizado
- 2026-02-18
Respuestas rápidas
¿Qué es rust-unsafe?
不安全代码与 FFI 专家。处理 inseguro, puntero sin formato, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, MaybeUninit, NonNull, comentario de SEGURIDAD, solidez, comportamiento indefinido, UB, 安全抽象,裸指针, 外部函数接口, 内存布局, 未定义行为 Fuente: huiali/rust-skills.
¿Cómo instalo rust-unsafe?
Abre tu terminal o herramienta de línea de comandos (Terminal, iTerm, Windows Terminal, etc.) Copia y ejecuta este comando: npx skills add https://github.com/huiali/rust-skills --skill rust-unsafe Una vez instalado, el skill se configurará automáticamente en tu entorno de programación con IA y estará listo para usar en Claude Code o Cursor
¿Dónde está el repositorio de origen?
https://github.com/huiali/rust-skills
Detalles
- Categoría
- </>Desarrollo
- Fuente
- skills.sh
- Primera vez visto
- 2026-02-01