preserves 5.0.0-rc.2

Implementation of the Preserves serialization format.
Documentation
TESTARGS=--lib --bins --examples --tests

# cargo install cargo-watch
watch:
	cargo watch -c -x 'test $(TESTARGS) --all-features -- --nocapture'

test:
	cargo test $(TESTARGS) -- --nocapture
	cargo test $(TESTARGS) --all-features -- --nocapture

# to compare: cargo bench --benches -- --load-baseline SOMETHING --baseline main
bench: benches/testdata.bin
	cargo bench --benches -- --save-baseline $$(git branch --show-current)

compare-to-main:
	cargo bench --benches -- --load-baseline $$(git branch --show-current) --baseline main

.INTERMEDIATE: benches/testdata.bin
benches/testdata.bin: benches/testdata.bin.gz
	gzip -dc $< > $@

clippy-watch:
	cargo watch -c -x 'clippy $(TESTARGS)'

inotifytest:
	inotifytest sh -c 'reset; cargo build $(TESTARGS) && RUST_BACKTRACE=1 cargo test $(TESTARGS) -- --nocapture'

debug-tests:
	cargo test $(TESTARGS) --no-run
	gdb --args $$(cargo test 3>&1 1>&2 2>&3 3>&- | grep Running | awk '{print $$2}') --test-threads=1