Remix.run Logo
duped 4 hours ago

> a big "unsafe" dunce cap to shame you for being a naughty, lazy programmer

You just have to get over that. `unsafe` means "compiler cannot prove this to be safe." FFI is unsafe because the compiler can't see past it.

> Once you're doing interop with C you're just writing C with Rust syntax

Just like C++, or go, or anything else. You can choose to wrap it, but that's just indirection for no value imo. I honestly hate seeing C APIs wrapped with "high level" bindings in C++ for the same reason I hate seeing them in Rust. The docs/errors/usage are all in terms of the C API and in my code I want to see something that matches the docs, so it should be "C in syntax of $language".