Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add go package of modsurfer protobuf types, regen code #69

Merged
merged 3 commits into from
Jan 12, 2024
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
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ unknown-cli:

install:
@echo "check PROTOC: `which protoc`"
go install google.golang.org/protobuf/cmd/[email protected]
cargo install [email protected]

generate: install
protoc --experimental_allow_proto3_optional --rust_out=proto/v1/src proto/v1/api.proto
protoc --experimental_allow_proto3_optional \
--rust_out=proto/v1/src \
--go_out=proto/v1/go \
proto/v1/api.proto

generate-web-list-mods-response:
cd scripts/protobuf-list-modules-response && cargo run --release -- $(take)
Expand Down
1 change: 1 addition & 0 deletions cli/src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ pub mod api_result;
pub mod exec;
pub mod generate;

#[allow(unused_imports)]
pub use exec::*;
2 changes: 2 additions & 0 deletions proto/v1/api.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
syntax = "proto3";

option go_package = "./modsurferpb";

import "google/protobuf/timestamp.proto";

// Used to type the arguments and return types from wasm elements such as import
Expand Down
3 changes: 3 additions & 0 deletions proto/v1/go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/dylibso/modsurfer/proto/v1/go/modsurferpb
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will test this out once its merged and easier to include in a Go project.


go 1.21.1
Loading