anyone using go lang on embedded platform application development?

agolangf · · 1067 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Mostly, its qt based application (which is c++ based mostly) that we see commonly on arm based embedded devices. I&#39;m now wondering if anyone is doing application development on linux/embedded linux using go based tools/software? I read some post about go that cross-compilation is easy in go. but interested to now if devs are actually using it on embedded platform? </p> <hr/>**评论:**<br/><br/>koffiezet: <pre><p>Having a history in embedded development, in my view is still a bit that the moment something runs a general purpose OS like Linux - it&#39;s not embedded anymore - but the world has moved forward, and most &#39;embeded&#39; stuff is a fast 32bit ARM anyway, so I&#39;m probably wrong.</p> <p>That said, I am using Go on an RPi, which is dead-easy to cross-compile to. Check out <a href="https://github.com/mitchellh/gox">gox</a> from the guy that brought us Vagrant to make your life easier.</p></pre>Mushrewm: <pre><p>FWIW, I agree with your stance on the definition of an embedded system. Damn kids need to get off my lawn.</p></pre>koffiezet: <pre><p>Hehe - well things have changed quite a bit....</p> <p>When I started working 15 years ago, having a filesystem on an embedded device was something amazing. Not having to fall back to ASM to achieve some acceptable crypto performance was also a big plus. At that time, the M86k ruled the embedded world I was involved with. These days it&#39;s &#34;huh? I can&#39;t use <code>apt-get</code> on my embedded stripped down linux? How 20th century&#34; :p</p></pre>suvirb: <pre><p>thanks for the gox link. Yes, i mean modern fast embedded devices which can now run full browser such as chrome on android.</p> <p>I&#39;m looking to write small go rountines/functions that can serve some kind of frontend. Do you use anything for frontend on arm? </p></pre>koffiezet: <pre><p>What exactly do you mean with &#39;some kind of frontend&#39;? Some GUI? For anything GUI related in Go I tend to go for a web UI. Only done this a few times, but every time I designed a REST API and a Javascript browser app that consumes it, sometimes backed by websockets if you need to do realtime UI updates.</p></pre>suvirb: <pre><p>yes, exactly the thing you mentioned about realtime UI update. I get some realtime data from (let&#39;s say from network) and i need to show it in browser app. But i have to build the browser app as well that can update the info. So, i&#39;m interested to get some network packets, parse them and make them ready (all in go) for the frontend to show(with minimum of html, css and little js).</p> <p>Also, not exactly like qml-go in the sense that having browser app gives more possibilty in my case. qml-go seems more suited for native task such as gaming.</p></pre>koffiezet: <pre><p>I always see go apps as an API. Even internally, the way Go is organized, it encourages you to create reusable libraries with only a small front consuming the API.</p> <p>So I would simply create a REST API with maybe a websocket which sends JSON updates from time to time. Then a front-end app can be written in whatever language capable of processing JSON/REST/Websockets. Websockets isn&#39;t even necessary, you can also use slow-polling if you don&#39;t have too many clients at the same time (which I guess you won&#39;t if it&#39;s &#34;embedded&#34;)</p></pre>jbuberel: <pre><p>I know that the team at <a href="https://mirrorx.com/" rel="nofollow">MirrorX.com</a> are using Qt along with <a href="https://github.com/go-qml/qml" rel="nofollow">qml-go</a> to create GUI apps that they then deploy in RPi devices. </p> <p>Let me see if one of their dev team members would be interested in writing up a blog post on their approach.</p></pre>suvirb: <pre><p>a blog post would be a great starting point for others interested to try it.</p></pre>suvirb: <pre><p>I ended up reading &#34;It turns out that Go requires 768 MB of continous memory space for its garbage collector to work.&#34; at <a href="https://github.com/CzarekTomczak/cef2go/issues/6" rel="nofollow">https://github.com/CzarekTomczak/cef2go/issues/6</a></p> <p>This makes cef2go unsuitable to use on rpi like hw.</p></pre>juanolon: <pre><p>you may also want to check gobot out. thy support several platforms like arduino and RPi: <a href="http://gobot.io/documentation/platforms/" rel="nofollow">http://gobot.io/documentation/platforms/</a></p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1067 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传