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

Thoughts on Windows 11 C# Windows App SDK WinUI 3 XAML #164

Open
kaidelorenzo opened this issue Dec 3, 2023 · 4 comments
Open

Thoughts on Windows 11 C# Windows App SDK WinUI 3 XAML #164

kaidelorenzo opened this issue Dec 3, 2023 · 4 comments

Comments

@kaidelorenzo
Copy link

I'm wondering about 2 things

  1. Are there plans to build out C#/WinUI 3 support?
  2. Is that something that folks would get behind integrating into Crux?
@charypar
Copy link
Member

Hi @kaidelorenzo! Thanks for the questions.

  1. Not at present. We don't have a use for it, and it would likely depend on Custom code generation from serde-reflection metadata #145
  2. We would definitely welcome your thoughts on what if anything should be supported (beyond C# typegen) and contributions towards it.

There are a few things that depend on the custom type gen in #145, so it's relatively likely we'll start investigating options there pretty soon.

@kaidelorenzo
Copy link
Author

I haven't given much thought to what limitations would be acceptable. I've read online that the interop between c# and rust isn't great right now so that might make things more challenge.

My goal would probably be minimal typegen support so that it is possible to run the framework even if the data types sent are simple (maybe restrict to integer or string structs only).

I don't have much time right now to work on this but glad that you'd be open to contributions. To me Windows seems like the last native platform that doesn't already work with crux.

@charypar
Copy link
Member

charypar commented Jan 2, 2024

One problem for which I can't see an immediate solution is representing Rust enum's, which are quite central to how Crux communicates with the shells (for events and effects). We'd need to do something like this probably https://bugsquash.blogspot.com/2012/01/encoding-algebraic-data-types-in-c.html. I'm not very familiar with the windows ecosystem, but maybe it would make more sense to target F# and rely on its interop with C# if that's more mature?

@StuartHarris Do you know much about the state of interop in C# land?

@StuartHarris
Copy link
Member

I don't. But I'm putting this link here mainly so I can find it again to do a bit more reading on it. https://github.com/FractalFir/rustc_codegen_clr

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

No branches or pull requests

3 participants