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

How do OpenSwiftUI and SwiftUIEmbedded work? #1

Open
ngocdaothanh opened this issue Nov 6, 2019 · 5 comments
Open

How do OpenSwiftUI and SwiftUIEmbedded work? #1

ngocdaothanh opened this issue Nov 6, 2019 · 5 comments

Comments

@ngocdaothanh
Copy link

ngocdaothanh commented Nov 6, 2019

Hi,

How do OpenSwiftUI and SwiftUIEmbedded work and how they are structured?

It seems that you are creating a renderer:
https://github.com/Cosmo/Pixels

I'm creating this renderer:
https://github.com/swiftfn/SkiaSwift

Demo:
https://github.com/swiftfn/SkiaSwift/blob/master/Sources/Demo/main.swift

It's about 50% finished, I'm aiming to finish it soon.

I think it's very useful for your OpenSwiftUI project,
so that you can focus on porting SwiftUI,
instead of having to create your own renderer.

@Cosmo
Copy link
Owner

Cosmo commented Nov 8, 2019

Hey @ngocdaothanh, thanks for reaching out!

OpenSwiftUI provides the infrastructure and SwiftUI DSL without any platform-specific code.
That means the actual rendering of a UI + Interaction and platform-specific elements is supposed to come from another project (like SwiftUIEmbedded for example).
This kind of separation will pave out the way for many different implementations of (Open)SwiftUI on various platforms without dictating how things should look and feel like.

I created SwiftUIEmbedded to show an extreme example of running SwiftUI outside of iOS, tvOS, watchOS or macOS on simple hardware.
This project depends on OpenSwiftUI and extends it with the actual rendering.

For 2D graphics I had these technologies / libraries in mind:

I was quite overwhelmed with the many possibilities and also didn't want to bother to think about compiling C or other languages, writing bridges, testing etc.
So I created Pixels to keep things simple for now without having any external dependencies.
What I know, is that Pixels was great to have at least something, but keeping it as part of the project makes no sense for the future.

In the following days I'll work on some code clean up tasks, updating the README and make the project more friendly towards potential contributors.

Any suggestions or pull requests are welcome of course!

@lin7sh
Copy link

lin7sh commented Nov 20, 2019

Also pointing out to a cross-platform rendering API bgfx, it supports all popular backend including(metal, vulkan, directx12)
and another cross-platform swift UI framework already plan to moving its rendering backend to it

@Cosmo
Copy link
Owner

Cosmo commented Dec 12, 2019

@ngocdaothanh are you still working on SkiaSwift?

@ngocdaothanh
Copy link
Author

ngocdaothanh commented Dec 13, 2019

I'm pausing SkiaSwift to work on a tool to automatically create Swift binding for Skia:
https://github.com/swiftfn/Cpp4Susans

SkiaSwift is manual work, so every time Skia changes, SkiaSwift needs to be manually updated.

@Cosmo
Copy link
Owner

Cosmo commented Dec 13, 2019

Oh, that's really cool!

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