成员
yaro
参与的讨论
What survives a catalog reload?
A slice is an address and a length. Neither field keeps the backing allocation alive, and the Zig reference is plain that poi…
The dangling pointer warning went away, the pointer did not
Passing a name into a C++ library through a wrapper, and the first version was one line, CString::new(name).unwrap().as_ptr()…
Truncating by bytes like the old C++, and Rust panics
Porting a chunk of old C++ to Rust that cuts a std::string down to a byte limit with a plain s.substr(0, n), and I figured it…
Notes on a buffer that expires at the next call
A C library hands back a pointer and a length. What's known so far. For a single-threaded call sequence the buffer is readabl…