stefnotch / aftermath-editor

A WYSIWYG mathematics editor that understands your formulas!
https://stefnotch.github.io/aftermath-editor
MIT License
14 stars 0 forks source link

Rust #4

Closed stefnotch closed 1 year ago

stefnotch commented 1 year ago
  1. Setup Rust WASM again
  2. Define MathLayout data structure in Rust
  3. Try out the 4 parsers (which can be compiled?)
  4. Simple parser (just joins numbers or something)
  5. JS integration (JS -> JSON -> MathLayout or maybe a custom serializer ... and then the other way around)

Regarding the bundlers: Well Webpack is slow, so that's not fun. Parcel doesn't support Rust yet, so that's also a no-go https://github.com/parcel-bundler/parcel/issues/3365 Rollup might work? https://github.com/wasm-tool/rollup-plugin-rust#readme Or Vite https://github.com/rwasm/vite-plugin-rsw Or directly using it https://rustwasm.github.io/wasm-bindgen/examples/without-a-bundler.html (maybe I need https://github.com/Menci/vite-plugin-wasm as well? There's also https://github.com/vitejs/vite/discussions/7763 and https://github.com/vitejs/vite/issues/4551 ) Or with Esbuild https://github.com/Tschrock/esbuild-plugin-wasm-pack

Remember to improve the performance by doing https://github.com/rictic/airlock.chat#improve-build-performance and also do https://www.reddit.com/r/rust/comments/z1rtcb/compiler_option_to_make_all_panics_be_undefined/

Future things

stefnotch commented 1 year ago

(Also woah https://robert.kra.hn/posts/hot-reloading-rust/ )

stefnotch commented 1 year ago

https://github.com/rustwasm/wasm-bindgen/issues/2407 ouchie

stefnotch commented 1 year ago

(Interesting Rust library https://github.com/rustwasm/gloo )

stefnotch commented 1 year ago

How fast is https://trunkrs.dev/ in terms of hot reloading? Answer: slow-ish

stefnotch commented 1 year ago

Guides

Template

stefnotch commented 1 year ago

https://users.rust-lang.org/t/is-there-a-better-way-to-represent-an-abstract-syntax-tree/9549/4

stefnotch commented 1 year ago

For communicating between JS and WASM