Author: Brent Welch <email@example.com> Author: Donal K. Fellows <firstname.lastname@example.org> Author: Larry W. Virden <email@example.com> Author: Larry W. Virden <firstname.lastname@example.org> State: Draft Type: Informative Vote: Pending Created: 26-Oct-2000 Post-History: Discussions-To: news:comp.lang.tcl
This document outlines how Tcl should be distributed, with particular reference to issues related to building a distribution with the batteries included so that most people can have access to the useful extensions without having to chasing halfway across the 'net for them.
Tcl has traditionally been a "core" that is extensible with binary extensions and Tcl scripts. There have been two styles of Tcl distributions: source and binary. The Tcl source distribution contains the Tcl "core" and a small number of support scripts. The binary distributions have included Tk, and in some cases (e.g., TclPro) other extensions like [incr Tcl], TclX, and Expect. Users with access to a compiler can get source distributions of the various extensions and compile them for their own installation. (Thanks to Bob Technetin email@example.com for the inspiration for these pictures - DKF.)
This proposal formalizes the notion of a small Tcl source core and larger distribution bundle that includes one or many extensions. The distribution can be in source or binary form. The goal is to keep a small core that is suitable for embedding with the smallest footprint, while acknowleding that desktop users and application developers want a larger standard distribution that has a set of well known and widely used extensions.
The goal of this proposal is to establish a standard for future Tcl distributions. There will be two kinds of Tcl distributions: a small core suitable for specialized embedded applications, and a larger bundled distribution suitable for more general application development.
The Tcl Core Distribution
The Tcl "core" should remain as small as possible, and could become smaller in the future as certain features are moved into extensions. The "core" distribution must include:
The C sources required to create the Tcl binary library.
The C sources required to create a "Tcl Shell" application. This is commonly known as "tclsh".
The Tcl script libraries that implement the code library and packaging systems. This includes the "unknown" command and various commands related to auto loading of packages.
The Tcl test framework used for testing the Tcl binary library and the support scripts.
Additional items may appear in the "core" distribution, especially for historical reasons. But, some Tcl scripts and binary extensions that currently exist (as of Tcl 8.3) in the Tcl source distributions may migrate into the larger distribution described below.
The Bundled Distribution
The bundled Tcl distribution will contain Tcl, various binary extensions, and various Tcl script packages. This proposal establishes an initial set of binary extensions, but following the model and using the distribution infrastructure we create, various bundles should be easily created.
Each package included in the bundled distribution must have a test suite and documentation. At this stage the documentation will probably be in a variety of formats, but ultimately we should standardize on an XML-based representation and supply tools that generate other formats from that representation.
The bundled distribution must include (but is not limited to):
The "core" distribution described above.
The Tk toolkit for GUI applications. This includes the well known "wish" shell application.
The registry and dde extensions for the Windows platform.
The [incr Tcl] extension.
The TclX extension. There are some historical features of TclX that should not necessarily be included, including the tclx shell and its alternate library format. However, the TclX help system should not only be included, but updated to include info on all commands included in the distribution.
The Expect extension for UNIX platforms.
The TkCon enhanced console application.
In addition, it is likely that several of the following packages will be included in the bundled distribution, as well as others not listed.
The Standard Tcl Library of Tcl scripts. Currently this includes packages for:
command line processing
FTP client library
Math and statistics utilities
MIME encoder and parser
CGI processing (ncgi)
Profiler for Tcl scripts
Event counters and interval timers
Structures, including tree, stack, graph, queue
Text string manipulation utilities (trim, tab, etc.)
[incr Tk] and [incr Widgets].
The Standard Tk Library of Tcl/Tk scripts. Currently this includes packages for:
The small "core" distribution must retain its identity for those applications that embed the Tcl interpreter into constrained environments and require a small footprint. The footprint must remain small, and in fact it should grow smaller, if possible. For example, in the early days of Tcl it was possible at compile time to remove all the file system and exec commands to create a very small Tcl core. There are wide variety of vendors that embed Tcl into, e.g., CAD applications, router firmware, and other limited environments. They only need the basic commands for procedural programming and basic data types.
The larger, bundled distribution must become the standard for desktop distributions (e.g., Linux) so that application writers have a richer set of Tcl commands that they can assume are available. This includes the [incr Tcl] class system and the OS-specific commands provided the TclX and the registry and dde extensions.
The set of packages in the bundled distribution are divided into mandatory and optional packages. The intent of this distinction is to set a goal for the initial bundled distribution, but not close the door to inclusion of other packages. Over time the set of packages in the bundled distribution will surely grow, and some packages may become superceeded by other better packages. The mandatory set of packages, however, should be common among all bundles to application writers know what to expect.
In particular, the mandatory set includes [incr Tcl] to promote object oriented programming, Tk to promote easy GUI development, TclX, Dde and Registry to provide access to OS-dependent functionality, and Expect to support automated test environments.
At this time there are a variety of Tk widgets that are optional because there is some overlap and we anticipate continuted evolution of the Tk widget set. I expect that the first bundle will include all the major widget sets, including BLT, [incr Tk] and [incr Widgets], TkTable, the "vu" collection, and possibly Tix.
The Role of the TCT
The larger bundled distribution will contain packages that are "owned" by the TCT and some that are not. The whole process will be more scalable if responsibility for packages can be split out to other individuals and groups. The role of the TCT should be to set up the infrastructure for the bundled distribution and to make official bundled distributions.
The main purpose of this proposal is to establish three things:
The continued existence of a small Tcl "core" that is identifiable unto its own and useful to various specialized embedded applications.
The creation of infrastructure to create bundled distributions. The exact nature of this bundling is not specified. The first bundles may well be created by hand crafted Makefiles and distribution-creation scripts.
The set of mandatory extensions that should be included in any Tcl bundle. The list in the first draft of this TIP is likely to be wrong, and will surely be amended in the future.
Whether further distinctions should be introduced to better support people who wish to target Tcl towards small devices or embedded environments better.
There are a number of related topics that are deliberately outside the scope of this TIP:
Network aware downloading of packages and more sophisticated package management.
Details of the compile and build environment. Currently there is the TEA standard, and the packages listed in the Mandatory set have all been set up for TEA as part of TclPro.
This document has been placed in the public domain.