详解 Rust 实现的跨平台去中心的应用 Local Native
2021-03-30《Rust唠嗑室》第21期
2021-03-30《Rust唠嗑室》第21期
推进 FLOSS 项目 https://localnative.app 的 Rust GUI 代码和相关的 educative 教程的编写, 招募代码, 文档和教程贡献同学。
Rust GUI 编程
给 educative.io 上相关课程加入新实现的内容
写计划Blog 和 总结 Blog, 完善文档
借鉴G家2021 SoC的时间线
| 日期 | 事件 | 津贴 |
|---|---|---|
| March 29 - April 13 | 申请 | |
| April 13 - May 17 | 确定申请结果 | |
| May 17 - June 7 | 熟悉代码和框架,写计划 Blog | |
| June 7 - July 18 | code() and debug() and document() | July 18 First Evaluation 45% |
| July 18 - August 16 | code() and debug() and document() | |
| August 16-31 | 写总结 Blog 和 educative 教程文档 | August 31 Final Evaluation 55% |
欢迎有Rust经验的同学申请!
备注 SoC 发送
100 seems the highest 26 weeks number I see so far.

It has been another few months since last Local Native v0.4.1 release, which was not able to include iOS version due to crashing in TestFlight. Now iOS v0.4.1 is finally released!
I still could not identify how the crash occurs by staring at the crash log.
It turns out the fix is to rewrite iOS code in SwiftUI.
Fortunately thanks to existing solutions for data flow, search bar, QR code, hiding keyboard, the rewrite is very pleasant and code becomes more concise by removing storyboard and view controllers.
One thing maybe a drawback from previous iOS version is that the bookmark note text is not selectable.
It has been a few months since last Local Native v0.4.0 release, which introduced (wireless) syncing via tarpc, database schema change and more. That is decent amount of internal data structure change and observable new features. Everything was well and I was not worrying about rushing out more features very soon, until ..
In contrast, this v0.4.1 release is only motivated by fixing the one observed bug:
the touch input keyboard for the share extension's text fields (tag and description fields etc..) does not show up in iOS, after upgrading to newer version (iOS 13.2.2 as of writing). This prevents user to input tag or description, or change title or url for the note.
Saving note still works, but what's the fun if I can not add tags to a note?
Technically This is a new feature only in newer version of iOS. How hard could be
I've given a talk at Rust NYC for its 2019 September Meetup.
Above is the screen capture video remake when going over the slides again with my HXNYC 2019 class.
As hinted in the previous post, this v0.4.0 release is a MVP to show sync between different devices using slightly patched tarpc . Currently sync works between desktop and desktop, desktop and mobile when they are on the same LAN/WiFi.
The schema of note table is updated to have an extra uuid column to uniquely identify and dedup records for sync. At the end of sync operation, both devices will end up with same set of uuid by appending the diff from the other device.
Mobile device can scan a QR code encoding the server address and port to connect to the server to start sync.
iOS sync screenshot:

I have not cut a release yet, but the work-in-progress Local Native v0.4.0 introduced a new uuid4 field into note table.
Why?
This serves as a unique key for each record, syncing between different devices could leverage this new column. Actual code for syncing is still yet to be written. The idea is uuid4 could be used as a record identifier to compare with records with other devices.
I considered using key based on actual content, but decided that's too much and preferred true randomness.
It's straight forward to setup Open Collective (takes 10% with fiscal host) and Pateron (takes 8% with tier and goal features).
This release adds QR code display for url.
