From d2899bd3ddc878f778a77da85ad07ae32e71b05f Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Wed, 4 Apr 2018 19:45:54 +0300 Subject: Update generator README --- generator/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/generator/README.md b/generator/README.md index 37a15a8..be99e6f 100644 --- a/generator/README.md +++ b/generator/README.md @@ -4,4 +4,12 @@ A protoc plugin for generating Nim code out of .proto files. # Usage - protoc --plugin=protoc-gen-nim=./protoc_gen_nim --nim_out=protos -I. my.proto +If you don't have the directory, where the generator plugin resides, in PATH, you can use + + protoc --plugin=protoc-gen-nim=/path/to/protoc_gen_nim --nim_out=protos -I. my.proto + +If the plugin is in PATH (and you're on a unix-ish system) then it's a bit easier + + protoc -I. --nim_out=protos my.proto + +The latter style is possible, because there exists a `protoc-gen-nim` wrapper script that calls the real executable. Protoc automatically finds this wrapper based on the `--nim_out` argument. -- cgit v1.2.3