feat: Add json rpc c++ bindings

This commit is contained in:
d2weber
2026-05-18 13:00:11 +02:00
parent a95bf77868
commit bcc5d8107d
4 changed files with 11 additions and 7 deletions

9
Cargo.lock generated
View File

@@ -7332,13 +7332,13 @@ dependencies = [
[[package]]
name = "yerpc"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dc24983fbe850227bfc1de89bf8cbfb3e2463afc322e0de2f155c4c23d06445"
source = "git+https://github.com/d2weber/yerpc.git?branch=d2weber%2Fc_bindings#3ba217a76b458744192d3a66624463787e6a9eee"
dependencies = [
"anyhow",
"async-channel 1.9.0",
"async-lock",
"async-trait",
"convert_case",
"futures",
"futures-util",
"log",
@@ -7351,9 +7351,8 @@ dependencies = [
[[package]]
name = "yerpc_derive"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d8560d021437420316370db865e44c000bf86380b47cf05e49be9d652042bf5"
version = "0.6.4"
source = "git+https://github.com/d2weber/yerpc.git?branch=d2weber%2Fc_bindings#3ba217a76b458744192d3a66624463787e6a9eee"
dependencies = [
"convert_case",
"darling",

View File

@@ -204,7 +204,7 @@ thiserror = "2"
tokio = "1"
tokio-util = "0.7.18"
tracing-subscriber = "0.3"
yerpc = "0.6.4"
yerpc = { git="https://github.com/d2weber/yerpc.git", branch="d2weber/c_bindings" }
[features]
default = ["vendored"]

1
deltachat-jsonrpc/c/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
generated

View File

@@ -156,7 +156,11 @@ impl CommandApi {
}
}
#[rpc(all_positional, ts_outdir = "typescript/generated")]
#[rpc(
all_positional,
ts_outdir = "typescript/generated",
c_outdir = "c/generated"
)]
impl CommandApi {
/// Test function.
async fn sleep(&self, delay: f64) {