-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathjustfile
More file actions
125 lines (99 loc) · 3.58 KB
/
Copy pathjustfile
File metadata and controls
125 lines (99 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
set working-directory := '.'
export RUST_BACKTRACE := "1"
# Run the CLI with the provided arguments
run *args:
cargo run -- {{args}}
# Start the web playground development server
[working-directory: 'packages/mq-playground']
playground:
pnpm run dev
# Run benchmarks using codspeed
[working-directory: 'crates/mq-lang']
bench: build-bench
cargo codspeed run
# Run benchmarks locally
[working-directory: 'crates/mq-lang']
bench-local:
cargo bench
# Build the project in release mode
build:
cargo build --release -p mq-run --bin mq
cargo build --release -p mq-run --bin mq-dbg --features="debugger"
cargo build --release -p mq-lsp -p mq-crawler -p mq-test
cargo build --release -p mq-check --features="cli"
cargo build --release -p mq-lint --features="cli"
cargo build --release -p mq-formatter
# Build for a specific target architecture
build-target target:
cargo build --release --target {{target}} -p mq-run --bin mq
cargo build --release --target {{target}} -p mq-run --bin mq-dbg --features="debugger"
cargo build --release --target {{target}} -p mq-lsp -p mq-crawler -p mq-test
cargo build --release --target {{target}} -p mq-check --features="cli"
cargo build --release --target {{target}} -p mq-lint --features="cli"
cargo build --release --target {{target}} -p mq-formatter
# Build benchmarks with codspeed
[working-directory: 'crates/mq-lang']
build-bench:
cargo codspeed build
# Build WebAssembly package for web use
[working-directory: 'crates/mq-wasm']
build-wasm:
wasm-pack build --release --target web --out-dir ../../packages/mq-web/mq-wasm
rm ../../packages/mq-web/mq-wasm/README.md
rm ../../packages/mq-web/mq-wasm/package.json
# Build mq-web package
[working-directory: 'packages/mq-web']
build-web: build-wasm
pnpm run build
# Build @mqlang/node package
[working-directory: 'crates/mq-wasm']
build-node-wasm:
wasm-pack build --release --target nodejs --out-dir ../../packages/mq-nodejs/mq-wasm -- --no-default-features
rm ../../packages/mq-nodejs/mq-wasm/README.md
rm ../../packages/mq-nodejs/mq-wasm/package.json
# Build @mqlang/node package
[working-directory: 'packages/mq-nodejs']
build-node: build-node-wasm
pnpm run build
# Run formatting
fmt:
cargo fmt --all -- --check
test-mq:
cargo run -p mq-test -- crates/mq-lang/builtin_tests.mq crates/mq-lang/modules/module_tests.mq
test-doc:
cargo test --doc --workspace
test-all-features:
cargo nextest run --workspace --all-features
test:
cargo nextest run --workspace --all-features
# Run formatting, linting and all tests
test-all: fmt lint test-mq test-doc test-all-features test
# Run tests with code coverage reporting
test-cov:
cargo llvm-cov --open --html --workspace --all-features --ignore-filename-regex 'crates/mq-(crawler|test|wasm|web-api|dap|python|lsp/src/capabilities\.rs|repl/src/repl\.rs)'
# Run fuzzing tests
test-fuzz:
cargo +nightly fuzz run interpreter
# Run WebAssembly tests in Chrome
[working-directory: 'crates/mq-wasm']
test-wasm:
wasm-pack test --chrome --headless
# Run formatter and linter
lint:
cargo clippy --all-targets --all-features --workspace -- -D clippy::all
# Check for unused dependencies
deps:
cargo +nightly udeps
# Update documentation
docs:
./scripts/update_doc.sh
# Bump version for all crates
bump-version:
cd scripts && ./bump_version.sh
# Publish crates
publish:
cp -r crates/mq-run/assets crates/mq-hir
cp -r crates/mq-run/assets crates/mq-lang
cp -r crates/mq-run/assets crates/mq-markdown
cp -r crates/mq-run/assets crates/mq-repl
cargo publish --workspace