Releases: webrpc/webrpc
v0.36.1
Full Changelog: v0.36.0...v0.36.1
Docker
docker pull ghcr.io/webrpc/webrpc-gen:v0.36.1
Example: docker run -v $PWD:$PWD ghcr.io/webrpc/webrpc-gen:v0.36.1 -schema=$PWD/api.ridl -target=golang
Homebrew
brew tap webrpc/tap
brew install webrpc-gen
Build from source
go install -ldflags="-s -w -X github.com/webrpc/webrpc.VERSION=v0.36.1" github.com/webrpc/webrpc/cmd/[email protected]
Download binaries
macOS: amd64, arm64 (Apple Silicon)
Linux: amd64, arm64
Windows: amd64, arm64
v0.36.0
What's Changed
- Bump hono from 4.12.4 to 4.12.7 in /_examples/node-ts/server-hono by @dependabot[bot] in #434
- improve enum string generation by @pkieltyka in #435
Full Changelog: v0.34.0...v0.36.0
Docker
docker pull ghcr.io/webrpc/webrpc-gen:v0.36.0
Example: docker run -v $PWD:$PWD ghcr.io/webrpc/webrpc-gen:v0.36.0 -schema=$PWD/api.ridl -target=golang
Homebrew
brew tap webrpc/tap
brew install webrpc-gen
Build from source
go install -ldflags="-s -w -X github.com/webrpc/webrpc.VERSION=v0.36.0" github.com/webrpc/webrpc/cmd/[email protected]
Download binaries
macOS: amd64, arm64 (Apple Silicon)
Linux: amd64, arm64
Windows: amd64, arm64
v0.35.0
What's Changed
- Bump @hono/node-server from 1.19.5 to 1.19.10 in /_examples/node-ts/server-hono by @dependabot[bot] in #432
- Bump hono from 4.11.7 to 4.12.4 in /_examples/node-ts/server-hono by @dependabot[bot] in #431
- Bump github.com/cloudflare/circl from 1.6.1 to 1.6.3 by @dependabot[bot] in #430
- Bump github.com/webrpc/gen-golang from v0.25.0 to v0.26.0 by @klaidliadon in #433
Full Changelog: v0.33.0...v0.35.0
Go server breaking changes
1. Enum maps now use typed keys and values
The _name and _value maps for enums now use the enum type directly instead of the underlying type.
Before:
var Kind_name = map[uint32]string{
0: "USER",
1: "ADMIN",
}
var Kind_value = map[string]uint32{
"USER": 0,
"ADMIN": 1,
}After:
var Kind_name = map[Kind]string{
Kind_USER: "USER",
Kind_ADMIN: "ADMIN",
}
var Kind_value = map[string]Kind{
"USER": Kind_USER,
"ADMIN": Kind_ADMIN,
}Migration
If you reference these maps directly, update the types:
Kind_name[uint32(x)]→Kind_name[x]v := Kind_value["ADMIN"]— the value is nowKindinstead ofuint32. If you were casting withKind(v), it's no longer needed. If you were using the rawuint32, useuint32(v).
2. The deprecated ErrorWithCause() function was removed
- return proto.ErrorWithCause(proto.ErrUnexpectedValue, err)
+ return proto.ErrUnexpectedValue.WithCause(err)- return proto.ErrorWithCause(proto.ErrUnexpectedValue, fmt.Errorf("connect to DB: %w", err))
+ return proto.ErrUnexpectedValue.WithCausef("connect to DB: %w", err)v0.34.0
What's Changed
- Bump @hono/node-server from 1.19.5 to 1.19.10 in /_examples/node-ts/server-hono by @dependabot[bot] in #432
- Bump hono from 4.11.7 to 4.12.4 in /_examples/node-ts/server-hono by @dependabot[bot] in #431
- Bump github.com/cloudflare/circl from 1.6.1 to 1.6.3 by @dependabot[bot] in #430
- Bump github.com/webrpc/gen-golang from v0.25.0 to v0.26.0 by @klaidliadon in #433
Go server breaking changes
1. Enum maps now use typed keys and values
The _name and _value maps for enums now use the enum type directly instead of the underlying type.
Before:
var Kind_name = map[uint32]string{
0: "USER",
1: "ADMIN",
}
var Kind_value = map[string]uint32{
"USER": 0,
"ADMIN": 1,
}After:
var Kind_name = map[Kind]string{
Kind_USER: "USER",
Kind_ADMIN: "ADMIN",
}
var Kind_value = map[string]Kind{
"USER": Kind_USER,
"ADMIN": Kind_ADMIN,
}Migration
If you reference these maps directly, update the types:
Kind_name[uint32(x)]→Kind_name[x]v := Kind_value["ADMIN"]— the value is nowKindinstead ofuint32. If you were casting withKind(v), it's no longer needed. If you were using the rawuint32, useuint32(v).
2. The deprecated ErrorWithCause() function was removed
- return proto.ErrorWithCause(proto.ErrUnexpectedValue, err)
+ return proto.ErrUnexpectedValue.WithCause(err)- return proto.ErrorWithCause(proto.ErrUnexpectedValue, fmt.Errorf("connect to DB: %w", err))
+ return proto.ErrUnexpectedValue.WithCausef("connect to DB: %w", err)Full Changelog: v0.33.0...v0.34.0
v0.33.0
What's Changed
- Bump github.com/go-chi/chi/v5 from 5.0.12 to 5.2.2 in /_examples/node-ts/server-go by @dependabot[bot] in #419
- Bump hono from 4.10.3 to 4.11.7 in /_examples/node-ts/server-hono by @dependabot[bot] in #417
- Update to [email protected] by @VojtechVitek in #421
- Update to gen-openapi v0.17.1 by @VojtechVitek in #422
- Bump github.com/go-chi/chi/v5 from 5.1.0 to 5.2.2 in /_examples/webrpc-streaming by @dependabot[bot] in #420
- Quick guide for LLMs by @VojtechVitek in #423
- Move service definition to top of RIDL examples by @VojtechVitek in #425
- Add new "basepath" keyword to define base path for the API routes by @VojtechVitek in #426
- Support basepath keyword in all generators by @VojtechVitek in #427
New basepath RIDL keyword
name = example # name of your backend app
version = v1.0.0 # version of your schema
+basepath = /v1 # basepath for the API
service Example
- Ping()This will now generate these endpoint URLs:
-POST /rpc/Example/Ping
+POST /v1/Example/PingIf basepath is not provided, webrpc-gen will print a friendly warning and set the default value to basepath = /rpc to keep backward compatibility.
Please, make sure to explicitly set basepath from now on, as we will require it in the future versions of webrpc.
To remove the API prefix completely, use basepath = /.
Full Changelog: v0.32.0...v0.33.0
v0.32.3
What's Changed
- Bump github.com/go-chi/chi/v5 from 5.1.0 to 5.2.2 in /_examples/webrpc-streaming by @dependabot[bot] in #420
- Quick guide for LLMs by @VojtechVitek in #423
- Move service definition to top of RIDL examples by @VojtechVitek in #425
- Add new "basepath" keyword to define base path for the API routes by @VojtechVitek in #426
Full Changelog: v0.32.2...v0.32.3
v0.32.2
What's Changed
- Bump github.com/go-chi/chi/v5 from 5.0.12 to 5.2.2 in /_examples/node-ts/server-go by @dependabot[bot] in #419
- Bump hono from 4.10.3 to 4.11.7 in /_examples/node-ts/server-hono by @dependabot[bot] in #417
- Update to [email protected] by @VojtechVitek in #421
- Update to gen-openapi v0.17.1 by @VojtechVitek in #422
Full Changelog: v0.32.0...v0.32.2
v0.32.1
What's Changed
- Bump github.com/go-chi/chi/v5 from 5.0.12 to 5.2.2 in /_examples/node-ts/server-go by @dependabot[bot] in #419
- Bump hono from 4.10.3 to 4.11.7 in /_examples/node-ts/server-hono by @dependabot[bot] in #417
- Update to [email protected] by @VojtechVitek in #421
- Support for succinct RIDL syntax
Full Changelog: v0.32.0...v0.32.1
v0.32.0
What's Changed
- Streaming: Allow batch writes; fix succinct syntax
- Update to [email protected] and [email protected] by @VojtechVitek in #418
Full Changelog: v0.31.3...v0.32.0
v0.31.3
What's Changed
- add -methodTreeShake flag by @pkieltyka in #411
Full Changelog: v0.31.2...v0.31.3
Docker
docker pull ghcr.io/webrpc/webrpc-gen:v0.31.3
Example: docker run -v $PWD:$PWD ghcr.io/webrpc/webrpc-gen:v0.31.3 -schema=$PWD/api.ridl -target=golang
Homebrew
brew tap webrpc/tap
brew install webrpc-gen
Build from source
go install -ldflags="-s -w -X github.com/webrpc/webrpc.VERSION=v0.31.3" github.com/webrpc/webrpc/cmd/[email protected]
Download binaries
macOS: amd64, arm64 (Apple Silicon)
Linux: amd64, arm64
Windows: amd64, arm64