-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add initial support for OpenHarmony #285
Conversation
This adds support all the APIs servo seems to be requiring on OpenHarmony. This patch is heavily based on the existing android implementation.
// TODO: is `target_os = "linux"` the same as the following check? | ||
linux: { all(unix, not(any(macos, android))) }, | ||
linux: { all(unix, not(any(macos, android, ohos))) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it might be a good opportunity to rename the linux
cfg option to something that makes it more clear, that it is meant for unix systems with x11 or wayland. But I'm not sure what a good name would be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this script is just reusing what winit has. Not many other UNIX-like OSes care about desktop environments usually. It's okay to stay linux IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is indeed based on winit, then winit has since changed the names - there is now e.g. free_unix
, x11
and wayland
.
https://github.com/rust-windowing/winit/blob/master/build.rs
I think it would make sense to rename our cfg flags here to match the ones from winit
- would you agree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I didn't realize they changed it. It seems like a good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened a seperate PR for the cfg
changes in #290
The rust toolchain file overrides the Rust version selected in CI. To allow testing different rust versions in CI, respect the toolchain defined in CI.
Could it just reuse the same Android implementation and add |
Hmm, perhaps the common parts could be extracted to a shared |
@mrobinson Do you have any opinions regarding this PR and #290? Would you prefer if the android and ohos implementations would be merged into one directory? |
Sorry for taking so long to look at this. I think that if both platforms use EGL and they have a lot of shared code it probably makes sense to make a shard EGL backend, as you say. |
Superceded by #293 |
This adds support all the surfman APIs servo seems to be requiring on OpenHarmony.
Generic surfaces are not supported at the moment.
This patch is heavily based on the existing android implementation.