[ 
https://issues.apache.org/jira/browse/LUCY-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13540085#comment-13540085
 ] 

Nick Wellnhofer commented on LUCY-248:
--------------------------------------

Here is a status update on my work in the c-bindings-wip1 branch.

I changed CFC to also generate a callbacks.h header file for the callback 
declarations. For the C bindings, we probably won't need the callback 
mechanism. So I added code to produce a dummy callbacks.h file which defines 
the callback symbols to NULL. This is currently governed by a flag in 
CFCBindCore that can be set via CFCBindCore_enable_callbacks. It's also 
possible to remove that flag and make the host language part of CFC trigger the 
generation of callbacks.h.

I added some basic functionality to Charmonizer to generate Makefiles. This 
will be used to build the Clownfish compiler and the Lucy C library.

I implemented a command line version of the Clownfish compiler to autogenerate 
the Clownfish headers and source files. I also added support to create a man 
page for every class.

I started to write the binding-specific code for the C bindings in c/src and 
added the Lucy core tests. All tests pass except for stuff that needs 
RegexTokenizer. To support regexes it's probably best to rely on the 
BSD-licensed PCRE library as an external dependency. The C bindings are a built 
from a manually created Makefile which only supports OS X for now. In order to 
create the Makefile with Charmonizer, it would be nice to have the possibility 
to scan directories recursively for source files. But there isn't a 
cross-platform way to do that. We actually use Charmonizer itself to detect how 
to handle directories on the current platform. So there might be some trouble 
bootstrapping this feature.

Other things that are still to do:

* Decide on features to simplify the use of the C bindings.
* Decide how to install the Lucy C library.
* Write more tests for the C bindings.
* Port CFC tests to C (LUCY-201).

                
> Implement C bindings
> --------------------
>
>                 Key: LUCY-248
>                 URL: https://issues.apache.org/jira/browse/LUCY-248
>             Project: Lucy
>          Issue Type: Task
>            Reporter: Nick Wellnhofer
>            Assignee: Nick Wellnhofer
>
> Unless someone else wants to work on this, I'm willing to work on the C 
> bindings for Lucy.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to