百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

Crust

> 编程语言
开源

Rust 其实很有趣

393 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

Rust 其实很有趣

The Rules of Crust

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:

  1. Parameters and results of all the user-made functions;
  2. Members of user-made structs and enums;
  3. 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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言