Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This generator, from a webrpc schema/design file, will code-generate:

2. Implementation output
C JSON encode/decode helpers, generated method request / response handling,
and an optional `libcurl`-based client runtime.
and a self-contained `libcurl`-based HTTP transport/runtime.

The generated client is intended to speak to any webrpc server language
(Go, nodejs, etc.) as long as the schema features used are supported by this target.
Expand All @@ -28,6 +28,14 @@ Generated `impl` output currently depends on:

The generated code targets C99.

When using generated implementation output that sends requests through the
generated `libcurl` transport, call the generated runtime hooks before the
first request and after the last one. For example, if you generate with
`-prefix=example`, call `example_runtime_init()` before the first request and
`example_runtime_cleanup()` after the last one. This follows libcurl's
documented global initialization model:
[libcurl API overview](https://curl.se/libcurl/c/libcurl.html).

Typical compile / link flags look like:

```bash
Expand Down Expand Up @@ -77,6 +85,7 @@ The current generator does not support:
- streaming methods
- map keys other than `string` or `enum`
- a shared external transport abstraction; the generated runtime is currently self-contained
- automatic redirect following

Implementation generation also assumes a companion generated header include via
`-header=<file>`.
Expand Down
2 changes: 1 addition & 1 deletion _examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WEBRPC_GEN_VERSION := v0.37.1
WEBRPC_GEN_VERSION := v0.37.2
ROOT := ..
GEN := go run -ldflags="-X github.com/webrpc/webrpc.VERSION=$(WEBRPC_GEN_VERSION)" github.com/webrpc/webrpc/cmd/webrpc-gen@$(WEBRPC_GEN_VERSION)

Expand Down
Loading
Loading