Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
# cdylib) out of the native target build. The Gradle bridge implements
# vscode-gradle 3.18's JSON-RPC transport over platform-local IPC.
- name: Build binaries
run: cargo build --release --target ${{ matrix.target }} -p java-lsp-proxy -p gradle-lsp-bridge
run: cargo build --locked --release --target ${{ matrix.target }} -p java-lsp-proxy -p gradle-lsp-bridge
shell: bash

- name: Package binaries (Unix)
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
grammars/
target/
proxy/target/
extension.wasm
.DS_Store
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 20 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
[workspace]
members = [
".",
"proxy",
"proxy-common",
"gradle-bridge"
]

[workspace.dependencies]
proxy-common = { path = "proxy-common" }

[package]
name = "zed_java"
version = "6.8.30"
version.workspace = true
edition = "2024"
publish = false
license = "Apache-2.0"
publish = false

[lib]
path = "src/java.rs"
crate-type = ["cdylib"]
path = "src/java.rs"

[dependencies]
hex = "0.4.3"
Expand All @@ -30,8 +19,24 @@ sha1 = "0.10.6"
zed_extension_api = "0.7.0"

[dev-dependencies]
insta = { version = "1.46", features = ["yaml"] }
tree-sitter = "0.26.8"
tree-sitter-java = "0.23.5"
# Same commit as `grammars.kotlin` in extension.toml, so the test compiles the queries Zed loads.
tree-sitter-kotlin = { git = "https://github.com/fwcd/tree-sitter-kotlin", rev = "1852ea17b7f60fb3f9d84e0b1555d56b46b39fb1" }
insta = { version = "1.46", features = ["yaml"] }

[workspace]
resolver = "3"
members = [
".",
"crates/gradle-bridge",
"crates/proxy",
"crates/proxy-common",
]
default-members = ["."]

[workspace.package]
version = "6.8.30"

[workspace.dependencies]
proxy-common = { path = "crates/proxy-common" }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ If you want to contribute to this extension or test local changes, you can insta
### Prerequisites

- [Rust](https://rustup.rs/) toolchain
- The `wasm32-wasip1` target: `rustup target add wasm32-wasip1`
- The `wasm32-wasip2` target: `rustup target add wasm32-wasip2`
- [just](https://github.com/casey/just) command runner (optional but recommended)

### Installing as a Dev Extension
Expand Down
12 changes: 6 additions & 6 deletions gradle-bridge/Cargo.toml → crates/gradle-bridge/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "gradle-lsp-bridge"
version = "6.8.23"
version.workspace = true
edition = "2021"
publish = false
license = "Apache-2.0"
description = "Bridges Zed to the Gradle Language Server, driving the real gradle-server.jar over JSON-RPC for plugin-aware completions"
license = "Apache-2.0"
publish = false

[[bin]]
name = "gradle-lsp-bridge"
path = "src/main.rs"

[dependencies]
base64 = "0.22"
prost = "0.14"
proxy-common = { workspace = true, features = ["tokio"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
base64 = "0.22"
prost = "0.14"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-util", "io-std", "net", "process", "sync", "time", "fs"] }
tokio = { version = "1", features = ["fs", "io-std", "io-util", "macros", "net", "process", "rt-multi-thread", "sync", "time"] }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions proxy-common/Cargo.toml → crates/proxy-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
[package]
name = "proxy-common"
version = "6.8.23"
version.workspace = true
edition = "2021"
publish = false
license = "Apache-2.0"
description = "Shared primitives (LSP framing, parent-process monitor) for the Zed Java extension's native binaries"
license = "Apache-2.0"
publish = false

[features]
tokio = ["dep:tokio"]

[lib]
name = "proxy_common"
path = "src/lib.rs"

[features]
tokio = ["dep:tokio"]

[dependencies]
percent-encoding = "2.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1", default-features = false, features = ["io-util"], optional = true }

[target.'cfg(unix)'.dependencies]
[target."cfg(unix)".dependencies]
libc = "0.2"

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = ["Win32_System_Threading", "Win32_Foundation", "Win32_System_Diagnostics_ToolHelp"] }
[target."cfg(windows)".dependencies]
windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_System_Diagnostics_ToolHelp", "Win32_System_Threading"] }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions proxy/Cargo.toml → crates/proxy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[package]
name = "java-lsp-proxy"
version = "6.8.23"
version.workspace = true
edition = "2021"
publish = false
license = "Apache-2.0"
description = "Native LSP proxy for the Zed Java extension"
license = "Apache-2.0"
publish = false

[[bin]]
name = "java-lsp-proxy"
path = "src/main.rs"

[dependencies]
proxy-common.workspace = true
hex = "0.4"
proxy-common.workspace = true
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sha1 = "0.10"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ proxy-build:

# Build proxy in release mode
proxy-release:
cd proxy && cargo build --release --target {{ native_target }}
cargo build --release --target {{ native_target }} -p java-lsp-proxy

# Build proxy release and install to extension workdir for testing
proxy-install: proxy-release
Expand All @@ -18,6 +18,7 @@ proxy-install: proxy-release
@echo "Installed to {{ ext_dir }}"

# --- Core recipes ---

# Build gradle-lsp-bridge in debug mode
bridge-build:
cargo build --target {{ native_target }} -p gradle-lsp-bridge
Expand All @@ -34,7 +35,7 @@ bridge-install: bridge-release

# Build WASM extension in release mode
ext-build:
cargo build --release
cargo build --locked --release --target wasm32-wasip2 -p zed_java

# Format all code
fmt:
Expand Down
Loading