Use the js-sys Crate to Invoke Global APIs Available in Any JavaScript Environment

Nik Graf
InstructorNik Graf

Share this video with your friends

Send Tweet

js-sys offers bindings to all the global APIs available in every JavaScript environment as defined by the ECMAScript standard.

In this lesson, we will install and use js-sys to invoke JavaScript's Date API to grab the current time. The date will need to be converted to a value Rust can use and display that date from Rust in the browser.