SWIG image
Home Github Development Mailing Lists Bugs and Patches
Information
What is SWIG?
Compatibility
Features
Tutorial
Documentation
News
The Bleeding Edge
History
Guilty Parties
Projects
Legal Department
Links
Download
SwigWiki
Donate
Affiliations
Software Freedom Conservancy logo
Our Generous Host
Get SWIG at SourceForge.net. Fast, secure and Free Open Source software downloads
Exits
AllegroCL
C# - Mono
C# - MS .NET
CFFI
CHICKEN
CLISP
D
Go language
Guile
Java
Javascript - Node.js
Javascript - V8
Javascript - WebKit
Lua
MzScheme/Racket
Ocaml
Octave
Perl
PHP
Python
R
Ruby
Tcl/Tk

Welcome to SWIG

[ Chinese ]

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of target languages including common scripting languages such as Javascript, Perl, PHP, Python, Tcl and Ruby. The list of supported languages also includes non-scripting languages such as C#, Common Lisp (CLISP, Allegro CL, CFFI, UFFI), D, Go language, Java including Android, Lua, Modula-3, OCAML, Octave and R. Also several interpreted and compiled Scheme implementations (Guile, MzScheme/Racket, Chicken) are supported. SWIG is most commonly used to create high-level interpreted or compiled programming environments, user interfaces, and as a tool for testing and prototyping C/C++ software. SWIG is typically used to parse C/C++ interfaces and generate the 'glue code' required for the above target languages to call into the C/C++ code. SWIG can also export its parse tree in the form of XML and Lisp s-expressions. SWIG is free software and the code that SWIG generates is compatible with both commercial and non-commercial projects.

Recent News SWIG RSS Feed

2014/12/31 - SWIG-3.0.3 released

SWIG-3.0.3 release summary:
- Add support for C++11 strongly typed enumerations.
- Numerous bug fixes and minor enhancements for C#, D, Go, Java,
Javascript, PHP, Perl and Python wrappers.

More detailed release notes can be seen at http://swig.org/release.html

2014/06/04 - SWIG-3.0.2 released

This release has been made to fix a bug during installation, but it also includes a couple of other rather minor changes.

2014/05/27 - SWIG-3.0.1 released

SWIG-3.0.1 is another milestone release as it is the first version to contain support for Javascript.

Release summary:

  • Javascript module added. This supports JavascriptCore (Safari/Webkit), v8 (Chromium) and node.js currently.
  • A few notable regressions introduced in 3.0.0 have been fixed - in Lua, nested classes and parsing of operator <<.
  • The usual round of bug fixes and minor improvements for C#, GCJ, Go, Java, Lua, PHP and Python.

2014/03/16 - SWIG-3.0.0 released

This is a major new release focusing primarily on C++ improvements.

  • C++11 support added. Please see documentation for details of supported
    features: http://www.swig.org/Doc3.0/CPlusPlus11.html
  • Nested class support added. This has been taken full advantage of in
    Java and C#. Other languages can use the nested classes, but require
    further work for a more natural integration into the target language.
    We urge folk knowledgeable in the other target languages to step
    forward and help with this effort.
  • Lua: improved metatables and support for %nspace.
  • Go 1.3 support added.
  • Python import improvements including relative imports.
  • Python 3.3 support completed.
  • Perl director support added.
  • C# .NET 2 support is now the minimum. Generated using statements are
    replaced by fully qualified names.
  • Bug fixes and improvements to the following languages:
    C#, Go, Guile, Java, Lua, Perl, PHP, Python, Octave, R, Ruby, Tcl
  • Various other bug fixes and improvements affecting all languages.
  • Note that this release contains some backwards incompatible changes
    in some languages.
  • Full detailed release notes are in the changes file.
    See http://swig.org/release.html.

2014/02/09 - SWIG-2.0.12 released

SWIG-2.0.12 summary:
- This is a maintenance release backporting some fixes from the pending 3.0.0 release.
- Octave 3.8 support added.
- C++11 support for new versions of erase/insert in the STL containers.
- Compilation fixes on some systems for the generated Lua, PHP, Python and R wrappers.

2013/09/15 - SWIG-2.0.11 released

SWIG-2.0.11 summary:
- Minor bug fixes and enhancements mostly in Python, but also
C#, Lua, Ocaml, Octave, Perl, PHP, Python, R, Ruby, Tcl.

2013/05/27 - SWIG-2.0.10 released

SWIG-2.0.10 summary:
- Ruby 1.9 support is now complete.
- Add support for Guile 2.0 and Guile 1.6 support (GH interface) has
been dropped.
- Various small language neutral improvements and fixes.
- Various bug fixes and minor improvements specific to C#, CFFI, D,
Java, Octave, PHP, Python,
- Minor bug fix in ccache-swig.
- Development has moved to Github with Travis continuous integration
testing - patches using https://github.com/swig/swig are welcome.

2013/05/03 - SWIG license explanation

We have recently updated the SWIG legal page to provide clarification on the SWIG license. There has been some confusion as to how the GPL license may or may not affect the code generated by SWIG. Please take a look at the updated SWIG legal page.

We are indebted to the Software Freedom Law Center for all the help given in providing the legal explanations and for originally helping set up the license for version 2.0.

2013/01/03 - SWIG on Github

With the new year we have switched SWIG development to a new development model - Git on Github. The old Subversion history (including the even older CVS history) has been migrated and is now viewable in Github - https://github.com/swig/swig. If you have used SWIG we would really appreciate improvements you have made for incorporation into the mainline SWIG releases. So, feel free to use Github to fork and send your pull requests or patches.

Improvements to the documentation are also very welcome - the html source can be found at https://github.com/swig/swig/tree/master/Doc/Manual.

Information for getting going is on the SWIG website: SWIG Bleeding Edge.

We have also turned on the new SourceForge Allura system which is much slicker than the old SourceForge for submitting bugs/patches - SWIG on SourceForge.

Happy new year!
William

2012/12/16 - SWIG-2.0.9 released

SWIG-2.0.9 summary:
- Improved typemap matching.
- Ruby 1.9 support is much improved.
- Various bug fixes and minor improvements in C#, CFFI, Go, Java,
Modula3, Octave, Perl, Python, R, Ruby, Tcl and in ccache-swig.

More news


Feedback and questions concerning this site should be posted to the swig-devel mailing list.

Last modified : Tue May 27 19:23:01 2014