Word grpcCallHandler(void* raw_context, Word service_ptr, Word service_size, Word service_name_ptr,
                     Word service_name_size, Word method_name_ptr, Word method_name_size,
                     Word request_ptr, Word request_size, Word timeout_milliseconds) {
  auto context = WASM_CONTEXT(raw_context)->root_context();
  auto service = context->wasmVm()->getMemory(service_ptr.u64_, service_size.u64_);
  auto service_name = context->wasmVm()->getMemory(service_name_ptr.u64_, service_name_size.u64_);
  auto method_name = context->wasmVm()->getMemory(method_name_ptr.u64_, method_name_size.u64_);
  auto request = context->wasmVm()->getMemory(request_ptr.u64_, request_size.u64_);
  if (!service || !service_name || !method_name || !request) {
    return wasmResultToWord(WasmResult::InvalidMemoryAccess);
  }
  envoy::api::v2::core::GrpcService service_proto;
  if (!service_proto.ParseFromArray(service.value().data(), service.value().size())) {
    return false;
  }
  return context->grpcCall(service_proto, service_name.value(), method_name.value(),
                           request.value(), std::chrono::milliseconds(timeout_milliseconds.u64_));
}
Word grpcCallHandler(void* raw_context, Word service_ptr, Word service_size, Word service_name_ptr,
                     Word service_name_size, Word method_name_ptr, Word method_name_size,
                     Word request_ptr, Word request_size, Word timeout_milliseconds) {
  auto context = WASM_CONTEXT(raw_context)->root_context();
  auto service = context->wasmVm()->getMemory(service_ptr.u64_, service_size.u64_);
  auto service_name = context->wasmVm()->getMemory(service_name_ptr.u64_, service_name_size.u64_);
  auto method_name = context->wasmVm()->getMemory(method_name_ptr.u64_, method_name_size.u64_);
  auto request = context->wasmVm()->getMemory(request_ptr.u64_, request_size.u64_);
  if (!service || !service_name || !method_name || !request) {
    return wasmResultToWord(WasmResult::InvalidMemoryAccess);
  }
  envoy::api::v2::core::GrpcService service_proto;
  if (!service_proto.ParseFromArray(service.value().data(), service.value().size())) {
    return false;
  }
  return context->grpcCall(service_proto, service_name.value(), method_name.value(),
                           request.value(), std::chrono::milliseconds(timeout_milliseconds.u64_));
}