Skip to content

feat: add OpenHarmony platform backend - #4684

Open
richerfu wants to merge 1 commit into
rust-windowing:masterfrom
richerfu:master
Open

richerfu wants to merge 1 commit into
rust-windowing:masterfrom
richerfu:master

Conversation

@richerfu

@richerfu richerfu commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
  • Tested on all platforms changed
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

Add OpenHarmony support, i add a independent crate in ohos-rs group. And add it as dependence for winit. Follow #4330

@cavivie

cavivie commented Sep 14, 2026

Copy link
Copy Markdown

@richerfu It's been a year and we're almost done, thanks! @kchibisov

@richerfu
richerfu force-pushed the master branch 2 times, most recently from f414679 to ace89b6 Compare September 20, 2026 03:06
@richerfu

Copy link
Copy Markdown
Contributor Author

@kchibisov Hi is it possible to review this PR and give us some fallbacks? Can we add ohos platform support for winit? Thanks :)

Comment thread winit/src/changelog/unreleased.md Outdated
Comment thread winit/src/platform_impl/mod.rs
@ogoffart

Copy link
Copy Markdown
Contributor

This is the first out of tree platform that we'd have.
But I think we have a problem on how to proceed here.
We have this chain of dependency:
winit-core ← winit-ohos ← winit
And they (will) depend on eachother with a =0.31.0

So when we will release winit 0.31.0 it will have to be done in that order

  1. winit-core, from this repository, and other crates, but not winit
  2. you release winit-ohos
  3. Now we can release winit from this repo.

I think that's too much coordination to ask. And the whole point of asking for out-of-tree platform was that we didn't want to coordinate :-(

So not sure what's best here.

@kchibisov any idea?

Maybe what need to be done here is to have winit-ohos be something like so:

// winit-ohos/lib.rs

pub use winit::*;  // winit-ohos depends on winit and re-export everything

// But override platform
mod platform {
   mod ohos;
}

Then in their Cargo.toml, people would do

[target.'cfg(target_env = "ohos")'.dependencies]
winit = { package = "winit-ohos", version = "0.31" }

But that would still be an issue for the platform_impl module so that's not a full solution.

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants