truedat101 / dlang-sv-community

A community repository for stuff related to #dlang Silicon Valley Meetup group
http://www.meetup.com/D-Lang-Silicon-Valley/
2 stars 1 forks source link

More D presence in Mobile, specifically on iOS (project DiOS) #11

Open bithavoc opened 8 years ago

bithavoc commented 8 years ago

I'd like D to have more presence in the mobile space. It's cool that we now have more interop with obj-c but what would be really awesome is to have the D compiler output Bitcode so we can use it in all apple products including WatchOS and AppleTV.

Same with Android.

truedat101 commented 8 years ago

Agreed 100% on this. We probably split this discussion into Android and iOS as the requirements are very different.

truedat101 commented 8 years ago

I've changed the title to focus on iOS. I've added an issue for #16 Android work.

truedat101 commented 8 years ago

Some discussion of LDC iOS work here:

http://forum.dlang.org/post/m2pp04qnlk.fsf@comcast.net

bithavoc commented 8 years ago

Better

truedat101 commented 8 years ago

I'm less familiar with the BITCODE flag stuff, and I realize that's a default now on the xcode projects to have BITCODE on/true.

truedat101 commented 8 years ago

I think the initial scope of the "Dios" (God muhahaha) project would be to allow library building from a regular D toolchain with the target set for iOS, then allow the library to be imported into an existing project. There are a lot of unknowns in my head about where this breaks down. In Xcode you can of course add libraries into projects. I've never tried building with different toolchains (use gcc and then import that library archive into xcode iOS project). I assume that works.

truedat101 commented 8 years ago

I'd like to be sure there is a clear case where one can take a well known, existing, and useful D library, and bring it into iOS as a Sample XCode iOS project to demonstrate the project.

truedat101 commented 8 years ago

Xamarin does all this cool toolchain stuff taking their xamarin projects (c# stuff) and when it comes time to compile, they fire up XCode and presumably have spit out an xcode target that can then be build on a Mac. The same could be a part of such a toolchain style. I don't envision that there is enough time and muscle to go and do what Xamarin did (essentially writing C# bindings that mirror every single iOS *Kit api). Xamarin has a tool that prepares Objective C libraries to be ready to be used in Xamarin projects. I'll have to look at what exactly they did there to understand it.

It may be enough to just have a tool that builds against the desired toolchain, some D code, for the target iOS and architectures(s). Realize, you have to have all supported targets in your static library that gets spit out. It needs armv7, armv7s, arm64, and x86 and x86_64. So you build a fat universal binary using lipo. Can that be done on a non-apple platform? Surely it can, but I haven't tried.

truedat101 commented 7 years ago

Need to write up the follow up I did on this, from this meetup: http://www.meetup.com/D-Lang-Silicon-Valley/events/230220032/

truedat101 commented 7 years ago

Also: http://wiki.dlang.org/DIP43

jacob-carlborg commented 5 years ago

I don't envision that there is enough time and muscle to go and do what Xamarin did (essentially writing C# bindings that mirror every single iOS *Kit api)

DStep [1] supports generating bindings for Objective-C headers.

[1] https://github.com/jacob-carlborg/dstep

truedat101 commented 5 years ago

@jacob-carlborg I guess I've starred this repository at some point, this looks very cool. Are you available at some point to present this at a Dlang SV meetup? Not sure where you are located, but should be possible to do remotely too.

jacob-carlborg commented 5 years ago

I guess I've starred this repository at some point

I just found this thorough [1] for the upcoming DConf.

Are you available at some point to present this at a Dlang SV meetup? Not sure where you are located, but should be possible to do remotely too.

I'm located in Europe, GMT+1. The time difference might not be ideal.

[1] https://github.com/thewilsonator/Dlang-AGM/blob/master/2019/General.md

truedat101 commented 5 years ago

@jacob-carlborg I'm sure there is a way to make that work. We've done dial-in skype / hangouts with people in the EU. I will look into your project further. Are you presenting at DConf?

jacob-carlborg commented 5 years ago

Are you presenting at DConf?

No.

truedat101 commented 4 years ago

Looks like someone from the dfoundation has posted a bug bounty: https://www.flipcause.com/secure/cause_pdetails/NjU3MTY=

This covers ios/iphone/ipad and LDC. I will follow up and find the details of what prior work they want to start from and what they ultimately would like to achieve.

jacob-carlborg commented 4 years ago

They’re not exactly sure what needs to be done so it’s up to the one getting the contract. This is what I suggested that needs to be done:

truedat101 commented 4 years ago

Let me ask around about the iPadOS thing. I haven't upgraded my toolchain yet so I don't see those compiler targets yet. The simulator, yes, should be feasible as its an x86_ia64 target. Will need to understand the extern(Objective-C) and protocol items a bit better. DStep, I haven't reviewed the project yet, but you probably have a handle on the scope.

jacob-carlborg commented 4 years ago

Let me ask around about the iPadOS thing. I haven't upgraded my toolchain yet so I don't see those compiler targets yet.

I just had a look, there's no SDK for iPadOS. There's only an SDK for iPhoneOS.

Will need to understand the extern(Objective-C) and protocol items a bit better

This should be fairly easy to do for anyone familiar with the process.

DStep, I haven't reviewed the project yet, but you probably have a handle on the scope.

I'm pretty sure that the changes to DStep are trivial.