Skip to content

Commit 44be71c

Browse files
committed
Improve docs around requiremments and language support
1 parent 4c30c04 commit 44be71c

File tree

3 files changed

+46
-2
lines changed

3 files changed

+46
-2
lines changed

protobuf-maven-plugin/src/site/markdown/other-language-support.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ While Maven does not provide official plugins for most other programming
66
languages, the protobuf-maven-plugin allows you to generate source code for
77
a number of other programming languages.
88

9+
## Languages directly supported by `protoc`
10+
911
By default, only Java generation is enabled. You can turn this off if desired.
1012

1113
To enable other languages, use the following attributes within your `configuration` block;
@@ -53,12 +55,29 @@ To enable other languages, use the following attributes within your `configurati
5355
</tbody>
5456
</table>
5557

58+
### Further support
59+
5660
Any other languages natively available in `protoc` can be enabled by passing `<arguments/>`
57-
in the plugin configuration (e.g. `--cpp_out=target/cpp` for C++).
61+
in the plugin configuration. For example:
62+
63+
```xml
64+
<configuration>
65+
<arguments>
66+
<argument>--cpp_out=target/generated-sources/cxx</argument>
67+
</arguments>
68+
<protoc>...</protoc>
69+
</configuration>
70+
```
71+
72+
## Languages and tooling without first-class support
5873

5974
Any other language integrations can be provided to this plugin in the shape of
6075
third-party custom `protoc` plugins.
6176

77+
See "[using protoc plugins](./using-protoc-plugins.md)" for full details.
78+
79+
### Caveats
80+
6281
It is also important to note that you need to provide a valid compiler or tooling to
6382
make use of the generared sources (other than Java). For example, Kotlin generation
6483
would require you to also configure the `kotlin-maven-plugin`. See

protobuf-maven-plugin/src/site/markdown/requirements.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,21 @@ Refer to the `protocVersion` parameter documentation on the
9999

100100
You may also try something like `docker buildx` and use a cross-platform container to build
101101
on the desired platform. Virtual machines are also an option.
102+
103+
## "But Google released binaries for this architecture!"
104+
105+
In the unlikely event that Google adds new architecture support as a first class citizen
106+
to `protoc`, please raise a
107+
[feature request](https://github.com/ascopes/protobuf-maven-plugin/issues)
108+
and I will get onto it as soon as possible.
109+
110+
## What about this WASM thing I've heard about?
111+
112+
Some projects like Quarkus have began to experiment with transpiling
113+
`protoc` to web assembly, enabling them to be run in a WASM interpreter
114+
within the JVM, or within Graal's polyglot runtime.
115+
116+
This is something that I am looking to eventually support where possible.
117+
If you are interested in helping out with this, please reach out on the
118+
[discussions](https://github.com/ascopes/protobuf-maven-plugin/discussions)
119+
page.

scripts/site-local.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,15 @@ set -o pipefail
1111

1212
readonly host=127.0.0.1
1313
readonly port=9000
14+
base_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
15+
site_dir=${base_dir}/protobuf-maven-plugin/target/site
16+
17+
if [[ ! -d ${site_dir} ]] || [[ "${*}" =~ .*--build.* ]]; then
18+
cd "${base_dir}"
19+
./mvnw site -Dlicense.skip -Dcheckstyle.skip -Dinvoker.skip -Dmaven.test.skip -T10
20+
fi
21+
cd "${site_dir}"
1422

15-
cd "$(git rev-parse --show-toplevel)/protobuf-maven-plugin/target/site"
1623
python3 -m http.server -b "${host}" "${port}" &
1724
readonly pid=$!
1825
trap 'kill -SIGTERM "$pid" &> /dev/null; trap - EXIT INT TERM' EXIT INT TERM

0 commit comments

Comments
 (0)