Skip to content

Add wasmJs and wasmWasi targets to wire-grpc-client - #3696

Open
oldergod wants to merge 2 commits into
masterfrom
bquenaudon/grpc-wasm-wasi
Open

Add wasmJs and wasmWasi targets to wire-grpc-client#3696
oldergod wants to merge 2 commits into
masterfrom
bquenaudon/grpc-wasm-wasi

Conversation

@oldergod

@oldergod oldergod commented Aug 27, 2026

Copy link
Copy Markdown
Member

Closes #3695.

What changed

wire-grpc-client now declares wasmJs and wasmWasi targets. Modules that declare gRPC services generate Kotlin code that depends on wire-grpc-client. Those modules can now compile for both wasm targets, like they already could with wire-runtime alone.

  • Both targets are gated behind the kwasm system property. This mirrors how wire-runtime gates its wasm targets.
  • The non-JVM stub actuals now live once, in a shared nonJvmMain intermediate source set. The js, native, wasmJs, and wasmWasi targets all attach to it. Before this change, the js, native, and wasmWasi source sets each held their own copy of the same 8 TODO stub files. This follows the guidance in Add wasmJs support #3152 (comment) and mirrors the nonJvmMain wiring wire-runtime already uses.
  • The gzip exception messages no longer name a single platform, because one file now serves several platforms.

Modules that declare gRPC services generate Kotlin code which
depends on wire-grpc-client. wire-grpc-client did not target
wasmWasi, so those modules could not compile for wasmWasi even
though wire-runtime already supports it.

Add a wasmWasi target to wire-grpc-client. The target is gated
behind the kwasm system property, the same way wire-runtime gates
its wasm targets. The new wasmWasiMain source set holds TODO stub
actuals, the same approach the js target uses.

Co-authored-by: Benoît Quenaudon <benoit@quenaudon.com>
Signed-off-by: Benoît Quenaudon <benoit@quenaudon.com>
The js, native, and wasmWasi targets each held their own copy of
the same 8 TODO stub actuals. Create an intermediate nonJvmMain
source set that holds the stubs once, and attach the js, native,
wasmJs, and wasmWasi targets to it. This follows the guidance in
PR 3152 and mirrors the nonJvmMain wiring wire-runtime already
uses.

Add the wasmJs target, gated behind the kwasm system property
like the other wasm targets.

The gzip exception messages no longer name a single platform
because one file now serves several platforms.

Co-authored-by: Benoît Quenaudon <benoit@quenaudon.com>
Signed-off-by: Benoît Quenaudon <benoit@quenaudon.com>
@oldergod oldergod changed the title Add wasmWasi target to wire-grpc-client Add wasmJs and wasmWasi targets to wire-grpc-client Aug 27, 2026
@oldergod
oldergod marked this pull request as ready for review August 27, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lack of wasmWasi target for wire-grpc

1 participant