process
5.0.6, released 3 months ago by tools.dart.dev
Pluggable, mockable process invocation abstraction for Dart.
Rock solid
What it does
A generic process invocation abstraction for Dart that supplies a rich, Dart-idiomatic API for spawning OS processes similar to dart:io. Unlike dart:io, it requires processes to be started with a ProcessManager, allowing for easy mocking and testing of code that spawns processes.
AI-written summary of version 5.0.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to test code that spawns external OS processes.
- You require a mockable ProcessManager abstraction for process execution.
Skip it when
- You are just writing a simple script that directly uses standard dart:io Process APIs without any unit testing or mocking requirements.
Strengths
- Allows hermetic mocking and testing of OS process calls.
- Provides an API familiar to developers using dart:io.
Weaknesses
- Adds an abstraction layer over native dart:io process handling.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
dart run example/main.dartWorks with
Packages commonly used together with process: ones it builds on, ones built on it, and its own family.
- platformprocess depends on itCross‑platform abstraction for querying runtime platform info in Dart.
- fileprocess depends on itPluggable, mockable file system abstraction for Dart with in-memory support.
- globSame familyA file and directory globbing library that supports Bash-style path matching and listing.
- dwdsSame familyProxies between the Chrome debug protocol and the Dart VM service protocol.
- ffigenSame familyGenerator for FFI bindings, using LibClang to parse C, Objective-C, and Swift files.
- build_web_compilersSame familyBuild_runner builder that compiles Dart to JavaScript or WebAssembly for web applications
- webdevSame familyA command-line tool for developing and deploying web applications with Dart.
- native_toolchain_cBuilt on processInvoke the native C compiler installed on the host machine.