Skip to content

[DRAFT] Changes to generate bindings for the android-sdk#14

Draft
simlay wants to merge 11 commits intobluejekyll:mainfrom
simlay:android-bindings
Draft

[DRAFT] Changes to generate bindings for the android-sdk#14
simlay wants to merge 11 commits intobluejekyll:mainfrom
simlay:android-bindings

Conversation

@simlay
Copy link
Copy Markdown
Contributor

@simlay simlay commented May 10, 2024

Hi there, not sure if this repo is still maintained but figured I'd add some WIP changes.

In a possibly foolish attempt, I've been messing around with generating bindings for the android sdk. The changes in this PR are needed for generating bindings.

A non-exhaustive list of the changes:

@bluejekyll
Copy link
Copy Markdown
Owner

Thanks for taking an interest in this! I’m happy to get some new changes in.

Comment on lines +23 to +45
impl<'j> FromJavaToRust<'j, Self> for UnsupportedArray<'j> {
fn java_to_rust(java: Self, _env: JNIEnv<'j>) -> Self {
java
}
}
impl<'j> Deref for UnsupportedArray<'j> {
type Target = JObject<'j>;

fn deref(&self) -> &Self::Target {
&self.0
}
}
impl<'j> FromRustToJava<'j, Self> for UnsupportedArray<'j> {
fn rust_to_java(rust: Self, _env: JNIEnv<'j>) -> Self {
rust
}
}
impl<'j> From<JObject<'j>> for UnsupportedArray<'j> {
fn from(jobject: JObject<'j>) -> Self {
Self(jobject)
}
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm understanding this correctly, an UnsupportedArray should be unsupported. It's unclear what this should be though.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget why I created this... It might have just been types that we didn't recognize?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants