「Protocol Buffers」修訂間的差異

出自ChevyneWiki
跳至導覽 跳至搜尋
行 1: 行 1:
Protocol Buffers 是一種序列化資料結構的協定。
+
Protocol Buffers 是一種序列化資料結構的協定。<br />
對於透過管道(pipeline)或儲存資料進行通訊的程式開發上是很有用的。
+
對於透過管道(pipeline)或儲存資料進行通訊的程式開發上是很有用的。<br />
這個方法包含一個介面描述語言,描述一些資料結構,並提供程式工具根據這些描述產生程式碼,用於將這些資料結構產生或解析資料串流。
+
這個方法包含一個介面描述語言,描述一些資料結構,並提供程式工具根據這些描述產生程式碼,用於將這些資料結構產生或解析資料串流。<br />
  +
==Language support==
  +
Protobuf 2.0 provides a [[Code generation (compiler)|code generator]] for [[C++]], [[Java (programming language)|Java]], [[C Sharp (programming language)|C#]],<ref>{{Cite web| title = Protocol Buffers in C# | work = Code Blockage| access-date = 2017-05-12| url = http://codeblockage.blogspot.com/2015/08/protocol-buffers-in-c.html}}</ref> and [[Python (programming language)|Python]].<ref>{{Cite web| title = Protocol Buffers Language Guide| work = Google Developers| access-date = 2016-04-21| url = https://developers.google.com/protocol-buffers/docs/proto}}</ref>
  +
  +
Third-party implementations are also available for JavaScript.<ref>{{cite web|url=https://github.com/dcodeIO/protobuf.js |title=Protocol Buffers for JavaScript. |publisher=github.com |access-date=2016-05-14}}</ref>
  +
  +
Protobuf 3.0 provides a code generator for [[C++]], [[Java (programming language)|Java]] (including JavaNano, a dialect intended for [[System resource|low-resource environments]]), [[Python (programming language)|Python]], [[Go (programming language)|Go]], [[Ruby (programming language)|Ruby]], [[Objective-C]], [[C Sharp (programming language)|C#]].<ref>{{Cite web|title=Language Guide (proto3) {{!}} Protocol Buffers|url=https://developers.google.com/protocol-buffers/docs/proto3|access-date=2020-08-09|website=Google Developers|language=en}}</ref> It also supports JavaScript since 3.0.0-beta-2.<ref>{{Cite web|title=Release Protocol Buffers v3.0.0-beta-2 · protocolbuffers/protobuf|url=https://github.com/protocolbuffers/protobuf/releases/tag/v3.0.0-beta-2|access-date=2020-08-09|website=GitHub|language=en}}</ref>
  +
  +
Protobuf 4.0 is largely the same as 3.0 but the C extension for PHP being rewritten, dropping support for PHP 5.<ref>{{Cite web|title=Release v4.0.0-rc1 · protocolbuffers/protobuf|url=https://github.com/protocolbuffers/protobuf/releases/tag/v4.0.0-rc1|access-date=2020-08-09|website=GitHub|language=en}}</ref>
  +
  +
Third-party implementations are also available for [[C (Programming Language)|C]],<ref>{{cite web|url=https://jpa.kapsi.fi/nanopb/|title=Nanopb - protocol buffers with small code size|access-date=2017-12-12}}</ref><ref>{{cite web|url=https://github.com/protobuf-c/protobuf-c|title=Protocol Buffers implementation in C|access-date=2017-12-12}}</ref> [[Dart (programming language)|Dart]], [[Haskell (programming language)|Haskell]],<ref>https://github.com/google/proto-lens</ref> [[Perl]], [[PHP]], [[R (programming language)|R]],<ref>https://github.com/eddelbuettel/rprotobuf/tree/master/src</ref> [[Rust (programming language)|Rust]],<ref>https://github.com/stepancheg/rust-protobuf</ref><ref>https://github.com/danburkert/prost</ref><ref>https://github.com/tafia/quick-protobuf</ref> [[Scala (programming language)|Scala]], [[Swift (programming language)|Swift]],<ref>https://github.com/apple/swift-protobuf</ref> [[Julia (programming language)|Julia]]<ref>{{cite web|url=http://code.google.com/p/protobuf/wiki/ThirdPartyAddOns |title=ThirdPartyAddOns - protobuf - Links to third-party add-ons. - Protocol Buffers - Google's data interchange format - Google Project Hosting |access-date=2012-11-07}}</ref> and [[Nim_(programming_language)|Nim]]<ref>{{cite web|url=https://github.com/PMunch/protobuf-nim|title=Protobuf implementation in pure Nim that leverages the power of the macro system to not depend on any external tools|website=GitHub|language=en}}</ref>
  +
 
__NOTOC__
 
__NOTOC__
 
[[Category:DonNet]]
 
[[Category:DonNet]]

於 2021年1月27日 (三) 21:32 的修訂

Protocol Buffers 是一種序列化資料結構的協定。
對於透過管道(pipeline)或儲存資料進行通訊的程式開發上是很有用的。
這個方法包含一個介面描述語言,描述一些資料結構,並提供程式工具根據這些描述產生程式碼,用於將這些資料結構產生或解析資料串流。

Language support

Protobuf 2.0 provides a code generator for C++, Java, C#,[1] and Python.[2]

Third-party implementations are also available for JavaScript.[3]

Protobuf 3.0 provides a code generator for C++, Java (including JavaNano, a dialect intended for low-resource environments), Python, Go, Ruby, Objective-C, C#.[4] It also supports JavaScript since 3.0.0-beta-2.[5]

Protobuf 4.0 is largely the same as 3.0 but the C extension for PHP being rewritten, dropping support for PHP 5.[6]

Third-party implementations are also available for C,[7][8] Dart, Haskell,[9] Perl, PHP, R,[10] Rust,[11][12][13] Scala, Swift,[14] Julia[15] and Nim[16]