2024 Week 45: Quick Updates
Contents
I did not feel something special in this week, so just some quick reviews and updates.
Professional Stuff
Bring macOS native module to electron with NAPI-RS and swift-bridge
TLDR; Build browser webpage, or build native app. Electron/Tauri/Wails is not the best choice for desktop app, unless
- cross-platform is a must
- also the app do not ask for tightly system integration
- and you do not care about the look and feel of the app
We developed a in-context AI assistant tool called Haye, https://haye.ai. And we used to decided to use electron as the framework to build it, and now it looks like electron already become the burden of the project. We want to build the native-like experience on macOS, and we always use the webview to imitate the native. And our app want to integrate with the system, like hotkey, notification, Notes, or Shortcuts. None of them can be easily done with only javascript. And there is not so good ecosystem for electron to do this.
In the last week to bring more seamless text selection experience, I discovered the native API about accessibility and NSEvent, I found that it is soo easy to do this in native app. Building a native module now become a must-have for us. Luckily, I found two interesting projects, NAPI-RS and swift-bridge. The first project could bring rust to nodejs, and the second project could bring swift to rust.
I made a poc last week and it works. So I just take a record here.
We use rust as bridge, with swift-bridge and napi.rs, we could get:
- bring seamless native API integration to nodejs
- type-safe and polyfill; Swift -> Rust -> TypeScript, no more
any
, no moreUnsafeMutablePointer
; - standard publish ci bring by napi.rs.
So using these two projects, I have a way to build and publish node native module with swift and macos native API, somehow it is a good news.
I am still exploring the more direct way / best practice to use NAPI and Swift. I will keep updating the progress.
But there is one more thing I still need to figure out, some of rpc framework like GRPC, already have the unified DSL to define the service and message, and it supports multiple languages. I am thinking about if I could use the same DSL to define the native API, and just use it as ffi. I will also keep exploring this.
If you have any idea or experience about this, please let me know.
Haye new version released
We release a new version of Haye. It brings the dedicated window for view chat history and start new chatting.
早上好 / 中午好 / 晚上好 !!
— STRRL.gpt (@strrlthedev) November 9, 2024
Haye AI 更新啦! 现在除了划词唤起外, 还支持了直接对话模式. 现在已经是我主力的 AI 对话软件了!
想拥有方便美观 AI 聊天软件朋友们, 请立刻用起来! 🥰https://t.co/QGR1TdIV7r pic.twitter.com/CJbr1HfJFt
And we offer a discount, the pricing is 50% off, from $9.99 to $4.99. If you are interested in it, please check it out here;
I also bump the minor version of the app, from 0.1.x to 0.2.x;
scarf.sh
Several weeks ago, I read the linkerd’s story, Towards a Sustainable Service Mesh. In a short word, linkerd would not provide stable release for free, only with the buoyant enterprise subscription.
And days later, I found the linkerd’s show case with scarf.sh, How Buoyant Drives Open-Source-Led Growth with Linkerd. Scarf.sh is a tool to help open-source project to track the usage of the project, and also help the project to monetize the usage.
I take a try with my personal project, STRRL/cloudflare-tunnel-ingress-controller, and it is very easy to setup. I will keep tracking the usage of my project with scarf.sh.
BTW if you do not know cloudflare-tunnel-ingress-controller, check it here: Unlocking the Power of Cloudflare Tunnel: Secure, Scalable, and Simple Kubernetes Ingress Controller Implementation for Your Applications.
It looks great so far, and I will share it on the Chaos Mesh development meeting, and consider to use it in the project.
Personal Stuff
VanLUG, meet Hank, and sustainable community
I joined the Vancouver Linux User Group Meeting last week, that’s Annual General Meeting, the boards of VanLUG share the wrap-up of the last year.
Nester is impressive, he shared the updates and the future plan of VanLUG. The community did become more active and more awesome in 2024, but it still facing problem on making value and sustainability.
2024 Year End Report from Nestor
The link of presentation on VanLUG is not correct, I would send email to them for asking the correct link. Once I get it, I will update it here.Updated!
I joined as the paid member, get my vote-card.
BTW, I forgot to take cash, so I borrow $20 from Alex. Then I return it to him with e-transfer. People here are so nice, when I ask for help, they propose to lend me the money. I am so grateful for that.
I also meet with Hank! Handsome big brother! 🔥
🔥🔥🔥 今天在 Vancouver Linux User Group 上面基了 @hankbao pic.twitter.com/0VTOGzentd
— STRRL.gpt (@strrlthedev) November 10, 2024
Crypto
After big election completed, the crypto market is getting fire again. Bitcoin is hitting $90k.
I still not get the point of the crypto currency, I use to chase “value” in the market. So I dig into the projects, finding out what them really make.
But there are not so many projects really make sense. I am still looking for the project that could bring the “real value” to the world.
Maybe the currency itself is the value, and that’s why even memocoin could go high. But I still not get it.