-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathjustfile
More file actions
37 lines (29 loc) · 1.26 KB
/
justfile
File metadata and controls
37 lines (29 loc) · 1.26 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
native_target := `rustc -vV | grep host | awk '{print $2}'`
ext_dir := if os() == "macos" { env("HOME") / "Library/Application Support/Zed/extensions/work/java" } else if os() == "linux" { env("HOME") / ".local/share/zed/extensions/work/java" } else { env("LOCALAPPDATA") / "Zed/extensions/work/java" }
proxy_bin := ext_dir / "proxy-bin" / "java-lsp-proxy"
# Build proxy in debug mode
proxy-build:
cd proxy && cargo build --target {{ native_target }}
# Build proxy in release mode
proxy-release:
cd proxy && cargo build --release --target {{ native_target }}
# Build proxy release and install to extension workdir for testing
proxy-install: proxy-release
mkdir -p "{{ ext_dir }}/proxy-bin"
cp "target/{{ native_target }}/release/java-lsp-proxy" "{{ proxy_bin }}"
@echo "Installed to {{ proxy_bin }}"
# Build WASM extension in release mode
ext-build:
cargo build --release
# Format all code
fmt:
cargo fmt --all
ts_query_ls format languages
# Run clippy on both crates
clippy:
cargo clippy --all-targets --fix --allow-dirty
cd proxy && cargo clippy --all-targets --fix --allow-dirty --target {{ native_target }}
# Format and lint all code
lint: fmt clippy
# Build everything: lint, extension, proxy install
all: lint ext-build proxy-install