Yoga Swift interface #620

Open
opened 2017-08-30 10:54:36 -07:00 by lucdion · 4 comments
lucdion commented 2017-08-30 10:54:36 -07:00 (Migrated from github.com)

Report

Issues and Steps to Reproduce

This is not an issue, but more a proposition.

YogaKit should have an official Swift interface, and not just a Objective-C interface. Swift has been around for more than 3 years now, and it is now the defacto iOS languages for new applications.

I've developed a nice Swift Yoga interface (at least from my point of view :-)) that gently wraps the Yoga flexbox implementation. I would be really happy to share it and integrate it with the Yoga's repo. You can find my project at https://github.com/lucdion/FlexLayout

Regards

Link to Code

https://github.com/lucdion/FlexLayout

# Report - [x] I have searched [existing issues](https://github.com/facebook/yoga/issues) and this is not a duplicate # Issues and Steps to Reproduce This is not an issue, but more a proposition. YogaKit should have an official Swift interface, and not just a Objective-C interface. Swift has been around for more than 3 years now, and it is now the defacto iOS languages for new applications. I've developed a nice Swift Yoga interface (at least from my point of view :-)) that gently wraps the Yoga flexbox implementation. I would be really happy to share it and integrate it with the Yoga's repo. You can find my project at https://github.com/lucdion/FlexLayout Regards # Link to Code https://github.com/lucdion/FlexLayout
alickbass commented 2018-01-12 05:05:41 -08:00 (Migrated from github.com)

Any news here?

Any news here?
lucdion commented 2018-01-12 06:47:05 -08:00 (Migrated from github.com)

No @alickbass, but in the meantime, you can use it: https://github.com/layoutBox/FlexLayout

No @alickbass, but in the meantime, you can use it: https://github.com/layoutBox/FlexLayout
NickGerleman commented 2022-10-04 12:24:28 -07:00 (Migrated from github.com)

At this point FlexLayout has grown to be its own mature project. I think it is more likely that we should point to it in Yoga documentation instead of bringing into the repo.

At this point FlexLayout has grown to be its own mature project. I think it is more likely that we should point to it in Yoga documentation instead of bringing into the repo.
iainsmith commented 2024-08-24 05:33:29 -07:00 (Migrated from github.com)

Hey all, I started prototyping out an implementation in a standalone package at iainsmith/YogaSwift that uses Swift Macros to minimise the boilerplate code for wrapping the calls to YGNodeStyleGetXXX.

The next thing I am looking at is updating the gentest script to generate the swift tests.

If there’s interest in upstreaming some of this work into the main yoga Swift package, down the line, I’d be happy to move this to a new module in my yoga fork and PR it up.


The upcoming release of swift 6 has support for noncopyable generics & type (~Copyable) which facilitate building a more ergonomic Swift API, so users don’t have to manually call YGNodeFree, which is what my current implementation is targetting.

Hey all, I started prototyping out an implementation in a standalone package at [iainsmith/YogaSwift](https://github.com/iainsmith/YogaSwift) that uses Swift Macros to minimise the boilerplate code for wrapping the calls to `YGNodeStyleGetXXX`. The next thing I am looking at is updating the gentest script to generate the swift tests. If there’s interest in upstreaming some of this work into the main yoga Swift package, down the line, I’d be happy to move this to a new module in my yoga fork and PR it up. --- The upcoming release of swift 6 has support for noncopyable generics & type (~Copyable) which facilitate building a more ergonomic Swift API, so users don’t have to manually call YGNodeFree, which is what my current implementation is targetting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#620
No description provided.