WebVM

Greetings from a chilly Guildford,

We are happy to announce a new WebVM SDK 0.5.3458 release, which includes a simplified webvm.h.

The SDK also includes experimental support for Windows Vista.

webvm.h simplifications

In order to simplify the type handling of WVMVariant types, we replaced the complex At* enum definition with

typedef enum {
    VariantType_Void,
    VariantType_Bool,
    VariantType_Char,
    VariantType_Byte,
    VariantType_Int32,
    VariantType_Int64,
    VariantType_Double,
    VariantType_String,
    VariantType_Map,
    VariantType_Value,
    VariantType_Function,
    VariantType_ObjectRef,
    VariantType_Error,
    VariantType_ByteArray,
    VariantType_Int32Array,
    VariantType_Int64Array,
    VariantType_DoubleArray,
    VariantType_VariantArray,
    VariantType_Max,
} WVMVariantType;

We also introduced several macros to ease type conversions:

WVMVARIANT_IS_<type>
WVMVARIANT_TO_<type>
WVMARRAY_GET_<type>
WVMARRAT_SET_<type>

All enum type values have been renamed to follow a consistent naming convention.

The WebVM callback function

WVMCallbackFuncs->destroyObjectRef

has been removed, please use

WVMCallbackFunc->derefObject

instead.

We also introduced a new WebVM module function

WVMModuleFuncs->release

which is called by WebVM is an object reference count reaches 0. You should free your reference counted resources when WebVM calls this module function.

Value types

WebVM supports value type objects now, which means you can define a class which only consists of fields and which is passed by value between JavaScript and a native module. We will update the tutorial today accordingly.

See the updated simple example code, which is part of the SDK, for an example.

Function type

WebVM also supports a newly introduced function type argument which can be used to pass an argumentless callback to a native function. The simple example contains example code how this is achieved.

?JIDL

JIDL has been updated in order to support these webvm.h simplifications.

The JIDL (pronounced “Jiddle”) tool creates OpenAjax API Metadata Specifications for given Java interfaces now. To create these descriptions from the example interfaces run:

java -jar jidl.jar test/ test.TestInterface test.TestInterface2

Afterwards you will have two XML files in:

test/test.TestInterface.xml
test/test.TestInterface2.xml

We will extend the tutorial with more details about the new functionality today.

You can re-use your WebVM SDK download URL from your mail Inbox or re-register at sdk.webvm.net.