Skip to content

Releases: webrpc/webrpc

v0.36.1

14 Mar 11:31

Choose a tag to compare

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

11 Mar 19:46
87d3f5e

Choose a tag to compare

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

09 Mar 15:46
88c3173

Choose a tag to compare

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 now Kind instead of uint32. If you were casting with Kind(v), it's no longer needed. If you were using the raw uint32, use uint32(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

09 Mar 15:19
88c3173

Choose a tag to compare

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 now Kind instead of uint32. If you were casting with Kind(v), it's no longer needed. If you were using the raw uint32, use uint32(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

12 Feb 16:50
16cd6ab

Choose a tag to compare

What's Changed

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/Ping

If 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

10 Feb 16:19
70233bc

Choose a tag to compare

What's Changed

Full Changelog: v0.32.2...v0.32.3

v0.32.2

02 Feb 00:25
7331939

Choose a tag to compare

What's Changed

Full Changelog: v0.32.0...v0.32.2

v0.32.1

01 Feb 23:57
8fbf65c

Choose a tag to compare

What's Changed

Full Changelog: v0.32.0...v0.32.1

v0.32.0

01 Feb 21:43
222776c

Choose a tag to compare

v0.31.3

08 Dec 02:23
b0d2574

Choose a tag to compare

What's Changed

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