Commit 38a8443b authored by Katharina Fey's avatar Katharina Fey

qrpc-sdk: adding initial capnproto schema builds

parent 2aa90667
......@@ -352,6 +352,15 @@ version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "739fa606458e49df64116a3cda1bf711ada360ce714357674d0950ed2132a6a1"
[[package]]
name = "capnpc"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81855cee80548f7a2ee549d3bc2e55ed5f7cabe469e85614046e5475712f75c1"
dependencies = [
"capnp",
]
[[package]]
name = "cc"
version = "1.0.55"
......@@ -1665,6 +1674,7 @@ name = "qrpc-sdk"
version = "0.1.0"
dependencies = [
"capnp",
"capnpc",
]
[[package]]
......
......@@ -6,4 +6,7 @@ authors = ["Kaiden Fey <kookie@spacekookie.de>"]
edition = "2018"
[dependencies]
capnp = "*"
\ No newline at end of file
capnp = "*"
[build-dependencies]
capnpc = "*"
\ No newline at end of file
use capnpc::CompilerCommand as Cc;
fn main() {
Cc::new()
.file("schema/carrier.capnp")
.run()
.expect("Failed compiling schema/carrier.capnp!");
}
@0x97aa1eae99a0bced; # this was generated by capnp id
struct Service {
# Names follow reverse FQD specification: net.qaul.example
name @0 :Text;
# Versions are up to services to interpret. A simple
# incrementing number is fine, but feel free to encode semver
# into this field.
version @1 :Int16;
# A description of the service shown to end-users. Make it something concise
description @2 :Text;
}
interface RpcBroker {
# Register this service with the broker and return a unique
# hash-id that users can verify the authenticity of this service.
registerService @0 (s :Service) -> (hash_id :Text);
# Unregister this service from the broker
unregisterServire @1 (hash_id :Text) -> (success :Bool);
# Upgrade this service in-place
upgradeService @2 (s :Service, hash_id :Text) -> (success :Bool);
}
......@@ -27,6 +27,9 @@ stdenv.mkDerivation {
# Required for the code coverage and stuff
openssl
# Required for the RPC protocol
capnproto
] ++ (with androidenv.androidPkgs_9_0; [
# Required for Android builds
androidsdk
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment