Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
407 B

#include "rust/cpp_kernel/debug.h"
#include <string>
#include "google/protobuf/message_lite.h"
#include "rust/cpp_kernel/strings.h"
extern "C" {
google::protobuf::rust::RustStringRawParts proto2_rust_utf8_debug_string(
const google::protobuf::MessageLite* msg) {
std::string text = google::protobuf::Utf8Format(*msg);
return google::protobuf::rust::RustStringRawParts(text);
}
} // extern "C"