<p>Mostly, its qt based application (which is c++ based mostly) that we see commonly on arm based embedded devices. I'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's not embedded anymore - but the world has moved forward, and most 'embeded' stuff is a fast 32bit ARM anyway, so I'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's "huh? I can't use <code>apt-get</code> on my embedded stripped down linux? How 20th century" :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'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 'some kind of frontend'? 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'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'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't even necessary, you can also use slow-polling if you don't have too many clients at the same time (which I guess you won't if it's "embedded")</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 "It turns out that Go requires 768 MB of continous memory space for its garbage collector to work." 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
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传