Conversation
| @@ -0,0 +1,82 @@ | |||
| { | |||
There was a problem hiding this comment.
Note for other reviewers: we have generated typescript files committed, so it is somewhat expected to commit generated files in this case too. If we decide to remove generated files, it should be in another PR. They are somewhat useful to spot the changes between versions of the generator.
| Now you can connect any JSON-RPC client to `ws://localhost:3000/rpc` and call the `shout` and `add` methods. | ||
|
|
||
| After running `cargo test` you will find an autogenerated TypeScript client in the `typescript/generated` folder and an `openrpc.json` file in the root fo your project. | ||
| After running `cargo test` you will find an autogenerated TypeScript client in the `typescript/generated` folder and an `openrpc.json` file in the root fo your project. (`cargo test` sets the current working directory to `CARGO_MANIFEST_DIR`.) |
There was a problem hiding this comment.
Can as well fix the typo "fo" -> "of".
But i'm not sure what "cargo test sets the current working directory to CARGO_MANIFEST_DIR", seems like an "implementation detail" that is interesting when reviewing this PR to understand why explicit std::env::var("CARGO_MANIFEST_DIR") is removed, but not interesting for the readme reader who may not even know what CARGO_MANIFEST_DIR is.
| } | ||
|
|
||
| #[test] | ||
| fn write_files() { |
There was a problem hiding this comment.
Don't know how difficult it is to move this to build.rs (see discussion in #77), but likely better done in another PR.
There was a problem hiding this comment.
Yes actually the point of this PR was to make use in build.rs possible, see the core PR chatmail/core#8350 I now linked in the description of this PR.
I thought in the readme it might be more concise keep using the #[test] approach but we can also describe the build.rs approach in the readme.
Closes #77
Edit: Corresponding PR to use this in core: chatmail/core#8350