Stream: beginners

Topic: How to create a platform based on Tao and Wry


view this post on Zulip David Neave (Dec 20 2023 at 23:34):

I'm interested in learning all the necessities for platform creation.

Since it seems the IO binding of a platform have to come from something else, I thought it'd be interesting to make a Tauri-like platform for Roc. Since Tauri is, by itself, a pre-built fusion of Tao and Wry, I was wondering about utilizing Tao and Wry as parts of a Rust platform for Roc, and of course incorporating all the other platform essentials too.

And since the tutorials on platforms doesn't quite exist yet, I figured I'd ask here for some pointers while I peruse the examples

view this post on Zulip Brendan Hansknecht (Dec 20 2023 at 23:40):

Basic CLI is a good base to learn how a rust platform works. Definitely try to use glue if possible (makes it less likely to hit segfaults and such). Also, definitely ask questions as you get into implementation.

view this post on Zulip Brendan Hansknecht (Dec 20 2023 at 23:41):

Also, what are tao, wry, and tauri? Do you have a quick link with explanation?

view this post on Zulip David Neave (Dec 20 2023 at 23:46):

Tao is a window-creation thing, and Wry is a webview renderer. They come together in Tauri to create a nice alternative to Electron. On Windows, it unfortunately still derives from Chromium/Edge, I think. But on Linux and Mac it uses Webkit.

view this post on Zulip David Neave (Dec 20 2023 at 23:47):

The irony is I'm looking to make this platform to delay learning Rust as much as possible, but by making this platform, I'm likely going to have to learn Rust :upside_down:

view this post on Zulip Andrew C (Dec 20 2023 at 23:49):

I would love it so much if this existed.

view this post on Zulip Andrew C (Dec 20 2023 at 23:50):

Please keep me posted if you get things going.

view this post on Zulip Luke Boswell (Dec 21 2023 at 04:56):

We have a gui example that currently uses wgpu. I think maybe @Anton or @Richard Feldman wrote it?? with the view to build the Roc editor (which is still planned but currently a lower priority).

I have been thinking it would be great if that was split out into another platform (maybe basic-graphics) or something. I think I could help clean it up to use glue to generate the types instead of how it is currently implemented (it was written long before glue gen existed). That might serve as a good example for this project. I have completed a similar transformation for basic-webserver which probably is the best example of this currently. I have a branch for basic-cli to upgrade that to use glue gen (I can't remember what the issue is there).

With the current glue and some (minor) workarounds I think we already have all the parts to build cross-platform gui applications using Roc and wgpu.

view this post on Zulip Richard Feldman (Dec 21 2023 at 12:01):

that would be amazing!!! :star_struck:

view this post on Zulip Artur Swiderski (Dec 21 2023 at 18:17):

hi guys do you have platform example for good old C or C++?

view this post on Zulip Norbert Hajagos (Dec 21 2023 at 23:15):

Artur Swiderski said:

hi guys do you have platform example for good old C or C++?

I know of the existance of this, which has a c-platform in it, but can't tell you more on it. Never even opened it to look at before.


Last updated: Jul 06 2025 at 12:14 UTC