Hi Jelle, Jelle Licht <jli...@fsfe.org> writes:
> Timothy Sample <samp...@ngyro.com> writes: > > [snip] > >> I’ve come to think that bootstrapping JavaScript might be easier than it >> looks. As time goes on, Node gets better at the newer JavaScript >> features. This removes the need for things like Babel or Rollup, since >> with some care, Node can run the source directly with out any >> transformations or bundling. That being said, TypeScript looks to be a >> major issue, as it is used in many fundamental JavaScript packages and >> it is not bootstrappable. > > Very recently (IE about 94 minutes ago), I found out something > interesting that might be helpful; Sucrase[0] is, among other things, a > typescript transpiler that does not do any type checking, and it only > has some runtime dependencies. That is exciting! Did you see that the README links to a similar project written in Rust <https://swc-project.github.io/>? There’s also a Rust-based bundler called Packem <https://packem.github.io/>. Maybe those two projects are all that we need. With “mrustc”, the “rewrite it in Rust” trend looks good for bootstrapping. :) > I created some “fiio”-packages as well [1] , and I have confirmed that > it actually works! My next step was of course to compile TypeScript > proper, and this worked with one tiny snag that I reported at [2]. After > manually fixing these problems in the TypeScript source tree, I was able > to transpile the TypeScript sources using guix-packaged > `node-sucrase-bootstrap'. Cool. That looks really promising. I’m glad to see that the current “node-build-system” can do the same trick I’ve been doing. -- Tim