Skip to main content

VCON Overview

VCON (Morph Container) is a portable bytecode container format for running Morph programs in a sandboxed virtual machine.


What Is VCON?

VCON is an optional execution and distribution path next to the usual LLVM native pipeline:

Source (.mx) → … → NIR → bytecode / container tooling → .vcon container → VM / nucleus host

Ordinary project workflows morph build and morph run compile to a native executable and do not imply the VCON VM. Use the nested morph vcon … commands when you explicitly want a container build, sandboxed run, inspect, or watch/hot-reload. See Build pipeline.


Why VCON?

FeatureNative (LLVM)VCON
PerformanceMaximumGood (bytecode VM)
PortabilityPlatform-specific binaryContainer + portable bytecode story
SecurityFull OS processSandbox policies in [vcon] / permissions
Hot reloadRebuild / restartmorph vcon watch workflow
Typical artifact.exe / host suffix.vcon

Relationship to morph run

  • morph run (default target): builds and runs the native dev/release binary for the current morph.toml project (ProjectCommands.cpp compile + execute).
  • morph vcon run (or your toolchain’s equivalent): builds or selects a .vcon and runs it under the VM / nucleus path.

Do not assume morph run selects VCON; the two stacks are separate entrypoints in the CLI.


Container structure (conceptual)

A .vcon file is a binary container with (typically) header, module table, bytecode, constant pool, and debugging metadata. Exact layout is defined by the VCON implementation, not by Learn Morph prose.


Next steps