mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-08-04 01:58:18 +00:00
add protobuf transport and refactor to support (#24)
This commit is contained in:
parent
b3e0ee7b6e
commit
643a47953e
21 changed files with 406 additions and 74 deletions
37
.just/proto.just
Normal file
37
.just/proto.just
Normal file
|
@ -0,0 +1,37 @@
|
|||
set unstable := true
|
||||
|
||||
justfile := justfile_directory() + "/.just/proto.just"
|
||||
|
||||
[private]
|
||||
default:
|
||||
@just --list --justfile {{ justfile }}
|
||||
|
||||
[no-cd]
|
||||
[private]
|
||||
check:
|
||||
#!/usr/bin/env sh
|
||||
if ! command -v protoc > /dev/null 2>&1; then
|
||||
echo "protoc is not installed. Please install protobuf-compiler"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[private]
|
||||
fmt:
|
||||
@just --fmt --justfile {{ justfile }}
|
||||
|
||||
# Generate protobuf code for both Rust and Python
|
||||
[no-cd]
|
||||
gen:
|
||||
@just proto rust
|
||||
@just proto py
|
||||
|
||||
# Generate protobuf code for Rust
|
||||
[no-cd]
|
||||
rust: check
|
||||
cargo build -p djls-types
|
||||
|
||||
# Generate protobuf code for Python
|
||||
[no-cd]
|
||||
py: check
|
||||
protoc -I=proto --python_out=python/djls proto/*.proto
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue