diff --git a/Makefile b/Makefile index 30185f9e8..5275d201f 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ MINIMUM_TCL_VERSION := 8.6 SQLITE_EXEC ?= scripts/limbo-sqlite3 RUST_LOG := off -all: check-rust-version limbo +all: check-rust-version build .PHONY: all check-rust-version: @@ -39,13 +39,13 @@ check-tcl-version: | tclsh .PHONY: check-tcl-version -limbo: +build: check-rust-version cargo build -.PHONY: limbo +.PHONY: build -limbo-c: +turso-c: cargo cbuild -.PHONY: limbo-c +.PHONY: turso-c uv-sync: uv sync --all-packages @@ -55,14 +55,14 @@ uv-sync-test: uv sync --all-extras --dev --package turso_test .PHONE: uv-sync -test: limbo uv-sync-test test-compat test-alter-column test-vector test-sqlite3 test-shell test-memory test-write test-update test-constraint test-collate test-extensions test-mvcc test-matviews +test: build uv-sync-test test-compat test-alter-column test-vector test-sqlite3 test-shell test-memory test-write test-update test-constraint test-collate test-extensions test-mvcc test-matviews .PHONY: test -test-extensions: limbo uv-sync-test +test-extensions: build uv-sync-test RUST_LOG=$(RUST_LOG) uv run --project limbo_test test-extensions .PHONY: test-extensions -test-shell: limbo uv-sync-test +test-shell: build uv-sync-test RUST_LOG=$(RUST_LOG) SQLITE_EXEC=$(SQLITE_EXEC) uv run --project limbo_test test-shell .PHONY: test-shell @@ -100,11 +100,11 @@ test-json: RUST_LOG=$(RUST_LOG) SQLITE_EXEC=$(SQLITE_EXEC) ./testing/json.test .PHONY: test-json -test-memory: limbo uv-sync-test +test-memory: build uv-sync-test RUST_LOG=$(RUST_LOG) SQLITE_EXEC=$(SQLITE_EXEC) uv run --project limbo_test test-memory .PHONY: test-memory -test-write: limbo uv-sync-test +test-write: build uv-sync-test @if [ "$(SQLITE_EXEC)" != "scripts/limbo-sqlite3" ]; then \ RUST_LOG=$(RUST_LOG) SQLITE_EXEC=$(SQLITE_EXEC) uv run --project limbo_test test-write; \ else \ @@ -112,7 +112,7 @@ test-write: limbo uv-sync-test fi .PHONY: test-write -test-update: limbo uv-sync-test +test-update: build uv-sync-test @if [ "$(SQLITE_EXEC)" != "scripts/limbo-sqlite3" ]; then \ RUST_LOG=$(RUST_LOG) SQLITE_EXEC=$(SQLITE_EXEC) uv run --project limbo_test test-update; \ else \ @@ -120,7 +120,7 @@ test-update: limbo uv-sync-test fi .PHONY: test-update -test-collate: limbo uv-sync-test +test-collate: build uv-sync-test @if [ "$(SQLITE_EXEC)" != "scripts/limbo-sqlite3" ]; then \ RUST_LOG=$(RUST_LOG) SQLITE_EXEC=$(SQLITE_EXEC) uv run --project limbo_test test-collate; \ else \ @@ -128,7 +128,7 @@ test-collate: limbo uv-sync-test fi .PHONY: test-collate -test-constraint: limbo uv-sync-test +test-constraint: build uv-sync-test @if [ "$(SQLITE_EXEC)" != "scripts/limbo-sqlite3" ]; then \ RUST_LOG=$(RUST_LOG) SQLITE_EXEC=$(SQLITE_EXEC) uv run --project limbo_test test-constraint; \ else \ @@ -136,22 +136,22 @@ test-constraint: limbo uv-sync-test fi .PHONY: test-constraint -test-mvcc: limbo uv-sync-test +test-mvcc: build uv-sync-test RUST_LOG=$(RUST_LOG) SQLITE_EXEC=$(SQLITE_EXEC) uv run --project limbo_test test-mvcc; .PHONY: test-mvcc -bench-vfs: uv-sync-test - cargo build --release +bench-vfs: uv-sync-test build-release RUST_LOG=$(RUST_LOG) uv run --project limbo_test bench-vfs "$(SQL)" "$(N)" -bench-sqlite: uv-sync-test - cargo build --release +bench-sqlite: uv-sync-test build-release RUST_LOG=$(RUST_LOG) uv run --project limbo_test bench-sqlite "$(VFS)" "$(SQL)" "$(N)" clickbench: ./perf/clickbench/benchmark.sh .PHONY: clickbench +build-release: check-rust-version + cargo build --bin tursodb --release --features=tracing_release bench-exclude-tpc-h: @benchmarks=$$(cargo bench --bench 2>&1 | grep -A 1000 '^Available bench targets:' | grep -v '^Available bench targets:' | grep -v '^ *$$' | grep -v 'tpc_h_benchmark' | xargs -I {} printf -- "--bench %s " {}); \ diff --git a/bindings/dart/rust/Cargo.toml b/bindings/dart/rust/Cargo.toml index ace4c80a7..cbc0c6fbb 100644 --- a/bindings/dart/rust/Cargo.toml +++ b/bindings/dart/rust/Cargo.toml @@ -7,6 +7,9 @@ license.workspace = true repository.workspace = true publish = false +[features] +release = ["turso_core/tracing_release"] + [lib] crate-type = ["cdylib", "staticlib"] diff --git a/bindings/java/Cargo.toml b/bindings/java/Cargo.toml index b0f69db94..93858e0a1 100644 --- a/bindings/java/Cargo.toml +++ b/bindings/java/Cargo.toml @@ -6,7 +6,8 @@ edition.workspace = true license.workspace = true repository.workspace = true publish = false - +[features] +tracing_release = ["turso_core/tracing_release"] [lib] name = "_turso_java" crate-type = ["cdylib"] diff --git a/bindings/javascript/Cargo.toml b/bindings/javascript/Cargo.toml index a3b2384fe..836780122 100644 --- a/bindings/javascript/Cargo.toml +++ b/bindings/javascript/Cargo.toml @@ -20,6 +20,6 @@ tracing.workspace = true [features] encryption = ["turso_core/encryption"] browser = [] - +tracing_release = ["turso_core/tracing_release"] [build-dependencies] napi-build = "2.2.3" diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 46023b643..2ffc62f8a 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -14,6 +14,7 @@ crate-type = ["cdylib"] [features] # must be enabled when building with `cargo build`, maturin enables this automatically extension-module = ["pyo3/extension-module"] +tracing_release = ["turso_core/tracing_release"] [dependencies] anyhow = "1.0" diff --git a/bindings/rust/Cargo.toml b/bindings/rust/Cargo.toml index 0f35d0b2f..63be50f42 100644 --- a/bindings/rust/Cargo.toml +++ b/bindings/rust/Cargo.toml @@ -14,6 +14,7 @@ default = ["experimental_indexes"] conn_raw_api = ["turso_core/conn_raw_api"] experimental_indexes = [] antithesis = ["turso_core/antithesis"] +tracing_release = ["turso_core/tracing_release"] [dependencies] turso_core = { workspace = true, features = ["io_uring"] } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 74a37cd47..92f384c6f 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -51,6 +51,7 @@ mimalloc = { workspace = true } [features] default = ["io_uring"] io_uring = ["turso_core/io_uring"] +tracing_release = ["turso_core/tracing_release"] [build-dependencies] syntect = { git = "https://github.com/trishume/syntect.git", rev = "64644ffe064457265cbcee12a0c1baf9485ba6ee" } diff --git a/core/Cargo.toml b/core/Cargo.toml index 88c209e44..fb79398c4 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -16,6 +16,7 @@ path = "lib.rs" [features] default = ["fs", "uuid", "time", "json", "series"] antithesis = ["dep:antithesis_sdk"] +tracing_release = ["tracing/release_max_level_info"] conn_raw_api = [] fs = ["turso_ext/vfs"] json = []