WebVM

Greetings from a cloudy Guildford,

We are happy to announce a new WebVM SDK 0.15.4691 release. The API version is stable and remains at 0.11.

This release contains several internal bugfixes and new support for sub-feature requests and policy decision persistence.

WebVM Module Descriptor files

The biggest change is the introduction of WebVM Module Descriptor files which are mandatory from now on.

Such a file looks as follows for the simple test API which is part of this SDK:

WebVM-Module: simple
WebVM-Module-Type: Native
WebVM-API: http://webvm.net/api/simple

Keys

The keys supported by such a file are

WebVM-Module

Name of the underlying DLL or shared object without the extension.

WebVM-Module-Type

Type of this module, keep it Native for now.

WebVM-API

The feature name of this API. Example:

WebVM-API: http://bondi.omtp.org/api/filesystem

WebVM-API-Feature-N

The subfeature names provided by this API where N starts from 1, 2, 3, … Example:

WebVM-API-Feature-1: http://bondi.omtp.org/api/filesystem.read
WebVM-API-Feature-2: http://bondi.omtp.org/api/filesystem.write

Mapping

It is important that a native module implementation announces the same WebVM-API sub-features it implements during the WVMAttach() call as it has been done already. Example:

const WVMFeature features[] = {
    { "http://bondi.omtp.org/api/filesystem.read",  "io.file.read"  },
    { "http://bondi.omtp.org/api/filesystem.write", "io.file.write"  },
    { 0, 0 }
}

...

WVMStatus WVMAttach(WVM      /* [in]  */  *instance,
                WVMCallbackFuncs /* [in]  */  *wvcFuncs,
                WVMModuleFuncs   /* [out] */ **wvmFuncs,
                const WVMFeature /* [out] */ **pfeatures)
{
    ...
    *pfeatures = features;
}

Loading a feature from JavaScript

The newly introduced mechnism has effect on how a native module (feature) is loaded, for example:

webvm.load('http://webvm.net/api/simple', { successCallback: successFunc, errorCallback: failureFunc });

webvm.load('http://bondi.webvm.net/api/filesystem.read', { successCallback: successFunc, errorCallback: failureFunc });

The main difference is that from now on the feature or sub-feature name as stated in the WebVM Module Descriptor file is used for loading a specific API.

Note it is very important, that the (sub-)feature names are used correctly in the JavaScript, WebVM Module Descriptor file and the underlying implementation.

Deploying a module

In order to deploy a new or upgraded module, you need

  1. copy/install your module library into the module directory, and

  2. copy/install the WebVM Module Descriptor file into the correct sub-directory of the WebVM modules directory as defined in webvm.conf. By default these are:

Windows

%PROGRAM_FILES%\Aplix Corporation\WebVM\desc\your-module.wmd

Windows Mobile

\Application Data\Aplix Corporation\WebVM\desc\your-module.wmd

Linux

/usr/lib/webvm/desc/your-module.wmd

You can re-use your WebVM SDK download URL from your mail Inbox or re-register at sdk.webvm.net. You can also check here to ensure you are running the very latest WebVM.