Ushering out strlcpy()
Ushering out strlcpy()
Posted Aug 26, 2022 16:59 UTC (Fri) by NYKevin (subscriber, #129325)In reply to: Ushering out strlcpy() by wtarreau
Parent article: Ushering out strlcpy()
I believe Rust is perfectly capable of emitting libc calls in contexts where it is safe to do so, because many of the slice primitives are described with phrases like "using memcpy" in the documentation. That suggests to me that they really do emit a memcpy(3) function call, or at least something which LLVM will transform into a memcpy call during compilation. So that's probably going to perform just as well as C, because under the hood, it is C.
