Dr. Dobb's Journal February 1998
SWIG's primary goal has been to support research and development activities and highly specialized applications. In R&D, it is commonplace to work with a wide variety of codes, tools, and packages. SWIG provides a mechanism for gluing these components together and controlling them from a common scripting-language interface. It also allows for rapid prototyping, debugging, and software testing.
One of the most active areas of use is in the development of scientific and engineering applications. At Los Alamos National Laboratory, SWIG is being used to construct extensible simulation systems capable of performing simulation, data analysis, and visualization. Elsewhere SWIG has been used for interfacing with laboratory equipment, data-acquisition devices, data-visualization systems, scientific libraries, and (to my amazement) legacy Fortran code. Most of these users are not computer scientists in the traditional sense. Rather, they are users solving specific problems such as the simulation of engineering materials, biomedical modeling, environmental data analysis (air quality, meteorological, weather radar, and the like), speech recognition, virtual reality, polarization microscopy, partial differential equation solvers, remote sensing, plant control system modeling, battlespace visualization, and so on.
A second area of SWIG's use is in software development and testing. Because SWIG requires no modification to the underlying C/C++ code, the scripting language is separated from C libraries and modules. This lets modules and libraries be tested interactively or with scripts even if the final deliverable has no scripting component. A number of commercial vendors are using SWIG for in-house testing of client-server systems, network protocols, and CAD packages. In many cases, SWIG is able to access internal implementation features that would normally be inaccessible to stand-alone testing packages.
Finally, SWIG is being used in a number of third-party tools and commercial packages. In some cases, SWIG has been used to provide customers with a scripting version of the API to large programming libraries. For instance, it has been used in conjunction with standards such as Microsoft COM and CORBA. It has even been used to provide scripted access to Java. One of the more unusual applications is PilotManager (http://playground.sun.com/~bharat/pilotmgr.html), a tool developed by Bharat Mediratta for interfacing the US Robotics PalmPilot with the Sun Solaris Calendar Manager. PilotManager is written in Perl, but SWIG was used to expose the C APIs of several large libraries used in its implementation -- a process that only required a few days of implementation and testing.
-- D.B.