macOS
brew install swiglocal Homebrew formula metadata
sudo port install swigMacPorts ports tree · devel/swig/Portfile · source: api.github.com
brew
Generate scripting interfaces to C/C++ code. Version 4.4.1 via Homebrew; verified from local package data.
install
brew install swiglocal Homebrew formula metadata
sudo port install swigMacPorts ports tree · devel/swig/Portfile · source: api.github.com
sudo apk add swigAlpine Linux edge package indexes · swig · source: dl-cdn.alpinelinux.org
sudo apt install swigDebian stable package indexes · swig · source: deb.debian.org
sudo dnf install ccache-swigFedora Rawhide package metadata · ccache-swig · source: dl.fedoraproject.org
nix profile install nixpkgs#swignixpkgs package indexes · pkgs/by-name/sw/swig/package.nix · source: api.github.com
sudo pacman -S swigArch Linux sync databases · swig · source: geo.mirror.pkgbuild.com
sudo zypper install swigopenSUSE Tumbleweed package metadata · swig · source: download.opensuse.org
choco install swigChocolatey community package catalog · swig · source: community.chocolatey.org
scoop install main/swigScoop official bucket manifest trees · bucket/swig.json · source: api.github.com
winget install --id SWIG.SWIG -eWindows Package Manager source index · SWIG.SWIG · source: cdn.winget.microsoft.com
overview
Generate scripting interfaces to C/C++ code
history
SWIG, the Simplified Wrapper and Interface Generator, is a long-running tool for connecting C and C++ programs to higher-level languages. In package-manager culture it is a classic build dependency: old, portable, cross-language, and often installed because another package needs generated bindings.
SWIG began in July 1995 when Dave Beazley developed it at Los Alamos National Laboratory for scientific software that needed scripting interfaces. The official history says it was rewritten in C++ at the University of Utah in January 1996 and expanded beyond its original environment to Tcl, Perl, and Guile.
Version 1.0 arrived in September 1996 with Python support, followed by 1.1 in 1997. The long 1.3 development series began in 2000 and carried the project through a decade of incremental language and parser work before SWIG 2.0.0 was released in 2010.
Later major releases continued to track C++ and target-language evolution: 3.0.0 in 2014, 4.0.0 in 2019, 4.1.x in 2022, 4.2.x in 2023-2024, 4.3.x in 2024-2025, and 4.4.x in 2025.
The SWIG homepage describes support for common scripting languages including JavaScript, Perl, PHP, Python, Tcl, and Ruby, plus non-scripting targets such as C#, D, Go, Java, Lua, OCaml, Octave, Scilab, R, and Guile. That breadth made it a general-purpose bridge for C and C++ libraries rather than a single-language extension tool.
The documentation page lists papers and tutorials from the 1996-1998 period and later training material, reflecting early adoption in Tcl, Python, Perl, scientific computing, and systems integration communities.
The input package facts show SWIG in many package managers, including apk, Homebrew, Chocolatey, Debian, DNF, MacPorts, Nix, pacman, Scoop, Ubuntu, winget, and zypper. That distribution footprint fits its role as a cross-platform tool needed by both developers and downstream package builds.
SWIG is commonly used to parse C or C++ declarations and generate wrapper or glue code so higher-level languages can call native libraries. It is also used for prototyping, testing, embedding interpreters, and exporting parse information.
In package builds, SWIG often appears as a build-time dependency for projects that ship generated bindings for Python, Java, Ruby, Perl, Tcl, R, Octave, or other target languages.
SWIG is package-nerd significant because it is part compiler, part portability layer, and part historical artifact of scripting-language extension culture. It lets a C or C++ library become packages in multiple language ecosystems without hand-writing every binding layer.
Its long release history also matters operationally: old software may require old SWIG behavior, while new packages need modern C++, Python, JavaScript, Ruby, PHP, Go, or Java support. Distribution maintainers therefore care about which SWIG version is installed and when generated files are regenerated.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
ccache-swig | cli | global executable | |
swig | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
install metadata
| Package key | brew:swig |
|---|---|
| Version | 4.4.1 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/swig |
| Homepage | https://www.swig.org/ |
| Repository | https://github.com/swig/swig |
| Upstream docs | https://www.swig.org/doc.html |
| License | GPL-3.0-or-later |
| Source archive | https://downloads.sourceforge.net/project/swig/swig/swig-4.4.1/swig-4.4.1.tar.gz |
| Dependencies | pcre2 |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sequoia, sonoma, tahoe, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | swig |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
swig 4.3.0-1
Generate scripting interfaces to C/C++ code
sudo apt install swigswig-doc 4.3.0-1
HTML documentation for SWIG
sudo apt install swig-docswig-examples 4.3.0-1
Examples for applications of SWIG
sudo apt install swig-examplesswig
nix profile install nixpkgs#swigswig 4.2.0-2ubuntu1
Generate scripting interfaces to C/C++ code
sudo apt install swigswig-doc 4.2.0-2ubuntu1
HTML documentation for SWIG
sudo apt install swig-docswig-examples 4.2.0-2ubuntu1
Examples for applications of SWIG
sudo apt install swig-examplesswig 4.4.1-r1
A compiler that makes it easy to integrate C and C++ code with scripting languages
sudo apk add swigswig-doc 4.4.1-r1
A compiler that makes it easy to integrate C and C++ code with scripting languages (documentation)
sudo apk add swig-docccache-swig 4.4.1-7.fc45
Fast compiler cache
sudo dnf install ccache-swigpython3-swig 4.4.1-7.fc45
Python package metadata for SWIG
sudo dnf install python3-swigswig 4.4.1-7.fc45
Connects C/C++/Objective C to some high-level programming languages
sudo dnf install swigswig-doc 4.4.1-7.fc45
Documentation files for SWIG
sudo dnf install swig-docswig-gdb 4.4.1-7.fc45
Commands for easier debugging of SWIG
sudo dnf install swig-gdbswig 4.4.1-1
Generate scripting interfaces to C/C++ code
sudo pacman -S swigswig 4.4.1-1.4
Simplified Wrapper and Interface Generator
sudo zypper install swigsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.