DEV Community

Discussion on: WebAssembly + Rust + TypeScript project setup

Collapse
 
ender_minyard profile image
ender minyard

Can you explain why you would need both Typescript and Rust for a WebAssembly project? Either AssemblyScript or Rust can compile to WebAssembly, I would just choose one.

Collapse
 
krzysztofkaczy9 profile image
Krzysztof Kaczyński • Edited

I am not sure did I understand your question, but I will try to answer. Why:

  • You want to create a wasm package in Rust but the rest of the project is created in TypeScript + WebComponents / React (maybe you want to learn a new language and try it in the web)
  • You need a language which is very very safe
  • You want to create a functionality which will be available to compute by user (at frontend) but can be also run on a clod (server side) and you need high-performance

This post is not about: "Use Rust and WebAssembly over Vanilla JS in any case to boost your app performance" because it doesn't work like that. I just wanted to show how to combine these technologies so that they are pleasant to work with.
Have I answered your question?

Collapse
 
piperunner profile image
Pipe Runner

Planning to write react code in Rust?? A really strange question.