Skip to content

Github trending [protocolbuffers/protobuf] 高效数据序列化工具 #745

Description

@web1992

项目地址

https://github.com/protocolbuffers/protobuf

AI 摘要

Protocol Buffers(protobuf)是谷歌开发的与语言和平台无关的数据序列化机制,用于高效结构化数据传输。它提供协议编译器(protoc)和多种语言运行时,支持 C++、Java、Python、Go 等。用户可通过预编译二进制或源码安装。项目支持 Bazel 构建系统(Bzlmod 和 WORKSPACE),并有官方文档和 GitHub 发布版本。

README 原文

Protocol Buffers - Google's data interchange format

OpenSSF Scorecard

Copyright 2008 Google LLC

Overview

Protocol Buffers (a.k.a., protobuf) are Google's language-neutral,
platform-neutral, extensible mechanism for serializing structured data. You
can learn more about it in protobuf's documentation.

This README file contains protobuf installation instructions. To install
protobuf, you need to install the protocol compiler (used to compile .proto
files) and the protobuf runtime for your chosen programming language.

Working With Protobuf Source Code

Most users will find working from
supported releases to be
the easiest path.

If you choose to work from the head revision of the main branch your build will
occasionally be broken by source-incompatible changes and insufficiently-tested
(and therefore broken) behavior.

If you are using C++ or otherwise need to build protobuf from source as a part
of your project, you should pin to a release commit on a release branch.

This is because even release branches can experience some instability in between
release commits.

Bazel with Bzlmod

Protobuf supports
Bzlmod with Bazel 8 +.
Users should specify a dependency on protobuf in their MODULE.bazel file as
follows.

bazel_dep(name = "protobuf", version = <VERSION>)

Users can optionally override the repo name, such as for compatibility with
WORKSPACE.

bazel_dep(name = "protobuf", version = <VERSION>, repo_name = "com_google_protobuf")

Bazel with WORKSPACE

Users can also add the following to their legacy
[WORKSPACE](https://bazel.build/external/overview#workspace-sys...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions