2023-08-03 09:55:06 +00:00
|
|
|
# Setup
|
|
|
|
[tasks.cargo-upgrade]
|
|
|
|
private = true
|
|
|
|
command = "cargo"
|
|
|
|
args = ["upgrade", "--pinned"]
|
|
|
|
|
|
|
|
[tasks.cargo-update]
|
|
|
|
private = true
|
|
|
|
command = "cargo"
|
|
|
|
args = ["update"]
|
|
|
|
|
|
|
|
[tasks.setup]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
dependencies = ["cargo-upgrade", "cargo-update"]
|
|
|
|
|
|
|
|
# Docs
|
|
|
|
[tasks.docs]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2024-02-13 14:22:11 +00:00
|
|
|
env = { RUSTDOCFLAGS = "--cfg surrealdb_unstable" }
|
2024-06-12 09:40:48 +00:00
|
|
|
args = ["doc", "--open", "--no-deps", "--package", "surrealdb", "--features", "rustls,native-tls,protocol-ws,protocol-http,kv-mem,kv-rocksdb,kv-tikv,http,scripting,jwks"]
|
2023-08-03 09:55:06 +00:00
|
|
|
|
|
|
|
# Test
|
|
|
|
[tasks.test]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2024-03-15 11:21:32 +00:00
|
|
|
env = { RUSTFLAGS = "--cfg surrealdb_unstable", RUSTDOCFLAGS = "--cfg surrealdb_unstable", RUST_MIN_STACK={ value = "4194304", condition = { env_not_set = ["RUST_MIN_STACK"] } } }
|
2024-04-03 09:54:12 +00:00
|
|
|
args = ["test", "--workspace", "--no-fail-fast"]
|
2023-08-03 09:55:06 +00:00
|
|
|
|
|
|
|
# Check
|
|
|
|
[tasks.cargo-check]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2024-02-02 22:10:47 +00:00
|
|
|
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
|
2024-01-09 17:47:23 +00:00
|
|
|
args = ["check", "--workspace", "--features", "${DEV_FEATURES}"]
|
2023-08-03 09:55:06 +00:00
|
|
|
|
|
|
|
[tasks.cargo-fmt]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
|
|
|
args = ["fmt", "--all", "--check"]
|
|
|
|
|
|
|
|
[tasks.cargo-fmt-unlinked]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
script = """
|
|
|
|
set -e
|
|
|
|
cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/
|
2024-02-02 22:10:47 +00:00
|
|
|
cargo fmt --all --check -- ./lib/tests/**/*.rs ./core/src/kvs/tests/*.rs
|
2023-08-03 09:55:06 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
[tasks.cargo-clippy]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2024-02-02 22:10:47 +00:00
|
|
|
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
|
2023-08-03 09:55:06 +00:00
|
|
|
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
|
|
|
|
|
|
|
|
[tasks.check]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
dependencies = ["cargo-check", "cargo-fmt", "cargo-fmt-unlinked", "cargo-clippy"]
|
|
|
|
|
2023-10-08 00:48:00 +00:00
|
|
|
[tasks.check-wasm]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
dependencies = ["ci-check-wasm"]
|
|
|
|
|
2023-08-03 09:55:06 +00:00
|
|
|
# Clean
|
|
|
|
[tasks.clean]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
|
|
|
args = ["clean"]
|
|
|
|
|
|
|
|
# Bench
|
|
|
|
[tasks.bench]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2024-02-02 22:10:47 +00:00
|
|
|
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
|
2024-04-03 09:54:12 +00:00
|
|
|
args = ["bench", "--package", "surrealdb", "--no-default-features", "--features", "kv-mem,http,scripting,jwks", "--", "${@}"]
|
2023-08-03 09:55:06 +00:00
|
|
|
|
2023-08-30 18:01:30 +00:00
|
|
|
# Run
|
|
|
|
[tasks.run]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2024-02-02 22:10:47 +00:00
|
|
|
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
|
2023-08-30 18:01:30 +00:00
|
|
|
args = ["run", "--no-default-features", "--features", "${DEV_FEATURES}", "--", "${@}"]
|
|
|
|
|
2023-08-03 09:55:06 +00:00
|
|
|
# Serve
|
|
|
|
[tasks.serve]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2024-02-02 22:10:47 +00:00
|
|
|
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
|
2023-08-30 18:01:30 +00:00
|
|
|
args = ["run", "--no-default-features", "--features", "${DEV_FEATURES}", "--", "start", "--allow-all", "${@}"]
|
2023-08-03 09:55:06 +00:00
|
|
|
|
|
|
|
# SQL
|
|
|
|
[tasks.sql]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2024-02-02 22:10:47 +00:00
|
|
|
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
|
2024-03-19 11:59:29 +00:00
|
|
|
args = ["run", "--no-default-features", "--features", "${DEV_FEATURES}", "--", "sql", "--pretty", "${@}"]
|
2023-08-03 09:55:06 +00:00
|
|
|
|
|
|
|
# Quick
|
|
|
|
[tasks.quick]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2023-08-23 19:26:31 +00:00
|
|
|
args = ["build", "${@}"]
|
2023-08-03 09:55:06 +00:00
|
|
|
|
|
|
|
# Build
|
|
|
|
[tasks.build]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
command = "cargo"
|
2024-02-02 22:10:47 +00:00
|
|
|
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
|
2023-08-23 19:26:31 +00:00
|
|
|
args = ["build", "--release", "${@}"]
|
2023-08-03 09:55:06 +00:00
|
|
|
|
|
|
|
# Default
|
|
|
|
[tasks.default]
|
|
|
|
category = "LOCAL USAGE"
|
|
|
|
clear = true
|
|
|
|
dependencies = ["check", "test", "quick"]
|