Crust
Rust that is actually Fun
Install / Use
/learn @tsoding/CrustREADME
The Rules of Crust
<p align=left> <img src="./crust.png" width=200> </p>The list of rules may change. The goal is to make programming in Rust fun.
Currently used in the B Compiler Project.
1. No std.
Use #![no_std] attribute to enforce this rule. core is allowed because there is currently no stable way to disable it. Using libc is allowed since rustc links with it anyway. But since no cargo is allowed you have to declare the necessary libc functions yourself in your crate.
You may also consider enabling #![no_main] and provide your custom C-style entry point to be able to get an access to command line arguments.
2. Every function is unsafe.
Every single user-made function must be marked as unsafe.
3. Raw pointers instead of references.
Raw pointers instead of references must be used for:
- Parameters and results of all the user-made functions;
- Members of user-made structs and enums;
- User-made global variables;
In the bodies of the functions references are allowed to be used for local variables and intermediate value.
4. No cargo.
Build with rustc directly pure C-style. Linking with external C libraries is encouraged.
5. Only Edition 2021.
Newer additions are too hostile towards Crust.
6. Copy by default.
All user-made structs and enums must be #[derive(Clone, Copy)]
7. Public by default.
Everything is pub by default.
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
