Commit Graph

12 Commits

Author SHA1 Message Date
Eric Seidel c6647a2dfe refactor: replace reqwest with ureq to reduce binary size (#317)
* refactor: replace reqwest with ureq to reduce binary size

reqwest's blocking API is built on top of its async implementation,
pulling in tokio, hyper, futures, and ~84 other transitive dependencies
even though we only make simple synchronous HTTP calls.

ureq is a synchronous-only HTTP client that eliminates the async
runtime entirely. This reduces transitive dependencies from 227 to 143
and the linked dylib from 4.5 MB to 3.7 MB (-18%). The .a archive
drops from 28 MB to 26 MB, but real savings will be larger once
linked into libflutter with dead code stripping.

The network API surface is unchanged — three functions (patch check,
file download, event reporting) using POST/GET with JSON.

* chore: add ureq to spell check dictionary

* refactor: use into_body() instead of body_mut() where response is consumed

* fix: simplify network error matching to avoid fragile string checks

Consolidate HostNotFound, ConnectionFailed, and all Io errors into
a single network-error arm instead of pattern-matching on error
message strings that could change across OS versions or locales.

* chore: add TODO for misleading network error message
2026-04-01 08:23:48 -07:00
Eric Seidel 6d0e4a1193 chore(deps): bump Rust and Dart dependencies (#315)
* chore(deps): bump Rust and Dart dependencies

Bump Rust dependencies in library/ and patch/:
- comde: 0.2.3 → 0.3.1 (library), 0.2.3 → 0.3.0 (patch)
- zip: 0.6.4 → 3.0.0 (breaking: FileOptions → SimpleFileOptions)
- android_logger: 0.13.0 → 0.15.0
- mockall: 0.12.1 → 0.13.1
- serial_test: 2.0.0 → 3.2.0
- cbindgen: 0.24.0 → 0.28.0

Bump Dart dev dependency in shorebird_code_push/:
- ffigen: upper bound <17.0.0 → <19.0.0

Updated zip API usage (FileOptions → SimpleFileOptions) and
adjusted test assertion for changed error message.

Binary size impact (macOS release, arm64):
- libupdater.a: +83 KB (+0.28%)
- libupdater.dylib: +34 KB (+0.75%)

Closes #206, #271, #273.

* chore: add EOCD to cspell dictionary

The zip 3.0 crate changed its error message to reference "EOCD"
(End of Central Directory), which cspell doesn't recognize.
2026-03-30 15:50:44 -07:00
Bryan Oltman 76f005940d feat: add uuid to updater state, patch check request (#300)
* feat: add uuid to updater state

* add client_id to patch check request

* cleanup

* comments

* cleanup

* more comments

* delete commented-out code

* Update library/src/cache/updater_state.rs

Co-authored-by: Eric Seidel <eric@shorebird.dev>

* formatting

---------

Co-authored-by: Eric Seidel <eric@shorebird.dev>
2025-10-29 15:57:06 -04:00
Bryan Oltman 38aadee1c5 feat: enable updater logging on windows (#256) 2024-12-18 14:10:37 -08:00
Bryan Oltman b4775d30dd feat: support macOS (#247)
* feat: support macOS

* fix tests
2024-12-05 17:53:45 -05:00
Bryan Oltman 0988c854af Revert "feat: generate a rollout group number on UpdaterState creation (#227)" (#231)
This reverts commit 8e7ec5a9b6.
2024-11-07 09:34:32 -05:00
Bryan Oltman 8e7ec5a9b6 feat: generate a rollout group number on UpdaterState creation (#227)
* feat: generate a rollout group number on UpdaterState creation

* update test

* use inclusive range
2024-10-30 17:40:46 -04:00
Bryan Oltman 3da6c38ef4 feat: add timestamp to patch events (#179)
* feat: add timestamp to patch events

* fix test
2024-06-20 15:47:59 -04:00
Bryan Oltman 390aa49cba feat: update patch manager to check signature on boot (#171)
* feat: store patch signature on disk with patch metadata

* add note about explicit lifetime

* fix tests

* feat: update patch manager to check signature on boot

* remove unused imports

* fix tests

* add log when no public key detected

* clean up log message

* pr feedback

* rename test

* rename tests null -> none

* change signature field name to hash_signature

* Add comment

* update print statements for clearer device logs

* fix test

* improve docs

* cleanup of signing error handling
2024-05-23 14:41:02 -04:00
Bryan Oltman 4685789e59 feat: store patch signature on disk with patch metadata (#170)
* feat: store patch signature on disk with patch metadata

* add note about explicit lifetime

* fix tests
2024-05-22 10:00:36 -04:00
Eric Seidel fe465ea1b1 chore: remove unused package (#142) 2024-04-19 21:00:33 +00:00
Bryan Oltman d5cbb5ac7b chore: check in Cargo.lock (#141) 2024-04-19 13:51:22 -07:00