docs.rs failed to build async-usercalls-0.6.0
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 crate provides an interface for performing asynchronous usercalls in SGX enclaves. The motivation behind asynchronous usercalls and ABI documentation can be found here. The API provided here is fairly low level and is not meant for general use. These APIs can be used to implement mio abstractions which in turn allows us to use tokio in SGX enclaves!
The main interface is provided through AsyncUsercallProvider which works
in tandem with CallbackHandler:
use AsyncUsercallProvider;
use ;
let = new;
let = sync_channel;
// The closure is called when userspace sends back the result of the
// usercall.
let cancel_handle = provider.connect_stream;
// We can cancel the connect usercall using `cancel_handle.cancel()`, but
// note that we may still get a successful result.
// We need to poll `callback_handler` to make progress.
loop
let connect_result: = rx.recv.unwrap;