This guide describes how to set up your machine to develop and contribute to the Zstandard plugin and CLI.
- Dart SDK: ^3.6.0 (see each package’s
pubspec.yamlfor the exact constraint). - Flutter SDK: >=3.3.0 (for plugin and example apps).
- Git: To clone and work with the repository.
Optional, for native work:
- Android: Android Studio / SDK and NDK if you modify Android native code.
- iOS/macOS: Xcode and CocoaPods if you modify iOS/macOS native code.
- Linux: CMake and a C compiler (gcc/clang) for building the Linux plugin.
- Windows: CMake and Visual Studio Build Tools (or equivalent) for building the Windows plugin.
- Web: Node/npm optional; Emscripten is needed only if you rebuild zstd.js/zstd.wasm.
git clone https://github.com/vypdev/zstandard.git
cd zstandardIf you use a fork:
git remote add upstream https://github.com/vypdev/zstandard.gitFrom the repository root, fetch dependencies for all packages:
flutter pub getThen, for each package you will work on:
cd zstandard
flutter pub get
cd ../zstandard_platform_interface
flutter pub get
cd ../zstandard_android # or ios, macos, linux, windows, web
flutter pub get
cd ../zstandard_cli
dart pub getOr use a script if the project provides one to run pub get in all packages.
- VS Code / Cursor: Install the Dart and Flutter extensions. Open the repo root so that all packages are visible.
- Android Studio / IntelliJ: Install the Flutter plugin and open the repo root. Ensure the Dart SDK is configured.
-
Analyze: From the repo root, run:
flutter analyze
Fix any reported issues in the packages you touch.
-
Tests: Run tests for the main package and the one you are changing:
cd zstandard && flutter test cd ../zstandard_cli && dart test
See Testing for full test commands.
-
Example app: Run the example app for your target platform to confirm the plugin works:
cd zstandard/example flutter runChoose the desired platform (e.g. Android, iOS, macOS, Windows, Linux, web).
- Android: Ensure
ANDROID_HOMEis set and that an emulator or device is available. - iOS/macOS: Ensure Xcode and CocoaPods are installed. Run
pod installin the example’sios/ormacos/if needed. - Linux: Install CMake and the build essentials; the Linux plugin’s CMake will build the native library.
- Windows: Ensure CMake and a C++ toolchain are available; the Windows plugin’s CMake will build the DLL.
- Web: No native build required for running the app; ensure
zstd.jsandzstd.wasmare in the example’sweb/if you run the web example.
- Building — How to build the plugin and native code.
- Testing — How to run and write tests.
- Code Style — Coding standards.