docs.rs failed to build brpc-rs-0.1.0-alpha
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
This is a proof-of-concept and we are adding Rust bindings to Apache RPC.
First please read this to build and install Apache BRPC. brpc-rs dynamically links to libbrpc and libprotobuf.
To run the example:
$ cargo build --example server
$ ./target/debug/examples/server
I0605 17:58:25.227115 20975 /home/yjing/incubator-brpc/src/brpc/server.cpp:1039] Server[brpc_rs::HttpServiceImpl] is serving on port=50000.
I0605 17:58:25.227269 20975 /home/yjing/incubator-brpc/src/brpc/server.cpp:1042] Check out http://0.0.0.0:50000 in web browser.
Now the demo service is up and running. The BRPC dashboard can be accessed from http://0.0.0.0:50000.
Now let's send some requests to the service. In a separate terminal, run:
$ curl -H "Accept: application/json" --request POST --data '{"name":"Jim","age":12}' http://127.0.0.1:50000/v1/hello
{"message":"Hello Jim! You are 12 years old."}%
$ curl -H "Accept: application/json" --request POST --data '24' http://127.0.0.1:50000/v1/hello
"24 years old?"%