Factor/Deployment

Overview

Factor contains a stand-alone application deployment tool that compiles a vocabulary down to a native executable which runs the vocabulary's MAIN: hook. Deployed executables do not depend on Factor being installed, and do not expose any source code, and thus are suitable for delivering commercial end-user applications.

Deploy tool documentation

Examples

Some of the demos in extra/ are ready to be deployed:

  • "tetris" deploy
  • "hello-unicode" deploy
  • "terrain" deploy - requires OpenGL 2.x

To look at the deploy settings used, run deploy-tool instead of deploy. This opens a new UI window.

Look at Examples for more.

How it works

The deployment tool works by bootstrapping a fresh image, loading the vocabulary into this image, then applying various heuristics to strip the image down to minimal size.

Sometimes when you run the deploy tool, "staging images" get generated. These are minimal Factor images which do not contain your application, just parts of the library. Different staging images are generated for different deployment configurations. All applications you deploy will share the same set of staging images. This process can take a few minutes.

Once you've deployed your app once, you won't have to wait again, unless you delete them manually, or run the factor.sh script to update Factor from the GIT repository. If you update Factor from the repository yourself, be sure to delete staging images since they may now be out of date.

Deploying apps that use FFI

Deployed applications require externally linked libraries to be present in the host OS, application folder, or .app bundle on Mac OS X. Factor includes the runtime library libfactor by default.

Additional topics

This revision created on Fri, 6 May 2011 01:32:13 by akkartik (Rollback)