r/reactjs • • 3d ago

Show /r/reactjs Strange Quark - a framework for building desktop applications with react, no webview/chromium.

https://github.com/project-strange-quark/strange-quark

Hi there! i made strange quark because i believe that cross platform desktop applications shouldnt require learning a whole new stack, or three for that matter if you are using the native toolchains of each platform.
Strange Quark keeps the parts of a browser that React apps depend on and replaces the rest with native code:

  1. Your app and react-dom run unmodified in V8.
  2. react-dom talks to squark-dom, a DOM written in JavaScript. React and libraries see ordinary DOM nodes, events and CSSOM objects.
  3. Every DOM change becomes a 16-byte record in a journal. The journal streams into a Rust copy of the document.
  4. Stylo(the CSS engine Servo and Firefox share) styles that document. Taffy and Parley lay it out.
  5. A GPU renderer draws it through wgpu and Vello, on its own thread.

i would love to hear technical feedback and criticism :)

4 Upvotes

1 comment sorted by

1

u/Ahmed_Hisham0 2d ago

the 16 byte journal record is the part i want to know more about. how do things that don't fit get handled, long text node contents, attribute values, style strings? interned into a side table with an id in the record, or rewritten per frame?

two things i'd be worrying about in practice:

  • ime and dead keys. react-dom expects composition events in a fairly specific order and native text input doesn't produce them the same way. that's where a lot of these stacks quietly break for non-english users.
  • the a11y tree. native accessibility and aria don't map 1:1, and building the bridge is usually the point where projects like this stall.

the stylo + taffy choice is right though. hand rolling layout is where most of these die, and deciding not to is the best call in the post.