libasync
libasync copied to clipboard
epoll on ARM should not pack epoll_event_t
This struct's alignment has popped up again to cause you some more grief :)
This time it needs to be UNpacked. Details in the link.
http://bugzilla.gdcproject.org/show_bug.cgi?id=214
I hadn't realized libasync could build for ARM ? Have you tested it with align(8) to see if you can successfully run a web server on a Raspberry Pi?
vibe.d won't compile on the Pi (lacks memory) but libasync does with GDC 5 (memutils fails to build with a forward reference error on older versions) but I had to modify core.atomic to make it work (GDC rejects an attempted implicit conversion between a class reference and an integer, I don't remember offhand where in libasync this is triggered). I've tested with align(8), and epoll + libasync runs correctly on the Raspberry Pi. I'm able to stream a log from the Pi to a desktop using AsyncTCP. Without align(8), the event loop segfaults when it tries to switch on the event type.
Nice, but wouldn't it be possible to cross-compile from an ARM emulator like Qemu?
Maybe. The code makes use of a RPi-specific lib though, and I'm not sure how that would work with an emulator. Also I haven't used cross-compilation before, so I thought it'd make more sense initially to attempt the most straightforward and familiar build method. At least to convince myself that the code would run at all.
It's good to know, I have a project for a decentralized social network that I thought I would have to use the Edison chip for, maybe I'll move towards ARM instead and it would help reduce the costs