Show HN: I built a Rust crate for running unsafe code safely
1–10 of 72 posts
Re: Show HN: I built a Rust crate for running unsafe code safely
#2Re: Show HN: I built a Rust crate for running unsafe code safely
#3This is cool from a theoretical perspective, but `fork()` can be prohibitively expensive, at least on the hot path. This is a cool tool that should be used with care.
Re: Show HN: I built a Rust crate for running unsafe code safely
#4But I wouldn't use this often. I'd be willing to bet that you'd lose all performance benefits of using Rust versus something like Python or Ruby that uses forking extensively for parallelism.
Re: Show HN: I built a Rust crate for running unsafe code safely
#5Tools like valgrind do not work on windows, and I am nowhere near smart enough to know the entire layout of memory that should exist.
When using Windows and calling system system functions, there’s a lot of casting involved; to convert wide characters and DWORDS to rust primitives for example. And given that I don’t have a good debugging situation, I’m terrified that I’m corrupting or leaking memory.
does anyone know any good tools that work on windows to help me out here?
Re: Show HN: I built a Rust crate for running unsafe code safely
#6Clever trick tho if you are in a bind.
Re: Show HN: I built a Rust crate for running unsafe code safely
#7this seems like a good place to ask, I don’t write very much unsafe Rust code… but when I do, it’s because I’m calling the Win32 API. Tools like valgrind do not work on windows, and I am nowhere near smart enough to know the entire layout of memory that should exist. When using Windows and calling system system functions, there’s a lot of casting involved; to convert wide characters and DWORDS to rust primitives for…
Starts with Visual C++ analysers, SAL annotations, hardned runtime.
Then commercial tooling like PVS Studio, Parasoft for example.
Re: Show HN: I built a Rust crate for running unsafe code safely
#8Pseudo sandboxing on the fly is an old idea and with its own issues, as proven by classical UNIX approach to launching daemons.
Re: Show HN: I built a Rust crate for running unsafe code safely
#9This is cool from a theoretical perspective, but `fork()` can be prohibitively expensive, at least on the hot path. This is a cool tool that should be used with care.
Re: Show HN: I built a Rust crate for running unsafe code safely
#10This is cool from a theoretical perspective, but `fork()` can be prohibitively expensive, at least on the hot path. This is a cool tool that should be used with care.
Which pretty much makes this whole thing pointless since a lot of unsafe code exists purely for performance reasons.