DEV Community

Discussion on: Let's rewrite Typescript in Rust!

Collapse
 
mrjjwright profile image
John Wright

Check out esbuild for fast ts bundles

Collapse
 
mindplay profile image
Rasmus Schultz

Yep, esbuild is crazy fast and is being written by an extremely talented and experienced developer - it solves the compile speed problem for both TS and ES, so in the likely event that you're going to bundle, well... ๐Ÿ™‚

See also Facebook's Rome project, which I think is going to compete in the same space.

Collapse
 
divywork profile image
Divy Srivastava

esbuild is fast bundler but it does not typecheck

Collapse
 
willm profile image
Will Munn

This is a very important point and it's the same for SWC. From what I've seen all it does is strip the types. You can quite happily "compile" what's actually invalid typescript:

const name: number = 'foo';
Enter fullscreen mode Exit fullscreen mode

to

var name = 'foo';
Enter fullscreen mode Exit fullscreen mode

So really this is not an alternative to tsc, you might as well write javascript. What would be really cool is if their was a true typescript compiler written in rust/c++/go. I've been searching for this, but I don't think it exists.

Thread Thread
 
doitadrian profile image
Adrian Smijulj

Do you know maybe, was there any movement in the meantime?

Was searching for the same thing, and could not find anything.