hugozap / rust-constraint-solver-wasm-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Experiment with Cassowary Constraint Solvers, Rust and WASM

This repo contains a rust crate that uses the cassowary constraint solver library for rust.

It exports one struct called App that contains the state (point locations)

The App has a public method called update_locations that runs the solver.

Instead of returning the point location, the internal state variable is updated.

To access the point locations there's another exported function called get_points

We use the pointer to access the wasm memory buffer and retrieve the values updated by the solver.

About


Languages

Language:Rust 61.1%Language:CSS 23.0%Language:JavaScript 6.5%Language:HTML 6.2%Language:TypeScript 3.1%