# swig/swig

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.

Repository: https://github.com/swig/swig
Canonical: https://ross.abutalabs.com/products/swig
Homepage: http://www.swig.org
Language: SWIG
License: NOASSERTION
License Family: other
Last push: 2026-08-24T07:16:18+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 4995, "days_push": 9, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6318, forks 1315 (observed 2026-08-28T04:09:41.729156+00:00)

## What it is
SWIG is a compiler that reads annotated C/C++ header files and generates wrapper (glue) code so C/C++ libraries can be called from high-level languages like Python, Java, C#, Go, Ruby, PHP, Lua, and many others. It supports ISO C99 and C++98 through C++20 and can also export its parse tree as XML.

## Use cases
- generate Python bindings for a C++ library
- expose a C library to Java or C#
- call C++ code from Ruby or PHP
- create scripting language extensions for a C/C++ application
- prototype and test C/C++ code from an interpreted language
- wrap a C++ API for use in Go or Lua

## When to choose
- you need to make an existing C/C++ library usable from one or more high-level languages
- you want multi-language bindings from a single interface description
- you need broad C++ feature coverage including templates, namespaces, and STL support

## When to avoid
- you only need Python bindings and prefer a Python-specific tool like pybind11
- your code relies heavily on template meta-programming requiring automatic template instantiation
- you need bindings for a language not on SWIG's supported list

## Facets
- artifact type: cli-tool
- maturity: stable
- function: compiler, parser, developer-tools, sdk
- domain: developer-tools, programming-languages, cross-platform
- platform: windows, cross-platform, cli
- tags: bindings-generator, ffi, wrapper-generator, c-cpp, scripting-language-interop, glue-code, code-generation, linux, macos

## Member repositories
- swig/swig (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:41.729156+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:46:11.476876+00:00, confidence not recorded.
  - readme: https://github.com/swig/swig (fetched 2026-08-28T04:09:41.729156+00:00, sha 541f658540f0)
  - homepage: http://www.swig.org (fetched 2026-08-29T08:42:37.780299+00:00, sha dc665629ec99)
  - site_page: https://www.swig.org/compare.html (fetched 2026-08-29T08:42:37.790221+00:00, sha 6494199fcebc)
  - site_page: https://www.swig.org/doc.html (fetched 2026-08-29T08:42:37.792852+00:00, sha 6591eda36ed7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
