<div dir="ltr">Hi Aleksey,<div><br></div><div>Your biggest obstacle is probably the fact that c-lightning spawns several processes (subdaemons) and depends on the bitcoin-cli binary for bitcoind RPC. If WebAssembly supports multiple processes (not just threads) that&#39;s a good start I guess.</div><div><br></div><div>There is a c-lightning specific mailing list on <a href="https://lists.ozlabs.org/listinfo/c-lightning">https://lists.ozlabs.org/listinfo/c-lightning</a></div><div><br></div><div>Cheers,</div><div>Igor</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 April 2018 at 16:39, Быхун, Алексей Викторович <span dir="ltr">&lt;<a href="mailto:aleksey.bykhun@phystech.edu" target="_blank">aleksey.bykhun@phystech.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">Hi everyone!</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:arial,helvetica,sans-serif">I am looking for a way to run a LN node inside the browser. One way would be to implement BOLT protocol from scratch in JS, but I am thinking of a more easy way.</span><br></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">Has anyone succeed in compiling, for example, c-lightning project (<a href="https://github.com/ElementsProject/lightning" target="_blank">https://github.com/<wbr>ElementsProject/lightning</a>) under WebAssembly (<a href="http://webassembly.org/getting-started/developers-guide/" rel="nofollow" style="box-sizing:border-box;background-color:transparent;color:rgb(3,102,214);text-decoration:none" target="_blank">http://webassembly.org/<wbr>getting-started/developers-<wbr>guide/</a>).</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">WebAssembly is a C/C++ compiler into browser-compatible byte-code. It can use JS-API, but can also work with low-level C functions.</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">There are some things c-lighting does (e.g. sockets), that should stop it from compiling easily. However, there are wrappers for many C-functions by Emscripten lib: <a href="https://github.com/kripken/emscripten" target="_blank">https://github.com/<wbr>kripken/emscripten</a>.</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">My question is what should I look for when trying to run that? And also, I want to hear your general feedback on the idea.</font></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">Aleksey Bykhun.</font></p></div></div>
<br>______________________________<wbr>_________________<br>
Lightning-dev mailing list<br>
<a href="mailto:Lightning-dev@lists.linuxfoundation.org">Lightning-dev@lists.<wbr>linuxfoundation.org</a><br>
<a href="https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.<wbr>org/mailman/listinfo/<wbr>lightning-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b>Igor Cota</b><div>Codex Apertus Ltd<br></div></div></div></div></div>
</div>