Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nazgu1
· 2y ago · 0 comments
I wonder if or how easy will be to use existing embedded c/c++ libraries e.g arduino libs.
Comments
[–]
tomovo
2y ago
I just tried it recently, worked well enough, including support for std vector, string etc. You can loop over std vector items using a standard Swift loop, for example. It´s clear Apple needs and uses this internally too.
[–]
dejv
2y ago
Not sure about Arduino specific code, but including C/C++ is fairly easy. See Swift Embedded Examples [1] (check Sources/Support)
[1]:
https://github.com/apple/swift-embedded-examples/tree/main/p...
[–]
de_aztec
2y ago
they even show this in the video, apparently it’s supposed to be straightforward