taskSavannah Administration - Tasks: task #5638, Submission of C/Invoke

 
 

task #5638: Submission of C/Invoke

Submitter:  Will Weisser <kyuzo>
Submitted:  Sat 10 Jun 2006 02:54:45 AM UTC
   
 
Should Start On:  Sat 10 Jun 2006 12:00:00 AM UTC Should be Finished on:  Tue 20 Jun 2006 12:00:00 AM UTC
Category:  Project Approval Priority:  * 5 - Normal
Status:  Done Privacy:  Public
Assigned to:  tizzef Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Jun 2006 09:09:09 AM UTC, comment #1: 

Hi,

"Linux" is just a kernel of a more complex system that we like to refer to as GNU/Linux, to emphasize the ideals of the Free Software movement.

Would you mind changing references to Linux as an OS to GNU/Linux?

For more information, see http://www.gnu.org/gnu/linux-and-gnu.html.

I have approved your project.  You will receive an automated e-mail containing detailed information about the approval.

Regards.

Patrick Camus <tizzef>
Sat 10 Jun 2006 02:54:45 AM UTC, original submission:  

A new project has been registered at Savannah
The project account will remain inactive until a site admin approve or discard the registration.


######### REGISTRATION ADMINISTRATION #########

While this item will be useful to track the registration process, approving or discarding the registration must be done using the specific "Group Administration" page, accessible only to site administrators, effectively logged as site administrators (superuser):

  <https://savannah.nongnu.org/siteadmin/groupedit.php?group_id=8613>


######### REGISTRATION DETAILS #########

Full Name:
----------
  C/Invoke

System Group Name:
-----------------
  cinvoke

Type:
-----
  non-GNU software & documentation

License:
--------
  Modified BSD License

Description:
------------
  The purpose of this project is to provide a library which can be used by developers of dynamic programming languages to call C functions at runtime.  This is a distinct method of making calls from the typical compile-time static declarations which are typically used.  To the author's knowledge, no such library providing these facilities currently exists.

Currently in order to bridge a dynamic language (Perl, PHP, Ruby, Python, etc. etc. etc.) to C, one must author a module in C which imports and links to the desired low-level libraries at compile time, and then write cumbersome code to hand-marshal the parameters and return values back and forth between the the dynamic language and the C library.  This module, being a compiled C library itself, has several disadvantages when paired with a dynamic programming environment (hard to write, unportable, etc.).  Frameworks such as SWIGS remove some of the tedious repetition of hand-writing marshalling code and learning large and involved glue libraries, but they do not change the essential nature of writing language bindings: one is compiling and using a static module in a dynamic language.

The Microsoft .NET framework (and its free equivalents) provide a facility called P/Invoke which was the inspiration for this project.  To call a native C library in this system, one informs the language compiler of the C function one wishes to call using declarative programming constructs.  The language then uses built-in support to create a bridge to the desired C function and creates a stub in the dynamic language which transparently calls the C function when desired.  This project (C/Invoke) provides a facility for dynamic languages to provide similar features.  With it, a language implementor can input a description of a C function at runtime, and make calls to said function and receive results.  The C/Invoke library handles details such as pushing arguments on the stack and retrieving return values from registers.  Because such code is inherantly platform-specific, the authors will maintain ports of the code to as many different architectures and operating systems as possible.  With this functionality in place, programmers wishing to call C functions from Python can do so by writing Python, Perl programmers by writing Perl, etc.  This will help all languages interoperate with each other better and will relieve many portability headaches since these will be centrally located in C/Invoke. Bindings to languages can also be implemented as regular extension modules if neccessary.

C/Invoke is itself implemented in C.  The latest source is always available via anonymous svn at svn://pleep.com/trunk/cinvoke.  A snapshot of the code as of this writing is available at http://pleep.com/~will/cinvoke-20060609.tgz.  At present, the code is mostly complete, being able to call functions, marshal structures, deal with callback function pointers etc.  More work needs to be done before the initial release however, including ports to more platforms (at present only Linux x86 and Windows x86 have been written), language bindings, documentation, etc.

Other Software Required:
------------------------
  This project does not currently have any external dependancies.  When language bindings are released in the future, then users will need to have these languages installed in order to take advantage of them; however, there are no plans to develop bindings for non-free languages, and technically these languages would then depend on C/Invoke, not the other way around.


Will Weisser <kyuzo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-06-14 tizzef Open/ClosedOpen Closed
2006-06-14 tizzef StatusIn Progress Done
    Percent Complete10% 100%
2006-06-14 tizzef StatusNone In Progress
    Assigned toNone tizzef
    Percent Complete0% 10%

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code