r/reactjs • u/Lord_nova69420 • 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-quarkHi 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:
- Your app and react-dom run unmodified in V8.
- react-dom talks to squark-dom, a DOM written in JavaScript. React and libraries see ordinary DOM nodes, events and CSSOM objects.
- Every DOM change becomes a 16-byte record in a journal. The journal streams into a Rust copy of the document.
- Stylo(the CSS engine Servo and Firefox share) styles that document. Taffy and Parley lay it out.
- 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
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:
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.