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

Could we support the HarmonyOS ? #4081

Open
1991wangyufei opened this issue Jan 14, 2025 · 11 comments
Open

Could we support the HarmonyOS ? #4081

1991wangyufei opened this issue Jan 14, 2025 · 11 comments
Labels
S - enhancement Wouldn't this be the coolest?

Comments

@1991wangyufei
Copy link

Description

HarmonyOS, the Greatest self-innovated OS in China, will soon be popular around the world. HarmonyOS has an absolutely leading user base in China and a very broad development prospect, demonstrating exceptional capabilities. So, I sincerely hope winit can support it, Thanks.

Relevant platforms

No response

@1991wangyufei 1991wangyufei added the S - enhancement Wouldn't this be the coolest? label Jan 14, 2025
@1991wangyufei 1991wangyufei changed the title Could we support the HarmonyOS, the Greatest self-innovated OS in China Could we support the HarmonyOS ? the Greatest self-innovated OS in China Jan 14, 2025
@notgull notgull changed the title Could we support the HarmonyOS ? the Greatest self-innovated OS in China Could we support the HarmonyOS ? Jan 14, 2025
@notgull
Copy link
Member

notgull commented Jan 14, 2025

We already support OpenHarmony in raw-window-handle, is HarmonyOS's windowing system any different?

@1991wangyufei
Copy link
Author

We already support OpenHarmony in raw-window-handle, is HarmonyOS's windowing system any different?

oh, that's great, I was using the old ver. of winit.. I will upgrade and have a try, Thx ! ^ _ ^

@notgull
Copy link
Member

notgull commented Jan 15, 2025

oh, that's great, I was using the old ver. of winit.. I will upgrade and have a try, Thx ! ^ _ ^

To clarify, we do not support OpenHarmony or HarmonyOS in winit. So far it is only implemented as an option in the raw-window-handle interopability layer. I was asking if there is a meaningful difference between HarmonyOS and OpenHarmony.

@1991wangyufei
Copy link
Author

oh, that's great, I was using the old ver. of winit.. I will upgrade and have a try, Thx ! ^ _ ^

To clarify, we do not support OpenHarmony or HarmonyOS in winit. So far it is only implemented as an option in the raw-window-handle interopability layer. I was asking if there is a meaningful difference between HarmonyOS and OpenHarmony.

I got it, there is no meaningful difference between HarmonyOS and OpenHarmony. By the way, one more question is that, as we
known, winit is using android-activity as the upper layer to interact with the raw-window-handle on Android, is there any upper layer similar to android-activity, to interact with raw-window-handle on OpenHarmony using by winit ? Thx.

@notgull
Copy link
Member

notgull commented Jan 15, 2025

I am not aware of such a layer if it exists.

@madsmtm
Copy link
Member

madsmtm commented Jan 15, 2025

A quick search reveals at least two GitHub orgs, with a bunch of crates related to this stuff:

@1991wangyufei
Copy link
Author

A quick search reveals at least two GitHub orgs, with a bunch of crates related to this stuff:

Yes, I have noticed this too. Maybe we can create a new glue layer in winit, for OpenHarmony platform, to connect to the upper app layer, just like android-activity or game-activity crate used by winit for Android platform.

@nicoburns
Copy link
Contributor

CC: @jschwe who has been implementing OpenHarmony support in Servo. How is Servo doing windowing on OH?

@jschwe
Copy link

jschwe commented Jan 17, 2025

I was asking if there is a meaningful difference between HarmonyOS and OpenHarmony.

It's basically the same as Android vs AOSP. Supporting OpenHarmony means HarmonyOS is also supported, since any OpenHarmony based OS must be a superset

How is Servo doing windowing on OH?

Servo is not using winit on OH or android right now, but just doing a custom embedder.

I know that @richerfu (Maintainer of ohos-rs) has been working on adding OpenHarmony support to winit though. I'm not sure what the current progress is and if it is far enough along to open a pull request, but perhaps he can comment here what his plan is.

@richerfu
Copy link

richerfu commented Jan 17, 2025

Yes, I'm working on adding OpenHarmony support to winit. At present, we can successfully run winit and glutin-winit(0.30.x). However, there's still work to be done.

  1. Some APIs need to be supported, and we need more examples to test these APIs.
  2. Code cleanup is necessary, as our current code relies on Mutex to handle event callbacks, which impacts performance.

I'll try to mark repo as public and submit a draft PR for winit and glutin-winit as soon as possible. Then all of us can help it be better.
That's all, thanks :)

Here is an example pic for it.
Image

@richerfu
Copy link

A quick search reveals at least two GitHub orgs, with a bunch of crates related to this stuff:

Yes, I have noticed this too. Maybe we can create a new glue layer in winit, for OpenHarmony platform, to connect to the upper app layer, just like android-activity or game-activity crate used by winit for Android platform.

Yep i create a repo named openharmony-ability for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S - enhancement Wouldn't this be the coolest?
Development

No branches or pull requests

6 participants