🍺 BREW Explorer

← all formulae

swig

brew install swig v4.4.1 GPL-3.0-or-later

C/C++ binding generator that creates scripting language interfaces (Python, Ruby, Perl, etc.) from C/C++ code.

Why you might care

SWIG automates the tedious work of wrapping native C/C++ libraries for use in high-level languages. If you're building a Python package that calls compiled C++ code, or need to expose a C library to multiple languages, SWIG generates the glue code automatically rather than hand-writing bindings. It's the industry standard for cross-language interfacing and handles complex features like STL containers, operator overloading, and memory management.

Categories

Alternatives

CFFI ctypes pybind11 CPPYY
10.4k
30-day installs · #350
30.0k
90-day · #396
114.2k
365-day · #382

Runtime dependencies

Links

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "CFFI",
    "ctypes",
    "pybind11",
    "CPPYY"
  ],
  "build_dependencies": [],
  "categories": [
    "binding",
    "parser",
    "build-system"
  ],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "pcre2"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Generate scripting interfaces to C/C++ code",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:40:49+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "swig",
  "github_default_branch": null,
  "github_last_commit_at": null,
  "github_readme_excerpt": null,
  "github_repo": null,
  "github_stars": null,
  "github_topics": [],
  "homepage": "https://www.swig.org/",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": "Simplified Wrapper and Interface Generator",
  "installs_30d": 10432,
  "installs_365d": 114174,
  "installs_90d": 29972,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "GPL-3.0-or-later",
  "llm_generated_at": "2026-06-20T23:44:20+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "swig",
  "oldnames": [],
  "one_liner": "C/C++ binding generator that creates scripting language interfaces (Python, Ruby, Perl, etc.) from C/C++ code.",
  "optional_dependencies": [],
  "rank_30d": 350,
  "rank_365d": 382,
  "rank_90d": 396,
  "raw_hash": "530af23453700472",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/s/swig.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [
    {
      "python": "test"
    }
  ],
  "version_head": "HEAD",
  "version_stable": "4.4.1",
  "versioned_formulae": [],
  "why_use_this": "SWIG automates the tedious work of wrapping native C/C++ libraries for use in high-level languages. If you\u0027re building a Python package that calls compiled C++ code, or need to expose a C library to multiple languages, SWIG generates the glue code automatically rather than hand-writing bindings. It\u0027s the industry standard for cross-language interfacing and handles complex features like STL containers, operator overloading, and memory management."
}