.RECIPEPREFIX := >
CARGO ?= cargo
PYTHON ?= python3
LAKE ?= lake
LEAN_SPEC_DIR ?= ../lazily-spec/formal/lean
LEAN_FORMAL_DIR ?= ../lazily-formal
.PHONY: \
check \
fmt \
clippy \
build \
build-ffi \
ffi-headers \
test \
test-thread-safe \
test-tokio \
test-async \
test-async-resolve \
test-loom \
test-distributed \
test-ffi \
test-ffi-binary \
test-ipc \
test-ipc-binary \
test-ipc-conformance \
test-collections-conformance \
test-seqcrdt-conformance \
test-schema-compliance \
test-statechart-conformance \
test-lean-formal \
test-lazily-formal \
test-signaling-client \
test-webrtc \
test-websocket \
benchmark-check \
benchmark-update \
instrumentation-profile
check: fmt clippy build test test-thread-safe test-tokio test-async test-async-resolve test-loom test-distributed test-crdt-plane test-ffi test-ffi-binary test-ipc test-ipc-binary test-ipc-conformance test-collections-conformance test-seqcrdt-conformance test-schema-compliance test-statechart-conformance test-lean-formal test-lazily-formal test-signaling-client test-webrtc test-webrtc-signaling test-websocket benchmark-check
fmt:
>$(CARGO) fmt --all --check
clippy:
>$(CARGO) clippy --locked --all-targets --all-features -- -D warnings
build:
>$(CARGO) build --locked --all-targets --all-features
build-ffi:
>$(CARGO) build --locked --features ffi
ffi-headers: build-ffi
>cbindgen --config cbindgen.toml --crate lazily -o target/lazily.h
test:
>$(CARGO) test --locked
test-thread-safe:
>$(CARGO) test --locked --features thread-safe
test-tokio:
>$(CARGO) test --locked --features "tokio thread-safe"
test-async:
>$(CARGO) test --locked --features async
test-async-resolve:
>$(CARGO) test --locked --features "async instrumentation" --test async_resolve_loop
test-loom:
>$(CARGO) test --locked --features loom --test thread_safe_loom
test-distributed:
>$(CARGO) test --locked --features "distributed serde"
test-crdt-plane:
>$(CARGO) test --locked --features "distributed webrtc"
test-ffi:
>$(CARGO) test --locked --features ffi --test ffi
test-ffi-binary:
>$(CARGO) test --locked --features "ffi ipc-binary" --test ffi
test-ipc:
>$(CARGO) test --locked --features ipc --test ipc
test-ipc-binary:
>$(CARGO) test --locked --features ipc-binary --test ipc
test-ipc-conformance:
>$(CARGO) test --locked --features ipc --test conformance
test-collections-conformance:
>$(CARGO) test --locked --test collections_conformance
test-seqcrdt-conformance:
>$(CARGO) test --locked --features distributed --test seqcrdt_conformance
test-schema-compliance:
>$(CARGO) test --locked --features ipc --test schema_compliance
test-statechart-conformance:
>$(CARGO) test --locked --features statechart-json --test statechart_conformance
test-lean-formal:
>test -d "$(LEAN_SPEC_DIR)" || { echo "missing $(LEAN_SPEC_DIR); clone lazily-spec as a sibling or set LEAN_SPEC_DIR"; exit 1; }
>cd "$(LEAN_SPEC_DIR)" && $(LAKE) build
test-lazily-formal:
>test -d "$(LEAN_FORMAL_DIR)" || { echo "missing $(LEAN_FORMAL_DIR); clone lazily-formal as a sibling or set LEAN_FORMAL_DIR"; exit 1; }
>cd "$(LEAN_FORMAL_DIR)" && $(LAKE) build
test-signaling-client:
>$(CARGO) test --locked --features signaling-client
test-webrtc:
>$(CARGO) test --locked --features webrtc-str0m
test-webrtc-signaling:
>$(CARGO) test --locked --features "signaling-client webrtc-str0m" --test webrtc_signaling
test-websocket:
>$(CARGO) test --locked --features websocket
benchmark-check:
>$(PYTHON) scripts/update-benchmark-results.py --check
benchmark-update:
>$(PYTHON) scripts/update-benchmark-results.py
instrumentation-profile:
>$(CARGO) run --example instrumentation_profile --features "instrumentation thread-safe" --quiet