How to build a common IDL lib (no service code, just types and client)
For the rest of this readme, we assume that your library containing your IDLs binding
is called $PROJECT_IDLS_NAME. We'll also work from an example echo.idl to illustrate how to build
the binding.
Make a new lib
Depends on this, in your Cargo.toml, as well as orbit2-sys as a standard dependency
[dependencies]
orbit2-sys = ">=0.1.0"
[build-dependencies]
orbit2-buildtools = ">=0.1.0"
Add your idls in 'static'
# And put your IDL(s?), for instance:
;
Make a build.rs to compile the idl
Example build.rs (assuming echo.idl)
use PathBuf;
use CommonBuilder;
Structure the generated code in your lib.rs (or a submodule if you wish too)
use *;
include!;
And that's it. Now you can use your module in your client and server applications.