Right now, if the executor throws a KCLError (e.g. for "variable name is not defined" errors), they aren't being caught by the .catch or the try/catch block in asyncWrap. This PR fixes it. Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
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
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.
Tauri
To spin up up tauri dev, yarn install
and yarn build:wasm
need to have been done before hand then
yarn tauri dev
Will spin up the web app before opening up the tauri dev desktop app. Note that it's probably a good idea to close the browser tab that gets opened since at the time of writting they can conflict.
The dev instance automatically opens up the browser devtools which can be disabled by commenting it out
To build, run yarn tauri build
, or yarn tauri build --debug
to keep access to the devtools.
Note that these became separate apps on Macos, so make sure you open the right one after a build 😉

