tcl

Tcl Starkits and portability more than cross-platform?


Please excuse my ignorance and the naivete of my question but I'm a bit confused about the concepts of cross platform and portability; and I think I'm most interested in portability.

My application, when simplified to its minimum functionality, really just provides different views of data from a SQLite database and captures user input in a separate database(s) and maps it to the associated resources, such that at the end of a user session all that is different is the content of the database(s) storing the users' data.

If I were to build Tcl starkits for each desired platform and place them, along with the SQLite databases (not within any starkit), on an external storage device, could a user simply plug that device into any machine running one of the desired platforms and run the starkit executable for that platform and then just view and manipulate those same databases?

My application is related to study, so I'm thinking about a (somewhat fabricated) scenario of one working at night at home on a Linux desktop, taking their drive to work and trying to get in some study during lunch on a Windows machine, maybe using a Mac. at a school library, and (excluding Tk) even viewing it on an iOS iPad at some point.

I'm using only Tcl, SQLite, and assuming the machine has a browser for the UI. Do Tcl starkits really make this scenario feasible or am I overlooking the obvious issues that would render this a fantasy?

Thank you for any guidance you may be able to provide.


EDIT: I used the wrong term in all of the above text; I meant starpack not starkit.


Solution

  • A starkit can contain platform-specific code for multiple platforms; it's just a matter of making sure that you load the correct implementation. This is usually delegated to the package index file, which can examine the fields of tcl_platform to figure out what dynamic library file to use. The code is the same as if you are selecting which one to use from the ordinary filesystem.

    For completeness, a starpack is a starkit that has been bound to a platform-specific primary runtime to make a full executable. Those aren't multi-platform.