use gpu_compiler_bin_wrapper::CompileRequest; use graph_craft::document::*; pub async fn compile(network: NodeNetwork) -> Result, reqwest::Error> { let client = reqwest::Client::new(); let compile_request = CompileRequest::new(network, std::any::type_name::().to_owned(), std::any::type_name::().to_owned()); let response = client.post("http://localhost:3000/compile/spirv").json(&compile_request).send(); let response = response.await?; response.bytes().await.map(|b| b.to_vec()) } pub fn compile_sync(network: NodeNetwork) -> Result, reqwest::Error> { future_executor::block_on(compile::(network)) }