Skip to content
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

Implement standalone webview ndk #385

Merged
merged 8 commits into from
May 19, 2022
Merged

Implement standalone webview ndk #385

merged 8 commits into from
May 19, 2022

Conversation

wusyong
Copy link
Member

@wusyong wusyong commented May 7, 2022

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

@wusyong wusyong requested a review from a team May 7, 2022 06:28
@wusyong wusyong requested a review from a team as a code owner May 7, 2022 06:28
@wusyong wusyong force-pushed the ndk branch 3 times, most recently from 12bed9b to 15ff175 Compare May 16, 2022 03:39
@wusyong wusyong changed the title Updare ndk to 0.6 Implement standalone webview ndk May 16, 2022
@wusyong
Copy link
Member Author

wusyong commented May 17, 2022

This PR will rewrite whole android stack.
The benefit from it is whole workflow on android will be just like others.
The downside is I need to write many webview code into tao since they are under the event loop.
@lucasfernog @amrbashir Do you have any opinion on this?
This is like we alter to gtk stack on Linux. I change the implementation on Android to be more webview specific.

@amrbashir
Copy link
Member

The work you've done is remarkable but given our decision to move back to use winit, I don't know how will this fit into that.

@wusyong
Copy link
Member Author

wusyong commented May 17, 2022

Yeah that's my concern too.
But we still need this one way or another. winit's android port is pure NDK.
We can't even define any class in that way, and this is hard requirement to implement IPC.

I think the reasonable choice would be android and linux port in tao will end up remain, and we maintain these ourselves. For the rest platforms, we will re-export from winit.
Does this match what you plan on moving back to winit?

@amrbashir
Copy link
Member

yeah that sounds about right.

I just thought we were gonna create a winit_gtk crate and have it under rust-windowing umbrella since the winit team offered to do so but I guess keeping gtk and android-webview in tao and reexport winit on other platforms is the optimal choice.

@wusyong
Copy link
Member Author

wusyong commented May 18, 2022

Oh right, we can still propose winit_gtk. But that might not be the case on Android. Our implementation will be very webview specific.
On maintenance side, it contains around ~2000 LOC. It's fairly maintainable IMHO.

lucasfernog
lucasfernog previously approved these changes May 18, 2022
amrbashir
amrbashir previously approved these changes May 18, 2022
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

We can decide later whether we keep gtk and android webview glue code under tao or make winit_gtk and tao would re-export it. For now, this PR is fine. Great work as always.

@wusyong wusyong dismissed stale reviews from amrbashir and lucasfernog via f5bb61f May 19, 2022 06:03
@wusyong wusyong merged commit 68c9f07 into dev May 19, 2022
@wusyong wusyong deleted the ndk branch May 19, 2022 06:17
@github-actions github-actions bot mentioned this pull request May 19, 2022
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.

3 participants