On Monday, 28 December 2015 at 01:17:15 UTC, Dan Olson wrote:
A little progress report. More to come later when I get
something pushed to github.
I bought a returned Apple Watch yesterday at discount for
$223.99 US and tried to see how much of D would work on it
using my iOS fork of LDC. There were a few bumps, like dealing
with embedded bitcode (a watchOS requirement). After 4-hours of
baby steps, little D programs with incremental druntime
support, I was able to download a huge watch app extension with
all druntime and phobos unittests and run most of them
alphabetically. Everything zipped along fine, only a std.math
error, then mysteriously a exit after running std.parallelism
test a long time. It was late for me so decided that was enough
progress.
This means all of druntime worked and probably most of phobos.
The Apple Watch uses a new chip with armv7k, a different ABI,
and different exception handling than iOS, so kinda surprised
it worked as well as it did. Of course much thanks goes to
LLVM with recently added watchOS, tvOS support, and all the LDC
contributors that have kept master building with the latest 3.8
LLVM.
Fantastic news, Dan.
I can confirm that D also runs on Android Wear (Huawei watch) and
passes all unit tests. Forgive the slight hijack, but I mention
this here as people might see this thread and not the obscure one
where I reported this previously.
Somebody should do a blog post about this (and how to get it to
work step by step - it's easy when you know how, but the set of
people that don't and would like to but will get stuck is quite
large).
I might have a commercial use for this in coming months (both on
Android and watchOS). Since it's an internal application the
rough edges are of less concern to me than if one expects
100,000+ users.
Wrappers for everything would help a lot (and then some
tutorials) - I guess the Apple stuff is under way. Joakim has a
binding for JNI, but would be nice to wrap so easier to use (and
then build Android SDK wrappers on top of that. I saw this
project here, but haven't yet tried:
https://github.com/Monnoroch/DJni
I guess the spirit of what Xamarin do with their stuff might be a
model.
Could this be a useful Google Summer of Code Project? Or is it
too dull for the kinds of people that might be interested.