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 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), Java, Lua, Modula-3, OCAML, Octave and R.
Also several interpreted and compiled Scheme implementations (Guile, MzScheme, 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 can also export its parse tree in the form of XML and
Lisp s-expressions. SWIG may be freely used, distributed, and modified for commercial
and non-commercial use.
Recent News
- 2009/04/21 - Summer of code 2009 accepted projects
- The students accepted into the Google Summer of Code have now been
announced. SWIG has been allocated five student slots by Google and we have chosen the following five projects/students which will be developed over the next four months: "Add support for Scilab language" - Baozeng Ding "C++0x support for Swig" - Matevz Jekovec "Implement Perl binding for Xapian using SWIG" - Kosei MORIYAMA "Objective C Wrapper Generator over C++ using SWIG" - Ashish Sharma "Director support for PHP" - Miklos Vajna An abstract for each project is available at http://socghop.appspot.com/org/home/google/gsoc2009/swig Congratulations to Baozeng, Matevz, Kosei, Ashish and Miklos, we set some fairly high standards for acceptance this year and you have all done well to meet these standards. We hope that your quality proposals will result in useful enhancements by the end of the summer. For anyone interested in any of these projects, you are welcome to follow the development of them on the swig-devel mailing list - http://www.swig.org/mail.html. Also feel free to drop by our IRC channel to discuss or just say hello - #swig-gsoc on irc.freenode.net. William and Olly SWIG Summer of Code administrators 2009 (0 comments) - 2009/03/21 - SWIG-1.3.39 released
- SWIG-1.3.39 has been release. A summary of changes is shown below.
- Some new small feature enhancements. - Improved C# std::vector wrappers. - Bug fixes: mainly Python, but also Perl, MzScheme, CFFI, Allegrocl and Ruby (0 comments) - 2009/03/19 - SWIG participating in Summer of Code 2009
- We are excited to announce that SWIG has been accepted onto the Google Summer of Code program for the second year running. This is a chance for SWIG to be enhanced in any way that you would like it to.
The Summer of Code program is designed to get new people involved in free/open-source software and get paid for it. Either become a student and code up the changes or if you have an interest in a particular feature being implemented, become a mentor and get paid for looking after a student. The ideas page at http://code.google.com/p/swig-gsoc/wiki/ProjectIdeas contains some suggestions for SWIG, but any reasonable suggestions will be considered. Please chat to us on IRC at #swig-gsoc on irc.freenode.net or email us on the mailing lists. See http://socghop.appspot.com/ for further general information. (0 comments) - 2009/02/01 - SWIG-1.3.38 released
- SWIG-1.3.38 has been released. It contains an output directory regression fix and other minor bug fixes. (2 comments)
- 2009/01/15 - SWIG: 1.3.37 released
- SWIG is a software development tool that reads C/C++ header files and generates wrapper code to make C/C++ code accessible from other languages including Perl, Python, Tcl, Ruby, PHP, Java, Ocaml, Lua, C#, Modula-3, R, Octave and Scheme & Lisp variants.
Apart from the usual round of bug fixes and minor new features there are a couple of big new features in this release. The main changes are:
- Python 3 support added - SWIG now ships with a version of ccache that can be used with SWIG. This enables the files generated by SWIG to be cached so that repeated use of SWIG on unchanged input files speeds up builds quite considerably. - PHP 4 support removed and PHP support improved in general - Improved C# array support - Numerous Allegro CL improvements (2 comments) - 2008/10/08 - SWIG's First Summer of Code
- SWIG is a programmers tool for semi-automating the calls to C or C++ code from almost any other programming language. The idea is to feed C/C++ header files into SWIG and SWIG then generates the 'glue' code so that your C/C++ library can be used from another language such as Python, Java, C#, Ruby, Perl etc. In fact there are implementations for supporting over 20 different of these target languages. The summer of code students have had a productive summer and have extended the number of languages and features supported in SWIG's first Google Summer of Code.
Haoyu Bai has added support for the upcoming Python 3 release. Python is the most popular target language amongst SWIG users and no doubt this addition will be much appreciated by those who are thinking of upgrading to Python 3. Also Haoyu has provided new Python 3 features which make coding faster and simpler when using Python extension code. The main features added are function annotations, buffer interfaces and abstract base classes and are outlined in more detail here: http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2008-bhy/Doc/Manual/Python.html#Python_python3support
Jan Jezabek has added a new 'language' module providing Windows Component Object Model (COM) support. This new module makes it possible for any COM enabled language to easily call into C or C++ libraries. The COM module in SWIG is more powerful than most as it ultimately provides support for more than one language as there are numerous languages that can call into COM libraries. Compiled languages such as Visual Basic and scripting languages, such as JScript, VBA and VBScript that can run on the Windows Scripting Host are probably the most popular to benefit. A great use will be the ease of making C/C++ libraries available in applications supporting the various Basic dialects, such as OpenOffice.org and Microsoft Office. SWIG makes it easy to utilise more advanced C++ code, such as templates, and the COM module is no different here as Jan has added in very comprehensive coverage of the C and C++ languages, full details here: http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2008-jezabek/Doc/Manual/COM.html
Maciej Drwal has added a module for calling C++ code from C code. It is now possible to automatically create a flattened API of C++ classes so that the C++ functionality is available in the form of easy to use C structs and global functions. For example, features such as C++ template classes / functions are easily callable from C. One cool part of this project is the graceful handling of C++ exceptions in the calling C code. Some introductory documentation is available here: http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2008-maciekd/Doc/Manual/C.html
Cheryl Foil has added an interesting feature to improve code documentation in the target language. This works when C/C++ code is documented using the industry standard Doxygen tool for annotating methods, classes, variables etc. The new feature extracts the Doxygen comments from the code for use by one of the many target languages. Cheryl has added initial support for Java so that the Doxygen comments are turned into JavaDoc comments embedded into the generated Java wrappers, see http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2008-cherylfoil/Doc/Manual/Doxygen.html
Lastly, many thanks to the mentors involved in making this happen, Ian Appru, Olly Betts, Richard Boulton and William Fulton and finally to Google for funding a great programme. (0 comments) - 2008/06/24 - SWIG-1.3.36 released
- SWIG-1.3.36 has been released. The major changes are listed below.
- Enhancement to directors to wrap all protected members - Optimisation feature for objects returned by value - A few bugs fixes in the PHP, Java, Ruby, R, C#, Python, Lua and Perl modules - Other minor generic bug fixes (0 comments) - 2008/04/21 - Summer of Code students
- The students accepted into the Google Summer of Code have now been announced. SWIG has managed to get four slots and we have chosen the following four projects/students:
* "SWIG's Python 3.0 Backend" - Haoyu Bai tutored by Richard Boulton * "C target language backend" - Maciej Drwal tutored by William Fulton * "Comment 'Translator' for SWIG" - Cheryl Marie Foil tutored by Olly Betts * "Support for generating COM wrappers" - Jan Jezabek tutored by Ian Appru
The competition was tough and although it was difficult choosing the projects, these four were our strongest, so congratulations and welcome to Haoyu, Jan, Cheryl and Maciej. Further details on the Google SWIG page - http://code.google.com/soc/2008/swig/about.html . (0 comments) - 2008/04/07 - SWIG-1.3.35 released
- SWIG-1.3.35 has been released. This release adds Octave to the list of languages modules that SWIG can generate wrappers for. This release also contains a few bug fixes and regression fixes from the previous release. (0 comments)
- 2008/03/18 - SWIG accepted onto Google Summer of Code
- SWIG is one of 175 open source organizations that have been accepted onto the Google Summer of Code (GSoC) 2008. GSoC is a program to pay students and in the process benefit open source - http://code.google.com/opensource/gsoc/2008/faqs.html . Students interested in submitting an application to work on SWIG are invited to look at the ideas page (http://www.dabeaz.com/cgi-bin/wiki.pl?DeveloperInfo/GoogleSummerOfCode) and then discuss them on the mailing lists before submitting a project proposal. (0 comments)
More news
Feedback and questions concerning this site should be posted to the swig-devel mailing list.
Last modified : Sun Oct 5 21:19:43 2008
|