protoc_builder
0.6.1, released 2 months ago by julien-scholz.dev
A build script to compile Protocol Buffers to Dart without manually installing protoc.
What it does
A build_runner package that compiles Protocol Buffer (.proto) files into Dart source code. It automatically downloads the required protoc compiler and protoc_plugin dependencies for your platform locally.
AI-written summary of version 0.6.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to compile .proto files inside a Dart or Flutter project using build_runner.
- You want to avoid manually installing protoc or the protoc_plugin on your machine.
Skip it when
- You are not using build_runner in your project workflow.
- You need a different code generation tool that is unrelated to Protocol Buffers.
Strengths
- Downloads and manages protoc and protoc_plugin binaries automatically.
- Integrates seamlessly with build_runner and pub workspaces.
Weaknesses
- Requires proper configuration in build.yaml.
- Relies on build_runner which can sometimes cache results longer than expected.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 5
Add build_runner and protoc_builder to dev_dependencies, place your .proto files in the designated directory, and configure targets and options in a build.yaml file.
dev_dependencies:
build_runner: <latest>
protoc_builder: <latest>Alternatives
Packages that do the same job and could replace protoc_builder.
Works with
Packages commonly used together with protoc_builder: ones it builds on, ones built on it, and its own family.
- archiveprotoc_builder depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- yamlprotoc_builder depends on itA Dart library for parsing YAML documents into Dart data structures.
- buildprotoc_builder depends on itPackage for authoring build_runner compatible code generators.
- build_runnerUsed togetherA build system for Dart code generation and modular compilation.