macOS Development Setup
macOS Development Environment Setup
This guide covers setting up a complete development environment for Netcap on macOS.
Prerequisites
1. Install Homebrew
If you don't have Homebrew installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"2. Install Go
Install Go 1.21 or later:
brew install goVerify installation:
go version3. Install Protocol Buffers Compiler
Netcap uses Protocol Buffers for efficient data serialization. Install the protoc compiler:
brew install protobufVerify installation:
protoc --versionProtocol Buffer Plugins
Netcap generates Protocol Buffer code for multiple languages. Install all required plugins:
Go Plugin (gogofaster)
The gogofaster plugin generates optimized Go code:
Verify installation:
Swift Plugin
For Swift code generation:
Verify installation:
JavaScript Plugin
For JavaScript code generation:
Verify installation:
Built-in Plugins
The following plugins are built into protoc and require no separate installation:
Python (
--python_out)Java (
--java_out)C++ (
--cpp_out)C# (
--csharp_out)
Verify All Plugins
Run this command to verify all plugins are installed:
Clone and Build Netcap
Clone the Repository
Install Zeus Build System
Netcap uses the Zeus build system:
Build Netcap
Build the project:
Or build manually:
Generate Protocol Buffers
Development Build (Go only)
For development, you typically only need Go code:
Or manually:
Release Build (All languages)
For a release build with all language bindings:
Or manually:
Environment Variables
Go Binary Path
Ensure your Go binary directory is in your PATH. Add to ~/.zshrc (or ~/.bash_profile):
Netcap Configuration
Set the configuration root if needed:
Troubleshooting
protoc-gen-* not found errors
If you get errors like protoc-gen-XXX: program not found or is not executable:
Ensure the plugin is installed
Check if it's in your PATH:
For Go plugins, ensure
$HOME/go/binis in your PATHFor Homebrew plugins, ensure
/opt/homebrew/binis in your PATH
Permission Issues
If you encounter permission errors when installing global npm packages:
Protocol Buffer Version Mismatch
If you encounter version mismatch errors, ensure you're using compatible versions:
Additional Development Tools
Optional but Recommended
Install additional tools for development:
Next Steps
Read the Contributing Guide
Check the Development Notes
Review the Testing Guide
Explore the Architecture Documentation
See Also
Installation Guide - For end-user installation
Quickstart - Getting started with Netcap
Configuration - Configuration options
Troubleshooting - Common issues and solutions
Last updated