spacer
Home 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
spacer
Our Generous Host
spacer
Exits
AllegroCL
C# - Mono
C# - MS .NET
CFFI
CHICKEN
CLISP
D
Go language
Guile
Java
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 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.

  • Download the latest version.
  • Documentation, papers, and presentations
  • Features.
  • Mailing Lists
  • Bug tracking
  • SwigWiki!

Recent News spacer

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.

2012/11/07 - Summer of Code 2012

GSoC 2012 was SWIG's third Summer of Code, and this year we
received five slots for projects related to SWIG. Out of five,
four students completed the program successfully with valuable
additions to SWIG.

Dmitry Kabak, mentored by Marko Klopcic, worked on SWIG
internals to parse the source code documentation comments within
the C/C++ header files and use them to document the target
language wrapper classes/functions. Dmitry's efforts
complemented the existing support added in GSoC 2008. In
summary, all previously known bugs have been fixed and the
original source code for comment translation was re-factored to
improve performance and maintainability. Parsing of C/C++ source
code has been improved, so that every declaration/definition can
now be commented. Translation of Doxygen tags to Javadoc and
Python docstrings has been improved and corresponding regression
tests have been implemented. The project mentor, Marko Klopcic
has some great ideas for the future GSoC. The work can be tried
out on the branch gsoc2012-doxygen.

Leif Middelschulte, mentored by Vadim Zeitlin, worked on the C
target language module for SWIG. Leif has improved the module
to a working level. He also rationalized and documented the use
of C typemaps and more generally improved documentation and
testing. Finally, the generated C bindings were made more
type-safe to disallow passing of objects of different types.
Unfortunately, a lot of work still remains to be done. In
particular, many problems remain with template support. Leif's
GSoC work can be accessed in the subversion branch gsoc2012-c.

Neha Narang, mentored by Oliver Buchtala, has worked on a
JavaScript module for SWIG, particularly addressing the
JavaScript Core engine. The work is based on prototype work
from Ashish Sharma (JSC) and Oliver Buchtala (V8, design for
unified module). Neha implemented basic features: global
functions and variables, classes, single inheritance, constants,
enums and exception handling. Taking her programming skills in
consideration, some tasks needed more support where Oliver
complemented her work: overloaded functions, using unified
typemap library, namespaces. She added 12 common examples and
started the test-suite writing 32 tests. Additionally, she
created detailed documentation describing design rationale and
module usage. The module is in a good shape considering it is a
new module, but some tasks are left. The next tasks will enhance
the test-suite, and add director support and bring the generator
addressing the V8 engine into a similar state. Neha's work in
GSoC is available in the branch gsoc2012-javascript.

Swati Sharma, mentored by Ashish Sharma, spent her summer
working on the Objective C module for SWIG. SWIG had initial
support for generating Objective C wrappers over C++ which was
added in GSoC 2009. These wrappers will be used to make C/C++
objects available to MacOS X, iphone and ipad applications. The
goal for the summer was to have a cleaner implementation and get
the code in a good shape for merging into trunk. Swati finished
close to meeting the goal with an almost completely re- written,
clean implementation fixing many rough edges. We now have a
more comprehensive set of typemaps for Objective-C and C++ type
conversions. Almost 90% of the test-suite works and a number of
new runtime tests have been added. Makefiles have been
reorganized, and the structure of the generated code redesigned
to equally support Apple's cocoa framework on MacOS X and
GNUStep on Linux/Windows. Swati is very keen to add more
features in the coming months, especially, the director support,
support for clang, and updated module documentation. Swati's
work can be accessed in the branch gsoc2012-objc.

We would like to thank Google for sponsoring the Summer of Code.
A special thanks to all the mentors for their hard work and
William Fulton, the co-administrator, for his guidance and
support.

By: Ashish Sharma, GSoC 2012 administrator for SWIG

2012/08/20 - SWIG-2.0.8 released

SWIG-2.0.8 summary:
- Fix a couple of regressions introduced in 2.0.5 and 2.0.7.
- Improved using declarations and using directives support.
- Minor fixes/enhancements for C#, Java, Octave, Perl and Python.

2012/05/26 - SWIG-2.0.7 released

SWIG-2.0.7 summary:
- Important regression fixes since 2.0.5 for typemaps in general and
in Python.
- Fixes and enhancements for Go, Java, Octave and PHP.

2012/04/30 - SWIG-2.0.6 released

This release fixes a bug in SWIG-2.0.5, please use SWIG-2.0.6 instead.

SWIG-2.0.6 summary:
- Regression fix for Python STL wrappers on some systems.

2012/04/24 - Summer of Code 2012 projects

Google has announced the list of accepted students for the Google Summer of Code program. SWIG was given 5 slots this year the SWIG developer community has chosen the following projects which will be worked on over the next 4 months:

"SWIG's Scilab 6.0 Backend" - Wolfgang Frisch
"Enhance Objective C support" - Swati Sharma
"Get the C backend in shape and into trunk" - Leif Middelschulte
"New module for Javascript" - Neha Narang
"Source Code Documentation Comments" - Dmitry Kabak

Congratulations to Wolfgang, Swati, Leif, Neha and Dmitry.

An abstract for every project is available here: google-melange.appspot.com/org/home/google/gsoc2012/swig

Anyone interested in these projects, is welcome to drop by on our IRC channel - #swig-gsoc on irc.freenode.net
or follow the development of them on the swig-devel mailing list - www.swig.org/mail.html .

2012/04/19 - SWIG-2.0.5 released

SWIG-2.0.5 summary:
- Official Android support added including documentation and examples.
- Improvements involving templates:
1) Various fixes with templates and typedef types.
2) Some template lookup problems fixed.
3) Templated type fixes to use correct typemaps.
- Autodoc documentation generation improvements.
- Python STL container wrappers improvements including addition of
stepped slicing.
- Approximately 70 fixes and minor enhancements for the following
target languages: AllegroCL, C#, D, Go, Java, Lua, Ocaml, Octave,
Perl, PHP, Python, R, Ruby, Tcl, Xml.

2012/03/24 - SWIG in Google Summer of Code 2012

SWIG has been accepted on the Google Summer of Code program for the third time. This is an opportunity for budding open source programmers to get paid for coding. If you are a student and interested please take a look at codewrapper.com/wiki/index.php?title=SWIG_GSoC_2012_ideas_page and www.google-melange.com/gsoc/homepage/google/gsoc2012 for further details. Applications must be in by 6 April 2012.

2011/05/21 - SWIG-2.0.4 released

SWIG-2.0.4 release summary:
- This is mainly a Python oriented release including support for Python
built-in types for superior performance with the new -builtin option.
The -builtin option is especially suitable for performance-critical
libraries and applications that call wrapped methods repeatedly.
See the python-specific chapter of the SWIG manual for more info.
- Python 3.2 support has also been added and various Python bugs have
been fixed.
- Octave 3.4 support has also been added.
- There are also the usual minor generic improvements, as well as bug
fixes and enhancements for D, Guile, Lua, Octave, Perl and Tcl.

More news


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

Last modified : Sat Mar 2 14:43:51 2013

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.