-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 1.22 KB
/
Copy pathMakefile
File metadata and controls
39 lines (31 loc) · 1.22 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
# Usage:
# make dev → full development setup (build + install LSP)
# make build → build both artefacts without installing
# make test → run all unit tests
# make clean → remove build artefacts
.PHONY: build build-lsp build-ext test install-lsp dev clean
## Full development setup: install the LSP binary and build the WASM extension
dev: install-lsp build-ext
@echo ""
@echo "✅ Development build complete."
@echo ""
@echo "Load the extension in Zed:"
@echo " Extensions (⌘⇧X) → 'Install Dev Extension' → select this directory"
## Build both the WASM extension and the native LSP binary (no install)
build: build-lsp build-ext
## Build the native LSP server binary (release mode)
build-lsp:
cargo build --release
## Ensure the wasm32-wasip1 target is installed, then build the WASM extension.
build-ext:
rustup target add wasm32-wasip1 2>/dev/null || true
cargo build --target wasm32-wasip1 --release
## Install the LSP binary to Cargo's bin directory (puts it on PATH).
install-lsp: build-lsp
cargo install --force --path .
## Run all unit tests (LSP crate; extension crate is WASM-only).
test:
cargo test -- --color always 2>&1
## Remove build artefacts.
clean:
cargo clean