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.
I don’t distrust rust, I think it is great for some things. But I write code to enjoy myself and swift hits the spot between safety and satisfaction for me.
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
One of the biggest issues I ran into years ago was debugging outside of macOS was a nightmare. Even now, debugging is a terrible experience on a non-trivial project. I am not really sure if it the size of the projects I've worked on, interop with objc, compiler configs, project configs, or what, but it has always been a bad experience. I used it on/off for a project on Linux and the debugger didn't work at all. This was so long ago I am sure that has changed but at least so far in my experience, lldb will stop working at some point. I've worked on large Obj-C and C++ codebases and never ran into any of the problems I've run into with swift in this area.
I tried using it on Windows, but it failed to compile as soon as I used file IO. The error was non-descriptive and had no matches online. I couldn't figure it out so I tried it without file IO, but as others have said the compiler is odd, the errors are odd, and in general doesn't feel like the tooling is nearly as good as most other popular languages
About 5-6 years ago, I worked a fair bit on an iOS app, primarily in swift (there were some obj-c and C++ bits). Until then, 90% of what I had written was either C++ or python on Linux, and I had never worked on a mobile app and had barely used MacOS (or iOS for that matter, I've always had android phones). From that experience I had an unexpectedly favorable impression of the swift language. I thought the ergonomics of the typing system and error handling compared quite favorably to C++, with better performance and safety compared to python. I didn't really like the Apple frameworks though, it felt like they were always making new ones and the documentation was surprisingly poor. Nor did I really gel with XCode (which is virtually a requisite for iOS development) or MacOS itself. But I actually liked swift enough that I give it a try outside of ios for a few test apps. Unfortunately, at the time swift outside iOS wasn't really mature and there wasn't much of an ecosystem. Not sure how much that has changed, but these days I'd probably reach for rust instead.
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…
> Tauri is a framework for building tiny, fast binaries for all major desktop and mobile platforms. Developers can integrate any frontend framework that compiles to HTML, JavaScript, and CSS for building their user experience while leveraging languages such as Rust, Swift, and Kotlin for backend logic when needed.
I asked the author about whether this could be ported to support Android/Linux/Windows and he was optimistic it would not be much trouble. So I plan to look into that.
What I’d like to determine first is if I can use this for brownfield development: on Apple platforms I’d like to stick to native SwiftUI and use Velox only for some views inside of a SwiftUI host application. And then on other platforms it can be fully Velox.
I can’t find any info on people doing this with Tauri. Expo recently added this about a month ago for React Native but I’d prefer to use Swift everywhere. I appreciate any info.
Miguel de Icaza is kind of a legend, I know him most from his work on Mono and Gnome. Whatever he works on today will likely be part of a stack you work on in a few years (at least that's my experience).
I have always felt like Swift is the king of application development. The syntax and ergonomics really lend itself to UIs and the like. It's a shame that the Swift compiler is on the slow side.
I understood the point of Tauri is to write the apps with Typescript and web tech and to NOT have to write Rust or even know Rust. So why would it need to be ported to Swift when the point of Rust in Tauri just so the devs themselves or the wider community can write the base and plugins and stuff in Rust and the apps the general dev writes with it are written in TS?
I looked at Tauri like an Electron alternative that in the future will run with Servo under the hood.
18 comments
[ 2.3 ms ] story [ 36.5 ms ] threadTogether 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.
Your satisfaction might be different, enjoy it!
https://news.ycombinator.com/item?id=45417366
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…
> Tauri is a framework for building tiny, fast binaries for all major desktop and mobile platforms. Developers can integrate any frontend framework that compiles to HTML, JavaScript, and CSS for building their user experience while leveraging languages such as Rust, Swift, and Kotlin for backend logic when needed.
https://v2.tauri.app/start/
What I’d like to determine first is if I can use this for brownfield development: on Apple platforms I’d like to stick to native SwiftUI and use Velox only for some views inside of a SwiftUI host application. And then on other platforms it can be fully Velox.
I can’t find any info on people doing this with Tauri. Expo recently added this about a month ago for React Native but I’d prefer to use Swift everywhere. I appreciate any info.
I looked at Tauri like an Electron alternative that in the future will run with Servo under the hood.