Skip to content

Latest commit

 

History

History

rust_from_js

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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.