Subject: [bug#42885] Merge wip-swc

From: Ricardo Wurmus <[email-masked]>
Date: Tue, 13 Oct 2020 23:22:23 +0200

Arun Isaac <[email-masked]> writes:

>> I'm kind of worried how long it will take to get that build system. Even 
>> if we have it, will it really succeed at building MathJax so easily? If 
>> it's going to take a while, I'm tempted to just update Calibre without 
>> mathjax support. In theory I'm willing to do work to help but it all 
>> seems rather advanced for me, so i'm glad to see you make progress. 
>> What's the next step?
>
> True, I have similar concerns too. The next step, like Ricardo said, is
> to write a simple rust script that uses rust-swc to compile typescript
> to javascript. I am unfamiliar with both rust and typescript. So, if I
> am to do it, I would need some time. If someone else volunteers to do
> it, that would be great.

I looked at this today, but my rust-foo is very, very weak.
I tried to compile this:

  https://github.com/swc-project/swc/blob/master/examples/usage.rs

jlicht told me on IRC that we also have a package for esbuild now, which
could also be used for transpiling TypeScript to JS.

-- 
Ricardo