LibX Code Structure and Bootstrap Process


The client-side code basis of LibX 2.0 consists of two parts, the “core” and a “bootstrapped” part.

The “core” code is packaged when a revision is built. It is installed when the plugin is installed.

The “bootstrapped” part is retrieved and evaluated when the browser starts up. It contains two parts: “global” and “per window”.  ”globally” bootstrapped code is evaluated once for each running browser process. “per window” code, on the other hand, is evaluated once for each window.  A window here is a Firefox or IE window, possibly containing multiple tabs.

In terms of Firefox extensions, global code is evaluated by code defined as a XPCom component, whereas per-window code is evaluated in chrome space. The ‘window’ object only has meaning within the per-window code, it is undefined for global code.

LibX retrieves the URL from which to load bootstrapped code from the edition configuration.

Source Code Locations

LibX is hosted in a CVS repository on Find CVS instructions for anonymous access here.

The CVS repository contains the trunk, which contains the LibX 1.5 code, and a branch called ‘libxrestructuring’.  All LibX 2.0 code resides in the libxrestructuring branch.

The LibX core is in the src/base directory.

Bootstrapped LibX 2.0 code is in the src/libx2 directory.

The directory src/feeds contains LibX 1.5 code that is not used in LibX 2.0

In LibX 2.0, all LibX 1.5 cues will be moved into a LibX core package. This package  is hosted on There is no anonymous CVS access as of yet. Keep in mind, however, that LibX 2.0 packages are served via AtomPub.

The source code for the edition builder and for LibX IE are also hosted on and are available only on request.

Building LibX

Unfortunately, building LibX is not as simple as it once was. This is for two reasons: LibX IE requires the execution of the Nullsoft installer. LibX FF requires the execution of Spock, which is a tool to generate signed update.rdf manifests. The installation of either software package is slightly involved.

The LibX core is built via the command ./ in the src/editions directory. The argument to ./ is a directory that contains a configuration.  A configuration consists of multiple files – notably, the config.xml file that is created and managed by the Edition Builder, and any other files to be included as resources, such as icons or logos. When you manage a revision in the edition builder, you are changing or adding files into such a directory.

We recommend that LibX 2.0 developers use the edition builder to build their version of LibX. Using the edition builder’s “Cue Management”, it is possible to specify the location of the bootstrapped code as well as the location of the LibX packages an edition executes.

As of Feb 19, building a revision in the edition builder will also build a snapshot of LibX 2.0 for Firefox, which is linked from near the bottom of the test edition page. (See this example).