Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

The Quadratic equation webapp example

In this example, we demonstrate how to use JSON to call Rust functions in SSVM from JavaScript. Read about Getting started with Rust functions in Node.js.

Prerequisites

If you have not done so already, follow these simple instructions to install Rust, Node.js, SSVM, and ssvmup.

Build the application

$ rustwasmc build --enable-aot

Test

$ cd node
$ node test.js
[0.5,-3.0]

Web app

$ cd node
$ node server.js
Listening at http://localhost:8080

Then point your browser to http://hostname:8080 enter numeric values for a, b, c, and hit the "Solve" button to find the roots.