Files
shorebird-updater/patch/Cargo.toml
T
Eric Seidel 226df7d08d test: Make our rust tests use per-thread config rather than global static (#14)
* Make our rust tests use per-thread config rather than global static

This lets our unit tests run in parallel.  I also moved our "integration"
tests back to be unit tests for now.

This also exposes a network mocking abstraction.

I've added an incomplete test of applying a full patch.  Still
needs some work to complete.

* Finish making the patch success test work

* Changed our test config to use println instead of info/error, etc. so that tests show output on failure (there might be a better way?)
Unfortunately macro_use (which is the way we were causing error!, info! etc to appear everywhere with only one global import before, only works on crates not on std, so I had to be explicit with my imports per-file.
* Add a function to build a fake zip file, because that's what the updater currently expects.  Better would be for us to move to a AssetManager system I suspect, then the updater would ask the asset manager for the libapp.so and we'd return it instead of having to go through writing out a zip file.
* Added a string_patch.rs tool and shared code between that and the patch tool.  This made it possible/easy for me to generate the necessary binary patches as well as needed hashes to pretend to be the patch server.
* Added one simple test of the patch tool core logic.

In total we're now above 80% coverage of our rust code after this.

* remove stray comment
2023-04-26 13:07:19 -05:00

24 lines
806 B
TOML

[package]
name = "patch"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# Compression and decompression of patch files.
bidiff = "1.0.0"
# Pipe is a simple in-memory pipe implementation, there might be a std way too?
pipe = "0.4.0"
# comde is a wrapper around several compression libraries.
# We only use zstd and could depend on it directly instead.
comde = {version = "0.2.3", default-features = false, features = ["zstandard"]}
# Only used by string_patch tool:
# I don't know how to make them per-target dependencies.
# For computing hashes of patch files for validation.
# Only used by the string_patch tool for now.
sha2 = "0.10.6"
# For encoding hashes for Patch network responses.
hex = "0.4.3"