5 ms·
Tangential point... is it accurate for the project to describe itself as a "pure-Rust implementation of the QUIC protocol" when it uses platform dependent unsaf
by mbgaxyz 8y ago
Tangential point... is it accurate for the project to describe itself as a "pure-Rust implementation of the QUIC protocol" when it uses platform dependent unsafe code?
https://github.com/djc/quinn/blob/ce514af89a73f530e1366e79e5819008ef666648/quinn/src/platform/cmsg.rs https://github.com/djc/quinn/blob/ce514af89a73f530e1366e79e5...
- wmf 8y agoThat's still Rust code. (And speaking as an outsider, arguments about purity seem like the last thing Rust needs.)
- richardwhiuk 8y agoKnowing whether something just links in a C library and adds a wrapper, and how thick that wrapper around it is useful in knowing how ergonomic the API will be, and how easy it is to cross target. For example, if you want to run on musl with a statically linked libc, then a library which is just a wrapper around a C shared library which depends on glibc is a non starter.
- Ralith 8y agoAll Rust programs call out to platform-dependent unsafe code sooner or later in the form of the standard library. Otherwise, you wouldn't be able to allocate memory or do any I/O whatsoever. Sometimes the standard library doesn't expose functionality you want, like the capability to read/write the ECN bits of your UDP packets, so you have to bind some syscalls yourself. The capability to do this is one of Rust's core strengths, and it does not compromise a program's rustiness any moreso than calling a wrapper around write to print "Hello, world!" does.
- pjmlp 8y agoAny systems language has to deal with unsafe code at some level, the big difference to C is that is explicit and not present at every statement that has to deal with memory access.