2021-06-15 16:02:43 +00:00
|
|
|
# Rust sucks
|
|
|
|
|
|
|
|
[Related video](/rust.webm)
|
|
|
|
|
|
|
|
* Rust lacks a specification
|
|
|
|
* There is only one compiler
|
2021-06-15 16:03:38 +00:00
|
|
|
>\>Everything in rust is undefined
|
|
|
|
>\>Therefore Rust has more undefined behaviour than C.
|
2021-06-15 16:02:43 +00:00
|
|
|
|
|
|
|
* Cargo sucks
|
|
|
|
* Takes years to build
|
|
|
|
|
2021-06-15 16:03:38 +00:00
|
|
|
>\>Consider adding CString/* const i8 literals
|
|
|
|
>\>Use concat!
|
2021-06-15 16:02:43 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
macro_rules! c_str {
|
|
|
|
($s:expr) => { {
|
|
|
|
concat!($s, "\0").as_ptr() as *const i8
|
|
|
|
} }
|
|
|
|
}
|
|
|
|
|
|
|
|
foo(c_str!("my string"));
|
|
|
|
```
|
|
|
|
|
|
|
|
I'll add more things later, I'm busy rewriting Rust software in C ;-)
|