https://github.com/kennykerr/samples-rs/blob/master/create_w...
https://github.com/kennykerr/samples-rs/blob/master/create_w...
I've always found it to be incredibly difficult because of the number of gotchas which can leak into causing a segfault in Rust; it's immensely frustrating.
They have provided nontrivial wrappers, wrapping xcb datatypes so to make them safe and uphold the invariants.
I don't know much of any Windows interfaces, but I doubt this would be impossible there too; they simply did not do so.
This Windows a.p.i. in Rust seems of a frankly atrocious design and most of the functions seem simple `extern "C"` declarations rather than actual attempts at proper wrapping.
This seems to be #1 only for now, which is fair because winapi is enormous. Also there may be many ways to expose a safe rust interface all with different tradeoffs, by leaving #2 open they don't lock in a single strategy prematurely. That said I am looking forward to a safe wrapper as well.
However, my original reply was to this:
> It's a call out to Windows libraries that long predate Rust, and they are implemented in (mostly) C++. They don't provide any of the safety features on any data structure you pass to it. I don't see how it could be anything other than unsafe.
It very much can be, and is often done, it simply isn't (yet )here.
I'm sorry you think the dull finish is ugly, but looking pretty is not its purpose. Its purpose is to bind strongly to the substrate it's on and provide a better surface for that shiny coat you so desire to adhere onto. Primer and language bindings alike.
No, it's simply arguing against the claim initially made that there is no way for it to not be grey.
> I'm sorry you think the dull finish is ugly, but looking pretty is not its purpose. Its purpose is to bind strongly to the substrate it's on and provide a better surface for that shiny coat you so desire to adhere onto. Primer and language bindings alike.
Maybe it isn't it's purpose, but the original post claimed that it was impossible for it to be difference, which is certainly false.