Webassembly Rust

If I were to use Webassembly Rust instead of the standard HTML/CSS/JavaScript to make a standard website with menus and stuff and it does NOT need high performance for rendering or anything, is it possible to do so with Webassembly Rust?

Take a look at Yew:

2 Likes

Can yew actually make normal standard webpages such as having menu bars and stuff and is it easier to use compared to HTML/CSS?

You must try it to answer the question yourself (or at least take a look at its examples as @newpavlov said).

Yew use html! macro and the syntax of that macro similar to HTML with an annoyance due to the limitation of Rust’s macro_rules! (which Yew use to define html!). Personally, I don’t like the way Yew’s html! works. It is one of the reasons I build Simi, you can see the announcement here. Simi don’t use HTML-like syntax. But I don’t know it is easier than HTML or not, again you must find the answer yourself.

CSS is a must to help you define how things rendered on the browsers. But you can use something like SCSS and compile that to CSS.

1 Like

Oh ok thanks mate

absolutely!

on a lower level than a framework like yew, web_sys provides wrappers for the complete DOM APIs, with which you can do anything that can can be done from JS; the only required JS is a small shim that loads and calls into the WebAssembly code

for most people: no, sticking with the traditional tools will certainly be easier—there are certainly reasons to make a web application in rust, but I doubt ease of development is one of them

1 Like