Skip to content

Files

Latest commit

81ee3e0 · Jan 14, 2021

History

History
17 lines (10 loc) · 407 Bytes

README.md

File metadata and controls

17 lines (10 loc) · 407 Bytes

Rust from JS example

How to call Rust functions from Javascript.

Note: See example update_from_js for more advanced example without the mutable global variable as a state.


cargo make start

Open 127.0.0.1:8000 in your browser.

See the code in index.html.

Run in the browser dev console rust.set_title("New title") and click the Rerender button.