README.rdoc in ffi-swig-generator-0.2.1 vs README.rdoc in ffi-swig-generator-0.3.0
- old
+ new
@@ -1,20 +1,19 @@
ffi-swig-generator
by Andrea Fazzi
- http://github.com/remogatto/ffi-swig-generator/tree/master
+ http://kenai.com/projects/ruby-ffi/sources/swig-generator/show
== DESCRIPTION:
-ffi-swig-generator is a ruby-ffi wrapper code generator based on SWIG
-interface files.
+ffi-swig-generator is a ruby-ffi wrapper code generator that produce
+ruby-ffi glue code parsing C header files through SWIG.
-ffi-swig-generator is able to traverse a XML parse tree file generated
-by the +swig+ command and to produce a ruby-ffi interface file from
-it.
+ffi-swig-generator is able to traverse an XML parse tree generated by
+the +swig+ command and to produce a ruby-ffi code from it.
-ffi-swig-generator is shipped with a command line tool (ffi-gen) and a rake
-task that automates the code generation process.
+ffi-swig-generator is shipped with a command line tool and a rake task
+that automates the code generation process.
ffi-swig-generator XML capabilities are provided by nokogiri.
== FEATURES/PROBLEMS:
@@ -33,52 +32,57 @@
ffi-gen mylib.xml mylib.rb
From a Rakefile:
require 'ffi-swig-generator'
- FFI::Generator::Task.new :input_fn => 'my_interface_dir/*.i' output_dir => 'my_output_dir'
+ FFI::Generator::Task.new do |task|
+ task.input_fn = 'my_interface_dir/*.i'
+ task.output_dir = 'my_output_dir'
+ end
== REQUIREMENTS:
* rake >= 0.8.3
* nokogiri >= 1.1.1
* swig >= 1.3
== DOWNLOAD/INSTALL:
-To download and install the gem from github:
+Download and install from rubygems:
- [sudo] gem sources -a http://gems.github.com
- [sudo] gem install remogatto-ffi-swig-generator
+ [sudo] gem install ffi-swig-generator
-To download the develpment trunk:
+or clone mercurial repository:
- git clone git://github.com/remogatto/ffi-swig-generator.git
+ hg clone http://kenai.com/hg/ruby-ffi~swig-generator
== EXAMPLES:
See the examples in examples/ folder.
libc.i is an interface file containing some excerpt of libc functions.
-wiiuse.i is a enough complex example of a C header file interface. It
+wiiuse.i is a fairly complex example of a C header file interface. It
reproduces the content of wiiuse.h, the header file of the wiiuse
library. wiiuse is a C library that handles the connection with
Nintendo Wiimote devices. The interface file is almost a mere
-copy/paste from the original header file.
+copy/paste from the original header file. See [1] for an updated
+revision of ffi-wiiuse library.
-== QUICK START:
+== PROJECTS RELATED TO ffi-swig-generator
- git clone git://github.com/remogatto/ffi-swig-generator.git
- sudo apt-get install swig
- sudo gem install nokogiri rake
- cd ffi-swig-generator/examples && rake ffi:generate
+The generator has been used to generate code for the projects
+below. Take a look at them to see further usage examples.
+1. http://github.com/remogatto/ffi-wiiuse/tree/master
+2. http://github.com/remogatto/ffi-opengl/tree/master
+3. http://github.com/remogatto/ffi-spidermonkey/tree/master
+
== LICENSE:
(The MIT License)
-Copyright (c) 2008 Andrea Fazzi
+Copyright (c) 2009 Andrea Fazzi
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,