Browse Source

Add rudimentary installation instructions to plugin

Describe how `protoc` finds the plugin binary in the path. A simple
installation can be performed by copying the binary to a directory in
the path.

Also fix the example `protoc` invocation to match the Makefile by
adding an explicit `--plugin` argument.

Also add a few more files to .gitignore that are generated during
plugin build/test.
Andy Chou 8 years ago
parent
commit
37922f1ae7
2 changed files with 9 additions and 3 deletions
  1. 2 0
      .gitignore
  2. 7 3
      Plugin/README.md

+ 2 - 0
.gitignore

@@ -5,3 +5,5 @@ xcuserdata
 third_party/**
 third_party/**
 Plugin/Packages/**
 Plugin/Packages/**
 Plugin/protoc-*
 Plugin/protoc-*
+Plugin/swiftgrpc.log
+Plugin/echo.*.swift

+ 7 - 3
Plugin/README.md

@@ -6,11 +6,15 @@ the Protocol Buffer Compiler.
 It is built with the Swift Package Manager and the included
 It is built with the Swift Package Manager and the included
 Makefile. The resulting binary is named `protoc-gen-swiftgrpc`
 Makefile. The resulting binary is named `protoc-gen-swiftgrpc`
 and can be called from `protoc` by adding the `--swiftgrpc_out`
 and can be called from `protoc` by adding the `--swiftgrpc_out`
-command-line option. For example, here's an invocation from
-the Makefile:
+command-line option and `--plugin` option. For example, here's an
+invocation from the Makefile:
 
 
-	protoc ../Examples/Echo/echo.proto --proto_path=../Examples/Echo --swiftgrpc_out=. 
+		protoc ../Examples/Echo/echo.proto --proto_path=../Examples/Echo --plugin=./protoc-gen-swiftgrpc --swiftgrpc_out=.
 
 
 The plugin uses template files in the [Templates](Templates) directory. 
 The plugin uses template files in the [Templates](Templates) directory. 
 These files are compiled into the `protoc-gen-swiftgrpc` plugin executable.
 These files are compiled into the `protoc-gen-swiftgrpc` plugin executable.
 
 
+The Swift gRPC plugin can be installed by placing the
+`protoc-gen-swiftgrpc` binary into one of the directories in your
+path.  Specifying `--swiftgrpc_out` to `protoc` will automatically
+search the `PATH` environment variable for this binary.