Skip to content

Commit 347c98c

Browse files
committed
chore: update readme
1 parent 3867c16 commit 347c98c

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

README.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ Make sure `capnpc` command is available. You can find install instructions [here
2525
Run the following to compile a schema file into typeScript/javascript source code:
2626

2727
```shell
28-
npx capnp-es --ts --dts --js path/to/myschema.capnp
28+
npx capnp-es path/to/myschema.capnp
2929
```
3030

31-
or
31+
This will generate `path/to/myschema.{ext}`.
3232

33-
```shell
34-
capnpc -o- path/to/myschema.capnp | npx capnp-es --ts --dts --js
35-
```
33+
Arguments:
3634

37-
This will generate `path/to/myschema.{ts,d.ts,js}` (ESM syntax).
35+
- `--ts`: Generate `.ts` schema (default)
36+
- `--js`: Generate `.js` transpiled schema (ESM)
37+
- `--dts`: Generate type declarations
3838

3939
See [playground](./playground/) for examples and learn more about `.capnp` schema in capnp language [docs](https://capnproto.org/language.html).
4040

@@ -52,27 +52,27 @@ const struct = message.getRoot(MyStruct);
5252

5353
### RPC Protocol
5454

55-
Experimental [RPC protocol](https://capnproto.org/rpc.html) is supported ([level 1](https://capnproto.org/rpc.html#protocol-features).)
55+
Experimental [RPC protocol](https://capnproto.org/rpc.html) is supported ([level 1](https://capnproto.org/rpc.html#protocol-features)).
56+
57+
See [tests](./test/integration/rpc.spec.ts) for some examples.
5658

5759
## Status
5860

5961
This project is a rework<sup>1</sup> of [jdiaz5513/capnp-ts](https://github.com/jdiaz5513/capnp-ts/) by Julián Díaz and is under development.
6062

6163
**<sup>1</sup> Changes from `capnp-ts`:**
6264

63-
- [x] Internal refactors and simplifications as was playing around.
64-
- [x] Compiler, runtime, and std lib published via a single and compact ESM-only package with subpath exports.
65-
- [x] Compiler updated to use Typescript v5 API
66-
- [x] Output files can be `.ts` (new), `.js` (ESM instead of CJS), and `.d.ts` and has no `.capnp` suffix.
67-
- [x] Compiler API can be used via the `capnp-es/compiler` subpath export programmatically.
68-
- [x] Use native `TextEncoder` and `TextDecoder` for utf8 encoding
69-
- [x] Enums are typed plain JS objects (this way `.ts` files work with strip-only ts loaders without enum support.)
70-
- [x] Compiler CLI can directly accept a path to `.capnp` files and internally use `capnpc`
71-
- [x] Built-in schemas are compiled from source (compiler, compiles itself. so cool right?)
72-
- [x] Use reflection (getter setters) to access structs.
73-
- [x] RPC level 1
74-
- [ ] [TODO] Investigate runtime performance. Some language features make full traverse slow, especially on Node.js < 22, Bun is fast and all good.
75-
- [ ] [PLANNED] Investigate the possibility of bundling the wasm version of `capnp`
65+
- Internal refactors and simplifications as was playing around.
66+
- Compiler, runtime, and std lib published via a single and compact ESM-only package with subpath exports.
67+
- Compiler updated to use Typescript v5 API
68+
- Output files can be `.ts` (new), `.js` (ESM instead of CJS), and `.d.ts` and has no `.capnp` suffix.
69+
- Compiler API can be used via the `capnp-es/compiler` subpath export programmatically.
70+
- Use native `TextEncoder` and `TextDecoder` for utf8 encoding
71+
- Enums are typed plain JS objects (this way `.ts` files work with strip-only ts loaders without enum support.)
72+
- Compiler CLI can directly accept a path to `.capnp` files and internally use `capnpc`
73+
- Built-in schemas are compiled from source (compiler, compiles itself. so cool right?)
74+
- Use reflection (getter setters) to access structs.
75+
- RPC level 1
7676

7777
## Development
7878

0 commit comments

Comments
 (0)