A Rust library (with C bindings) for communicating with the hypervisor via hypercalls in a channel-like manner. Primarily intended for use with the guest plugin API.
```c /** * Initialize the channel library, should be run at the start of main() in your guest plu */ void hyperchannel_init(void);
/** * Uninitialize the channel library, should be run at the end of main() in your guest plu */ void hyperchannel_uninit(void);
/** * Read from a channel descriptor into a buffer * * Returns: the number of bytes read into the buffer. */ uintptrt channelread(uint32t channel, uint8t *out, uintptrt outlen);
/** * Write a buffer to a given channel descriptor */ void channelwrite(uint32t channel, const uint8t *buf, uintptrt buf_len);
/** * Gets the main channel for a plugin of a given name * * Returns: the number of bytes read into the buffer, or -1 if the plugin wasn't found */ int32t getmainchannel(const uint8t *name, uintptr_t len);
/** * Get a new channel not associated with any specific plugin * * Returns: the channel, or -1 if an error occurs */ int32t getnew_channel(void); ```