• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

doc/H03-May-2022-9,7577,196

embedded/H19-Feb-2020-21,85118,709

examples/H19-Feb-2020-74,05152,992

lib/H19-Feb-2020-85,36060,691

test/H19-Feb-2020-9,1107,085

README.mdH A D19-Feb-20203.5 KiB11269

build.tclH A D03-May-202219.4 KiB692545

genStubs.tclH A D19-Feb-20201.3 KiB5427

license.termsH A D19-Feb-20202.1 KiB4135

main.tclH A D19-Feb-2020424 149

sdemo.tclH A D19-Feb-2020784 2818

README.md

1# Compiled Runtime In Tcl
2
3 *  Welcome to the C Runtime In Tcl, CriTcl for short, a system to
4    build C extension packages for Tcl on the fly, from C code
5    embedded within Tcl scripts, for all who wish to make their code
6    go faster.
7
8# Website
9
10 *  The main website of this project is http://andreas-kupries.github.com/critcl
11
12    It provides access to pre-made binaries and archives for various
13    platforms, and the full documentation, especially the guides to
14    building and using Critcl.
15
16    Because of the latter this document contains only the most basic
17    instructions on getting, building, and using Critcl.
18
19# Versions
20
21 *  Version 3 is the actively developed version of Critcl, with several
22    new features, listed in section **New Features**, below. This version
23    has changes to the public API which make it incompatible with packages
24    using Critcl version 2.x, or earlier.
25
26 *  The last of version 2 is 2.1, available at the same-named tag in the
27    repository. This version is not developed anymore.
28
29# Getting, Building, and Using Critcl
30
31 *  Retrieve the sources:
32
33    ```% git clone http://github.com/andreas-kupries/critcl```
34
35    Your working directory now contains a directory ```critcl```.
36
37 *  Build and install it:
38
39    Install requisites: cmdline, md5; possibly one of tcllibc, Trf, md5c to accelerate md5.
40
41    ```% cd critcl```
42
43    ```% tclsh ./build.tcl install```
44
45    The generated packages are placed into the **[info library]** directory
46    of the **tclsh** used to run build.tcl. The **critcl** application script
47    is put into the directory of the **tclsh** itself (and modified to
48    use this executable). This may require administrative (root) permissions,
49    depending on the system setup.
50
51 *  It is expected that a working C compiler is available. Installation and
52    setup of such a compiler is platform and vendor specific, and instructions
53    for doing so are very much outside of scope for this document. Please find
54    and read the documentation, how-tos, etc. for your platform or vendor.
55
56 *  With critcl installed try out one of the examples:
57
58    ```% cd examples/stack```
59
60    ```% critcl -keep -cache B -pkg cstack.tcl```
61
62    ```% critcl -keep -cache B -pkg stackc.tcl```
63
64    ```% tclsh```
65
66    ```> lappend auto_path [pwd]/lib```
67
68    ```> package require stackc```
69
70    ```> stackc create S```
71
72    ```> S push FOO```
73
74    ```> S size```
75
76    ```> S destroy```
77
78    ```> exit```
79
80    ```%```
81
82# New Features
83
84 *  Declaration, export and import of C-APIs through stubs tables.
85
86 *  Generation of source packages from critcl-based code containing a
87    TEA-based buildsystem wrapped around the raw critcl.
88
89 *  Declaration, initializaton and use of user-specified configuration
90    options. An important use is the declaration and use of custom
91    build configurations, like 'link a 3rd party library dynamically,
92    statically, build it from copy of its sources, etc.', etc.
93
94 * This is of course not everything. For the details please read the
95   Changes sections of the documentation.
96
97# Documentation
98
99 *  Too much to cover here. Please go to http://andreas-kupries.github.com/critcl
100    for online reading, or the directories **embedded/www** and
101    **embedded/man** for local copies of the documentation in HTML
102    and nroff formats, respectively.
103
104# History
105
106 *  **2013-01-21** : Move code to from jcw to andreas-kupries.
107
108 *  **2011-08-18** : Move code to public repository on GitHub
109
110    The Subversion repository at *svn://svn.equi4.com/critcl* is now obsolete.
111    GitHub has the new official repository for Critcl.
112