COMMUNITY

Swift target support

ios

(Satoshi Nakagawa) #1

Hi!

I think it would be great if the Haxe compiler can emit Swift target code. I’m curious if anyone else has the same request.

I’m working as iOS eng at Slack. Slack is using Haxe language to write a common text format parser for various server and client platforms. It is really useful to run consistent codes efficiently across many platforms. Currently our iOS app is using generated JavaScript code for text format parser. But we have performance problems with running JavaScript on iOS devices. We tried generated C++ code previously, but it also had some performance problem with complicated regexps. That’s why we ended up using JavaScript code now.

If the Haxe compiler had Swift target support, it would save many Slack iOS users and my life!

Regards,
Satoshi


(Uldis Baurovskis) #2

Hi
long story short, there have been attempts to add swift/objc to haxe in past but non of them really was done.
https://github.com/ralcr there was most know try to add it but I think nothing have been done since last years.
But maybe there are some other hidden works on it :slight_smile: but I would like to have it as well.


(Eric Bishton) #3

Rom Thompson had a start at one. I’m not sure how complete it is.


(Valentin Lemière) #4

It’s not swift, but if apple hasn’t removed objc yet hxcpp can output it.

haxe -main Main -cpp out/ -D objc -D file_extension=mm

Hugh talked about it at the last summit, https://www.youtube.com/watch?v=mTsr38FaMW0


(Philippe) #5

Maybe a bit far fetched, but you could try the LUA VM - interop would be lightweight, and regexes should be fast.


(Alexander Djafarov) #6

Here is an attempt of ios native development with haxe(hxcpp)


(Nanjizal) #7

Can you post problematic code examples in haxe c++ maybe community can help get them working?