What platforms are targeted for programs?
So far, we have had the following requirements:
- The program should be no more than 8 kilobytes.
- Must be platform independent.
- No frameworks allowed.
Here are a few questions:
- Can an 8K program be a script for a scripting language?
- How big is the runtime for the program?
- Should the program have to be its own code on its own?
- What target platforms should the code run on?
- Is cross-compiling code for each platform an option?
The questions that I presented will affect the options you want. If the program should be 8 kilobytes with the runtime, then there really is not much choice but compilation against the target environment.
If the target is an embedded device or non-x86, then the likelihood that the choice will be further limited will be limited. Small embeddable langugages, such as Lua, can still be used (written in C), but it takes a rather long "run time" to execute the script.
If cross-compiling for purposes is an option, then writing a C program and compiling on each target platform is likely to produce fairly small native programs.
In accordance with current requirements, there are several questions that need to be addressed, providing a good comprehensive answer. Beyond this, the best you can do is brainstorm options that may or may not lead to the solution you want.
source share