So I've been contemplating on DOpus, its scripting, plugins API, and also this thread, or similar threads like WASM runtime to allow any language for plugin development from @eugenesv for quite some time.
While I think Bun is interesting and powerful, and hope it'll replace Node one day, also fear that it may or may not reach any critical adoption, like Deno, and might die or get obscure like the bajillions of other JS frameworks and runtimes and libraries which sprout like weed every day, only time will tell. Personally I also, like you, would very much welcome more modern tech & extension possibilities for DOpus other than our options being limited to either WSH ES3 from 1999(!) or to C++. However, in some other thread Leo stated "scripts are supposed to be small & simple" (paraphrased from memory) so C++ seems to be their choice for heavy duty tasks. I very much dislike C++ and disagree with the sentiment about scripting, after all who'd have thought 20 years ago Python would become the backbone of AI revolution, or JS the most popular language on earth but I fully understand, C++ is an industry standard and a workhorse. And since DOpus devs have to think more future-safe & have to maintain all the bindings over years, the runtime needs to be tried and true, that's why I understand why C++ is (stil) their main preference. Then finding a universally available scripting environment on every Windows machine is another challenge, which I suspect was the original idea behind choosing WSH.
WASM is therefore definitely an interesting suggestion, and might open the way to a plethora of different languages. There are obviously far many more devs familiar with other languages combined than with C++ or an archaic JS, so this would open the flood gates for many more & very powerful extensions since many more people could contribute. Same could be said for .NET and dozens of CLI/CLR languages it supports. With such VM-based language-independent runtimes, we could build on top of each other's developments even when we code in entirely different languages and still call functions from each other directly. The problem, however, is not what language we can code in, but how we dock our code to DOpus API, i.e. the bindings. That's why WASM and/or .NET might be very safe and future-proof ways to go, since the glue code would be identical for any language these platforms support. It'd also mean major development & testing for DOpus crew. Just in case it wasn't clear, this is not a diss of Bun or DOpus or its APIs, but you know, there can never be enough newest toy languages, APIs and libraries ps: By the way, since you mentioned TypeScript I am already using TS for JScript developments, transpiled to ES3; see my forum posts for example. But this is not why I'm responding. /my2c/mini-rant
Apparently there are 2 much newer JScript implementation on Windows than WSH's JScript/ES3: JScript9.dll
& Chakra.dll
which were initially shipped with IE11 & Classic Edge (before MS switched to Chrome/V8). While still being Microsoft proprietary implementations, they are supposed to support up to ES9, 2018!!! More info is on Wikipedia. And they are COM-based too, which I believe why DOpus devs chose it in the past, keyword IDispatch interface. This might be a perfect interim solution until, well, Jon & Leo feel extremely bored or generous and give us more developer toys
Whether a switch to one of these engines (chakra.dll seems to be the newer one) is possible at all and how much effort that would be, only DOpus devs can say. Right after a major release & website launch, I'm sure DOpus team has a ton to do right now, maybe Leo or Jon can chime in and look into this some time in the future.