| ▲ | Velox: A Port of Tauri to Swift by Miguel de Icaza(github.com) |
| 78 points by wahnfrieden 7 days ago | 15 comments |
| |
|
| ▲ | mintflow 12 minutes ago | parent | next [-] |
| Have built a cross alternative tailscale gui client based on tauri, the rust and ffi to cgo tailscale feel a little tough, I was wondering it will save a lot time to me if the tauri had been written in go. Seems Miguel’s velox point a new idea, leveraging the wry and use ffi to go, and rewrite some tooling. I hope I will have the spare time and energy to give a try… |
| |
|
| ▲ | embedding-shape 3 hours ago | parent | prev | next [-] |
| The runtime-wry-ffi (https://github.com/velox-apps/velox/blob/f062211ced4c021d819...) file which is 3.2K lines long and has close to a 100 unsafe calls, isn't that just interacting with wry which has it's own crate you could use instead? I'm not 100% sure, but seems to be basically the same as wry itself but without the cross-platform stuff, is that the purpose of that file? Together with the author's distaste for Rust, it seems awfully dangerous instead of pulling in a crate made by Rust developers, but I might misunderstand the purpose of the file here. |
| |
| ▲ | nicoburns 3 hours ago | parent | next [-] | | I believe that is wrapping the Wry crate (and a few other crates) in a C API that can be accessed over FFI (which can then presumably be called directly be Swift code). | | |
| ▲ | embedding-shape 2 hours ago | parent | next [-] | | Thanks for helping me understand! So to clarify, that file is wrapping Wry with a C API, and Wry itself is merely wrapping whatever webview is available on the OS? | | |
| ▲ | nicoburns 2 hours ago | parent [-] | | > So to clarify, that file is wrapping Wry with a C API, and Wry itself is merely wrapping whatever webview is available on the OS? Yep, that sounds about right to me. Although it looks like that file is also wrapping Tao (which is a cross-platform windowing/event loop library). |
| |
| ▲ | zozbot234 an hour ago | parent | prev [-] | | Shouldn't this kind of work be upstreamed to the original project, though? It would enable wry to export a libwry.so dynamic library for general use in any language that can FFI with C. |
| |
| ▲ | oscargrouch 2 hours ago | parent | prev [-] | | > Together with the author's distaste for Rust As someone who understand the sentiment, I wouldn't call it distaste for Rust. It feels more as Rust not being the right tool for the job and to be honest I have the same feeling here. Rust is great for a bunch of problem domains, but it doesn't feel to be the best tool for this specific problem domain.
It's always about the choices a programming language makes, it make it good for some use-cases and bad for others and there's nothing wrong with it.
Also as a cautionary tale about panacea programming languages, Java once tried it with great success to be "the one" language to rule them all and we can see that even though it was a popular choice in many domains, slowly other fitting solutions to specific problem domains took over. Proving that there is no such a thing, unfortunately for us, but some languages gets closer than others (Rust being one of them). |
|
|
| ▲ | hollowturtle 28 minutes ago | parent | prev | next [-] |
| To anybody with experience, how's Swift? Especially outside MacOS/iOS programming. Let's say I want to use it standalone for doing some systems programming, how's the standard lib? I'd like to not rely on apple specific frameworks like uikit |
|
| ▲ | boxed 3 hours ago | parent | prev | next [-] |
| A "port" or "a nice Swift API for it"? It seems like the latter in that it requires cargo (the rust build chain) to build. |
| |
| ▲ | m12k 3 hours ago | parent [-] | | It uses the Tao and Wry crates the same as Tauri does. So it's a port of Tauri but not of its dependencies | | |
|
|
| ▲ | robert3005 3 hours ago | parent | prev | next [-] |
| Not to be confused with Velox a compute engine https://github.com/facebookincubator/velox/ |
|
| ▲ | vlovich123 2 hours ago | parent | prev [-] |
| Eh. Dioxus to me is the more interesting project honestly. |
| |
| ▲ | littlestymaar 20 minutes ago | parent [-] | | It doesn't tick the “I dislike Rust” box which is apparently the main motivation for this project. |
|