Kurt Hutten 5d90c0488f port recast to rust 🦀 (#178)
* port recast to rust with massaged serialisation

* remove logs

* fix the last of white space test failures

* remove ts recastor

* clean up imports

* use serde serialise features

* unneeded async

* final clean up recast.ts

* more clean up tweaks

* improve Rust BinaryPart types

* Comments, fix warnings

* Run clippy --fix

* Remove unused variable

* serialise none_code_nodes manual to force strings to numbers

---------

Co-authored-by: Adam Chalmers <adam.s.chalmers@gmail.com>
2023-07-20 12:38:05 +10:00
2022-11-12 13:11:54 +11:00
2023-07-13 07:23:11 -04:00
2023-07-20 12:38:05 +10:00
2023-07-13 19:05:56 -07:00
🚨🦀 Setup Rust -> WASM 🦀🚨 (#28)
2023-02-21 09:42:41 +11:00
2023-07-13 07:23:11 -04:00
2022-11-12 13:11:54 +11:00
2022-11-22 09:06:08 +11:00
2023-03-22 06:58:25 +11:00
2022-11-12 13:11:54 +11:00
2023-07-13 07:22:08 -04:00
2022-11-12 13:11:54 +11:00

Kurt demo project

live at untitled-app.kittycad.io

Not sure what to call this, it's both a language/interpreter and a UI that uses the language as the source of truth model the user build with direct-manipulation with the UI.

It might make sense to split this repo up at some point, but not the lang and the UI are all togther in a react app

Originally Presented on 10/01/2023

Video

demo-slides.pdf

To run, there are a couple steps since we're compiling rust to WASM, you'll need to have rust stuff installed, then

yarn install

then

yarn build:wasm

That will build the WASM binary and put in the public dir (though gitignored)

finally

yarn start

and yarn test you would have need to have built the WASM previously. The tests need to download the binary from a server, so if you've already got yarn start running, that will work, otherwise running

yarn simpleserver

in one terminal and

yarn test

in another.

If you want to edit the rust files, you can cd into src/wasm-lib and then use the usual rust commands, cargo build, cargo test, when you want to bring the changes back to the web-app, a fresh yarn build:wasm in the root will be needed.

Worth noting that the integration of the WASM into this project is very hacky because I'm really pushing create-react-app further than what's practical, but focusing on features atm rather than the setup.

image image (1)
Description
Languages
TypeScript 64.3%
Rust 34.8%
CSS 0.4%
Python 0.1%
JavaScript 0.1%