<story><title>Making a Statically-Linked, Single-File Web App with React and Rust</title><url>https://anderspitman.net/2018/04/04/static-react-rust-webapp/</url></story><parent_chain><item><author>Waterluvian</author><text>I just wish electron could somehow harness the fact that everyone has a browser installed.</text></item><item><author>kodablah</author><text>&amp;gt; This is somewhat similar to what Electron accomplishes, but your backend is in Rust rather than JavaScript, and the user navigates to the app from their browser.&lt;p&gt;An option in the middle is webview[0] which will &amp;quot;appify&amp;quot; it by using OS-native browser lib so you don&amp;#x27;t have to carry Chromium, V8, or all the multi-process ugliness but you still get the web stack.&lt;p&gt;Also everybody, don&amp;#x27;t forget to check your Host headers when building apps running HTTP daemons locally or you&amp;#x27;ll be open to DNS rebinding attack. And if your use case can support it, a random port is nice too.&lt;p&gt;0 - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;zserge&amp;#x2F;webview&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;zserge&amp;#x2F;webview&lt;/a&gt;
1 - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;DNS_rebinding&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;DNS_rebinding&lt;/a&gt;</text></item></parent_chain><comment><author>kodablah</author><text>Well, Chrome doesn&amp;#x27;t really allow chrome.dll to be easily used. Electron has deep requirements on Chromium for V8, IPC, webview, customer protocol handlers, etc IIRC so it can&amp;#x27;t just easily switch browser engines. I&amp;#x27;d say if you want this, the Chromium project would have to prioritize a stable Chrome ABI from their shared lib which I doubt they would do. And it still doesn&amp;#x27;t solve the extremely mem-bloated approach they take to serving the web stack. So for that, the Chromium project would have to prioritize better runtime feature gating for mem reduction and maybe revive first-class support for single-process mode, which I doubt they&amp;#x27;d do. And even then, you&amp;#x27;re carrying node.&lt;p&gt;To sum up my rant, I&amp;#x27;m afraid the fast moving web stack, coupled with the fact only a few companies can keep up, coupled with the fact that those companies are laser focused on their own browser use case and not embeddability combine to make this incredibly common desktop use case still suck. In the meantime, just hope these OS engines stay minimal and don&amp;#x27;t fall too far behind the standards you want.</text></comment>
<story><title>Making a Statically-Linked, Single-File Web App with React and Rust</title><url>https://anderspitman.net/2018/04/04/static-react-rust-webapp/</url></story><parent_chain><item><author>Waterluvian</author><text>I just wish electron could somehow harness the fact that everyone has a browser installed.</text></item><item><author>kodablah</author><text>&amp;gt; This is somewhat similar to what Electron accomplishes, but your backend is in Rust rather than JavaScript, and the user navigates to the app from their browser.&lt;p&gt;An option in the middle is webview[0] which will &amp;quot;appify&amp;quot; it by using OS-native browser lib so you don&amp;#x27;t have to carry Chromium, V8, or all the multi-process ugliness but you still get the web stack.&lt;p&gt;Also everybody, don&amp;#x27;t forget to check your Host headers when building apps running HTTP daemons locally or you&amp;#x27;ll be open to DNS rebinding attack. And if your use case can support it, a random port is nice too.&lt;p&gt;0 - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;zserge&amp;#x2F;webview&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;zserge&amp;#x2F;webview&lt;/a&gt;
1 - &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;DNS_rebinding&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;DNS_rebinding&lt;/a&gt;</text></item></parent_chain><comment><author>mrec</author><text>Having a browser installed isn&amp;#x27;t the problem. The problem is having a specific version of a specific browser installed because that&amp;#x27;s the only thing you&amp;#x27;ve tested against.&lt;p&gt;(I&amp;#x27;m not condoning this, and haven&amp;#x27;t worked with Electron myself, but that&amp;#x27;s my understanding of the motivation.)</text></comment>