How's that in any way related?…
If all you need is to be able to start WSL apps, in the same way you could suggest "embedding" half the programs on the earth. It's already possible and you don't need to do anything at all for it to work.
The "TCC's current support for PERL, Python, RUBY, REXX, @WINAPI and @CAPI" is done by loading appropriate libraries and exposing calls to certain functions of them through TCC commands.
This. Is. Simply. Not. Possible. With WSL. And will NEVER be possible due to the very nature of WSL as a separate subsystem.
WSL programs are NOT WINDOWS PROGRAMS, they are Linux programs. Binary incompatible with Windows.
You obviously just don't get it. I'm not saying it has to be
exactly the same as the others.
Being able to run Linux code from Windows and passing environment variables between the Linux subsystem and Windows means a Linux script could be written that does whatever the Linux part is intended to do and then have it put results in one or more environment variables and pass those back to the Windows system--in this case for instance as the result of a TCC function.
Basically, the TCC part would just pass certain things to a Linux "black box", and then a script within Linux written specifically to take output of the Linux activities would pass results back with environment variables that TCC could see either as results of a TCC function or as internal variables. (And I don't think "internal variable" would be a good idea.)
You also don't get that Microsoft is
integrating Linux into Windows. The whole purpose of WSL is that a Windows
program could tie in to Linux by passing commands and parameters, then receive the results and continue. We're not talking "half the programs on the earth". We're talking about access to hundreds of thousands of
Linux routines and libraries by a "send to black box" and "receive from black box" approach.
I don't know if Linux has the equivalent of Windows error codes returned in variables but I assume it does. If so, there should be a way to also pass any of those in the "receive from black box" mechanism.
And as I also mentioned, the current wsl.exe and wslconfig.exe approach looks pretty messy and probably could greatly benefit from a settings dialog within TCC and such a dialog might possibly also be put out as a standalone product.