How Not to Rewrite it in Rust — A much better alternative is to reuse the original library and just publish a safe interface to it. As this comment on Lobsters says, Rust can add safety guarantees even to C code! When using a C library, you may need to know things such as “if I pass a pointer to the library, who will free it and when?”, “can this be NULL?”, “is this thread-safe?”, “can I call this function more than once?”. In C, these things are in the manual, but Rust can express them in the type system. When writing Rust wrappers, I literally copy prose from the documentation into Rust type system and have the compiler enforce RTFM!
A Study on the Prevalence of WebAssembly in the Wild — we examine the prevalence of WebAssembly in the Alexa top one million websites and find that as many as one out of 600 sites execute Wasm code. Moreover, we perform several secondary analyses, including an evaluation of code characteristics and the assessment of a Wasm module’s field of application. Based on this, we find that over 50% of all sites using WebAssembly apply it for malicious deeds, such as mining and obfuscation.
Learn faster. Dig deeper. See farther.
Join the O'Reilly online learning platform. Get a free trial today and find answers on the fly, or master something new and useful.