2 releases (1 stable)
8.0.0 | May 15, 2019 |
---|---|
0.1.0 | Jan 23, 2019 |
#6 in #varlink
49KB
985 lines
varlink for rust
See http://varlink.org for more information about varlink.
Example usage
Look into the examples directory. build.rs
contains the magic, which will build rust bindings for the varlink interface definition file.
Or use varlink_derive
to generate the bindings at compile time.
More Info
- Git Repo
- API Documentation
- Crate
- Example usage of this crate
lib.rs
:
Macro for generating modules from a varlink interface definition
It has the drawback, that most IDEs don't execute this and thus offer no code completion.
Examples:
use varlink_derive;
varlink_derive::varlink!(org_example_ping, r#"
interface org.example.ping
method Ping(ping: string) -> (pong: string)
"#);
use crate::org_example_ping::VarlinkClientInterface;
/* ... */
use varlink_derive;
varlink_derive::varlink_file!(
org_example_network,
"examples/example/src/org.example.network.varlink"
);
use crate::org_example_network::VarlinkClientInterface;
/* ... */
Dependencies
~3.5MB
~72K SLoC