aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskari Timperi <oskari.timperi@iki.fi>2018-04-04 19:45:54 +0300
committerOskari Timperi <oskari.timperi@iki.fi>2018-04-04 19:45:54 +0300
commitd2899bd3ddc878f778a77da85ad07ae32e71b05f (patch)
treeaac3c9ffcb42577a07d5b1a4b20ad0979a514f7a
parent8ec494de47647016f5b60baf952a25b529a17077 (diff)
downloadnimpb-d2899bd3ddc878f778a77da85ad07ae32e71b05f.tar.gz
nimpb-d2899bd3ddc878f778a77da85ad07ae32e71b05f.zip
Update generator README
-rw-r--r--generator/README.md10
1 files changed, 9 insertions, 1 deletions
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.