-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pure rust native activity backend #35
Commits on Oct 8, 2022
-
native-activity: Migrate ANativeActivity callbacks to Rust
A first step towards replacing the android_native_app_glue code with a pure Rust implementation.
Configuration menu - View commit details
-
Copy full SHA for 2d44950 - Browse repository at this point
Copy the full SHA 2d44950View commit details -
native-activity: Port android_app_create/free from C to Rust
A literal port for now, with the intention of re-working into more idiomatic Rust code once we have a port of all the C code.
Configuration menu - View commit details
-
Copy full SHA for a657294 - Browse repository at this point
Copy the full SHA a657294View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1314210 - Browse repository at this point
Copy the full SHA 1314210View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1507b37 - Browse repository at this point
Copy the full SHA 1507b37View commit details -
native-activity: complete (first-pass) port of C code to Rust
At this point the C code has been fully ported to Rust but it's not yet well integrated with the pre-existing Rust code and the port is not yet particularly idiomatic Rust code.
Configuration menu - View commit details
-
Copy full SHA for 3de1433 - Browse repository at this point
Copy the full SHA 3de1433View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2870a84 - Browse repository at this point
Copy the full SHA 2870a84View commit details -
native-activity: re-work ported glue code into idiomatic Rust
This is a fairly thorough re-working of all the code that was initially naively ported from android_native_app_glue.c to be more idiomatic Rust code (though by it's nature it still involves a lot of unsafe code) Most of the glue code now lives in src/native_activity/glue.rs as part of a NativeActivityGlue API The design as far as the threading model, IPC and synchronization goes is unchanged.
Configuration menu - View commit details
-
Copy full SHA for cd32b4a - Browse repository at this point
Copy the full SHA cd32b4aView commit details
Commits on Oct 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 879d7ca - Browse repository at this point
Copy the full SHA 879d7caView commit details -
native-activity: fix Weak ref from_raw + upgrade + into_raw handling …
…for callbacks This adds a common `try_with_waitable_activity_ref` utility that handles upgrading the Weak reference associated with `ANativeActivity` whenever we get an activity callback. Previously we weren't converting the Weak reference back to a pointer before returning from the callback which would result in us dropping the Weak reference after the first callback.
Configuration menu - View commit details
-
Copy full SHA for 949386e - Browse repository at this point
Copy the full SHA 949386eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e25e2e - Browse repository at this point
Copy the full SHA 2e25e2eView commit details -
native-activity: track saved state as a Vec<u8>
This simplifies the tracking of saved state by simply using a Vec and only copying into a `malloc()` allocation when passing the saved state to `ANativeActivity`. This also ensures saved state persists (in Rust) between a `MainEvent::SaveState` event and a `Resume` event - otherwise the saved state would only be restored in the situation where `onCreate` is called again for a new process.
Configuration menu - View commit details
-
Copy full SHA for 1ed7d38 - Browse repository at this point
Copy the full SHA 1ed7d38View commit details -
Configuration menu - View commit details
-
Copy full SHA for c3d115f - Browse repository at this point
Copy the full SHA c3d115fView commit details