macOS
brew install swiglocal Homebrew formula metadata
sudo port install swigMacPorts ports tree · devel/swig/Portfile · 来源: api.github.com
安装
brew install swiglocal Homebrew formula metadata
sudo port install swigMacPorts ports tree · devel/swig/Portfile · 来源: api.github.com
sudo apk add swigAlpine Linux edge package indexes · swig · 来源: dl-cdn.alpinelinux.org
sudo dnf install swigFedora Rawhide package metadata · swig · 来源: dl.fedoraproject.org
nix profile install nixpkgs#swignixpkgs package indexes · pkgs/by-name/sw/swig/package.nix · 来源: api.github.com
sudo pacman -S swigArch Linux sync databases · swig · 来源: geo.mirror.pkgbuild.com
sudo zypper install swigopenSUSE Tumbleweed package metadata · swig · 来源: download.opensuse.org
choco install swigChocolatey community package catalog · swig · 来源: community.chocolatey.org
scoop install main/swigScoop official bucket manifest trees · bucket/swig.json · 来源: api.github.com
winget install --id SWIG.SWIG -eWindows Package Manager source index · SWIG.SWIG · 来源: cdn.winget.microsoft.com
概览
Generate scripting interfaces to C/C++ code
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
ccache-swig | cli | 全局可执行文件 | |
swig | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:swig |
|---|---|
| 版本 | 4.4.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/swig |
| 主页 | https://www.swig.org/ |
| 仓库 | https://github.com/swig/swig |
| 上游文档 | https://www.swig.org/doc.html |
| 许可证 | GPL-3.0-or-later |
| 源码归档 | https://downloads.sourceforge.net/project/swig/swig/swig-4.4.1/swig-4.4.1.tar.gz |
| 依赖 | pcre2 |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sequoia, sonoma, tahoe, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
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 swig来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.