INNER CODE UNIT · Rust
proto_version
Augani/dory · dory-core/ffi/src/lib.rs:25
pub fn proto_version() -> u32 {
dory_proto::handshake::PROTO_VERSION
}
/// Result of a create-body rewrite. `ok == false` carries a human-readable `error` (e.g. a GPU
/// request on an engine without GPU) and an empty `body`.
#[derive(uniffi::Record)]
pub struct RewriteResult {
pub ok: bool,
pub body: Vec<u8>,
pub error: String,
}
/// Apply the shared-VM container-create rewrites to a JSON body. Control-plane only: this is a small
/// config message, not a data-plane stream.
#[uniffi::export]
pub fn rewrite_create_body(body: Vec<u8>, gpu_supported: bool) -> RewriteResult {
match dory_dataplane::rewrite_create_body(&body, &dory_dataplane::RewriteOpts { gpu_supported })