- 
                Notifications
    
You must be signed in to change notification settings  - Fork 26
 
Open
Description
As I was assessing the maturity of Rust for mobile development, I tried different things.
I used na-mainloop example as a template for https://github.com/JohnScience/rust_android_native_activity.
While I was working on it, I noticed a few bad practices:
- using one huge 
unsafeblock instead of a few smaller ones. This creates problems with identifying the safety requirements. - zeroing out before initializing. AFAIK, this kind of code can't be optimized by the compiler.
 
My take on it is here.
My code is worse because it assumes R8G8B8A8_UNORM but "It works on my machine" TM and I've noticed there's a pull request with some code that ensures R8G8B8A8_UNORM buffer format, and I'm likely to use it soon.
Metadata
Metadata
Assignees
Labels
No labels