Open JohnScience opened 1 year ago
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.
na-mainloop
While I was working on it, I noticed a few bad practices:
unsafe
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.
R8G8B8A8_UNORM
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:
unsafe
block instead of a few smaller ones. This creates problems with identifying the safety requirements.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 ensuresR8G8B8A8_UNORM
buffer format, and I'm likely to use it soon.