-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathproto-code-gen.sh
More file actions
executable file
·19 lines (16 loc) · 1.12 KB
/
proto-code-gen.sh
File metadata and controls
executable file
·19 lines (16 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Golang code generator
protoc -I=./ --go_opt=paths=source_relative --go_out golang/message $(find ./ -iname "p2p_message_format.proto")
protoc -I=./ --go_opt=paths=source_relative --go_out golang/document $(find ./ -iname "did_document_format.proto")
protoc -I=./ --go_opt=paths=source_relative --go_out golang/gateway $(find ./ -iname "charge_point_gateway_format.proto")
protoc -I=./ --go_opt=paths=source_relative --go_out golang/events $(find ./ -iname "base_event_format.proto")
# Rust code generator
protoc -I=./ --rust_out rust/src $(find ./ -iname "*.proto")
# protoc -I=./ --rust_out rust/src $(find ./ -iname "did_document_format.proto")
#rename the mod.rs to lib.rs
mv rust/src/mod.rs rust/src/lib.rs
# Dart code generator
protoc -I=./ --dart_out=./dart/lib $(find ./ -iname "*.proto")
protoc -I=./ --python_out python $(find ./ -iname "*.proto")
# Javascript code generator
# protoc -I=./ --js_out=import_style=commonjs,binary:javascript $(find ./ -iname "*.proto") # to generate for all proto files
protoc --js_out=import_style=commonjs,binary:javascript did_document_format.proto # to generate for a did_document_format proto file