Skip to content

[Spike]: investigate use of WASMified protobuf #953

@ascopes

Description

@ascopes

Brief description

Placeholder ticket to investigate the WASM protobuf implementation, per roastedroot/protobuf4j#54

  • How do we inject additional manual arguments without providing a potentially breakable interface for existing users?
  • How do we allow users to define full maven artifacts in <protoc> which currently takes strings without breaking things for current v5 users?
  • How do we resolve it locally?
  • How can we invoke gRPC as a plugin if gRPC is WASMified?

Possibly depends on #880 for model changes unless we fix on that branch later.

@andreaTP, @roastedroot FYI.

Aims and goals

  • Investigate how easy it is to integrate WASM builds of protoc that run within the Chicory JVM WASM runtime into existing builds.

  • Possibly investigate how easy it is to integrate WASM builds of gRPC that run within the Chicory JVM WASM runtime into existing builds.

  • Possibly implement additive features to the Maven plugin that facilitate the use of such tools.

End goal

Evaluate feasibility of allowing the use of protoc builds in pure WASM to avoid the need for platform specific binaries of protoc in some cases.

Requirements

  • We will not be removing existing functionality.
  • We will not be forcing the use of WASM protoc.
  • Existing defaults must remain.

Current questions

  • How does the virtual file system integration in protobuf4j work if we are sourcing directories of protobuf sources from across possibly more than one file system? Do we need to write a wrapper around the protobuf4j implementation to allow transparent integration?
  • How do we invoke the binary without modifying the existing Maven Plugin integrations to cater for specific custom implementations? The end goal would be to only have the user specify if the protoc binary is JVM based or binary based rather than maintaining dedicated integrations for specific solutions (google's protoc releases act as the reference implementation in this case).

Existing work

The branch at https://github.com/ascopes/protobuf-maven-plugin/tree/poc/gh-877-protoc-distributions contains some prior work I did to look into this. The rough concepts should be able to be reimplemented on the main version to some extent.

Metadata

Metadata

Assignees

Labels

dependenciesIssues and changes related to dependencieshelp neededAny expertise or time or resources will always be appreciated!new featureA new user-facing feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions