#protoc #gen #compile #codec #binary #deserialize #ets

bin+lib protoc_gen_ets

a ts, ets generator for protobuf via protoc

1 unstable release

0.1.1 Nov 12, 2024

#2461 in Parser implementations

Download history 114/week @ 2024-11-11 13/week @ 2024-11-18 42/week @ 2024-12-02 38/week @ 2024-12-09

98 downloads per month

MIT license

4MB
7.5K SLoC

Rust 5.5K SLoC // 0.0% comments TypeScript 2K SLoC // 0.4% comments Shell 51 SLoC // 0.2% comments JavaScript 5 SLoC // 0.3% comments

Contains (Mach-o exe, 21MB) js/conformance/conformance_test_runner

Protoc Gen ArkTS

!NOTE Forked from protoc-gen-ts

Compile .proto files to plain ArkTS. Supports concurrent with @Sendable on codec classes.

Run with @ohos/protobufjs

Features

  • Passes all required conformance tests
  • Supports ArkTS(ets) with @Sendable for concurrent
  • Supports well-known types
  • Supports json encoding (toJson, fromJson)
  • Supports binary encoding (toBinary, fromBinary)
  • Optimized for [de]serialization speed.

Usage

npm install -g @larkoh/protoc-gen-ets

Protoc

protoc -I=sourcedir --ets_out=dist myproto.proto --ets_opt="namespace_as_file=true,export_indcies=true,bigint_as_long=true"

Development

./infra/test.sh

Dependencies

~24–36MB
~632K SLoC