-
-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update QR-code-generator #1639
Comments
I see that the current version of this Trezor repository has pinned my QR lib at a version from 2019-02-14. Trezor is using the C language version of my library. What has changed between then and now in the C port:
For the C lib, when moving from the 2019-02-14 version to the 2020-09-12 version, the impact on callers should be small. |
My C library completely avoids heap allocations; it expects the caller to pass in input/output buffers and scratch space. This is not true for my other language ports; all of them do heap allocations and deallocations. So neither my C++ lib nor Rust lib match this feature of my C lib. Also, my Rust lib doesn't define a C foreign function interface (FFI) or do anything to help users coming from other languages. |
@nayuki Thanks for the summary! It seems like it makes sense to stick to the C version for now. Maybe in the future when we rewrite the whole rendering stack to Rust (so no FFI is needed) and when qrcodegen crate works with |
@mmilata any special testing needed on our side or just test/validate/compare QR code generated by T1 and TT in current dev master ? |
FYI I made this a reality last week: https://github.com/nayuki/QR-Code-generator/tree/master/rust-no-heap |
QA OK trezor-fw-regular-2.4.3-221977ad.bin BTC receive QR code OK |
https://github.com/nayuki/QR-Code-generator
couldn't find a changelog, reviewing all commits shouldn't be too difficult though
I also notice they have a Rust version! and it's available as a crate too. Maybe investigate switching to that?
The text was updated successfully, but these errors were encountered: