ulid-lite 0.6.1

ULID generation library and command-line utility
Documentation
.PHONY: all bench clean test install
all: target/release/libulid.rlib
all: target/release/libulid.so
all: target/release/ulid
all: lib/ulid.h
#all: lib/ulid.hpp

install:
	cargo install --path=.

test: lib/ulid.h
test: target/release/libulid.rlib
test: target/release/libulid.so
test: target/release/ulid
	cargo test
	# isolation is disabled to access the system clock
	MIRIFLAGS="-Zmiri-disable-isolation" cargo +nightly miri test

bench:
	cargo bench

clean:
	cargo clean

target/release/ulid: src/lib.rs src/main.rs Cargo.toml Cargo.lock
	cargo build --release --bin ulid

target/release/libulid.rlib: src/lib.rs Cargo.toml Cargo.lock
	cargo build --release --lib

target/release/libulid.so: src/lib.rs Cargo.toml Cargo.lock
	cargo build --features=ffi --release --lib

lib/ulid.h: src/lib.rs cbindgen.toml
	cbindgen --config=cbindgen.toml > lib/ulid.h

#lib/ulid.hpp: src/lib.rs
#	cbindgen -l c++ > lib/ulid.hpp