Greetings from an overcast Guildford,
We are happy to announce a new WebVM SDK feature release, which includes a new tool to generate native module implementation stubs from a Java interface description. The tool is called JIDL (pronounced “Jiddle”). Future versions will also support reading and writing OpenAjax API Metadata Specifications.
The new tool has been written in Java and can be found in the new tools directory:
webvm-sdk-dir/tools
To generate native module implementation stubs for given Java interfaces, it is assumed that the class files of these interfaces are relative to the current directory. The usage is:
java -jar jidl.jar <output directory> <interface> [<interface> [ .. ]]
A simple test to check how it works is running:
java -jar jidl.jar test/ test.TestInterface test.TestInterface2
in the tools directory.
This will generate C files:
<output directory>/<interface>_decl.h
<output directory>/<interface>_decl.c
<output directory>/<interface>_impl.c
To implement a class specification as a native module, all you need is
- to include these files into your project
- just implement the _impl.c file(s).
We are going to describe the use of this tool in more detail in the tutorial.
You can re-use your WebVM SDK download URL from your mail inbox or re-register at sdk.webvm.net.