Starkit boot sequence

In understanding Starkit some questions and observations arise as to how starkits work.

What *is* [package starkit]? ... what's the boot sequence?

= Phase 0: before main.tcl is sourced =

  1. mount the executable vfs under the path to the starkit executable.
  2. set up some global variables
  3. lappend the /lib directory to ::auto_path
  4. source main.tcl from the top level directory of the starkit vfs.

Invocation of a starkit causes a file main.tcl to be sourced. What environment exists at this point in the boot sequence?

package starkit is there by the time main.tcl runs - it's provided by the binary. What facilities does it provide?

= Phase 1: main.tcl runs =

Invoking [package require starkit] from within main.tcl causes some processing to occur - what processing? What environmental impact does this processing have? What facilities are available as a result of this processing?

What environment does [package starkit] establish, what facilities does it provides, and what environmental assumptions it makes in providing those facilities.

= Phase 2: the application runs =

What environmental assumptions should an application make?