ryanmcgrath / cacao

Rust bindings for AppKit (macOS) and UIKit (iOS/tvOS). Experimental, but working!
MIT License
1.85k stars 69 forks source link

build trunk and examples #39

Closed dagit closed 2 years ago

dagit commented 2 years ago

Hello.

I think maybe the CI is misconfigured? I was surprised to not see trunk listed in the branches to build so I added it. I also noticed that some of examples don't build so I added them as well. I added each one individually as I'm not sure they can all be built on a single machine. If they can, then it would be a lot easier to delete them and use a single cargo build --examples command.

ryanmcgrath commented 2 years ago

Thanks! This is an oversight on my part, happy to get it merged - tho I think getting the other PR with examples fixes merged first makes sense.

ryanmcgrath commented 2 years ago

If they can, then it would be a lot easier to delete them and use a single cargo build --examples command.

Meant to respond to this earlier - different examples use different feature flags. At the moment they're probably fine as one command, but in the future this might not be the case... so I'm a fan of explicit here.

Merging, thanks!

dagit commented 2 years ago

Meant to respond to this earlier - different examples use different feature flags. At the moment they're probably fine as one command, but in the future this might not be the case... so I'm a fan of explicit here.

Okay, I think that makes sense for ios-beta, but you might want to look at the layout example. It's not linking for me locally, but that might be an issue with my build machine? And so I disabled it in the CI config.

Merging, thanks!

Yay!

ryanmcgrath commented 2 years ago

Hmmm, you mean frame_layout or autolayout? They build and run on my M1 machine, but if you have a log I'd be happy to take a look.

dagit commented 2 years ago

Oh right. I meant autolayout.

The CI config has this section:

    # Fails to link:
    #- uses: actions-rs/cargo@v1
    #  with:
    #    command: build
    #    args: --example autolayout

If it's working for you, then you'll want to remove the comments.

I can't do a copy&paste at the moment, but I get a lot of warnings that my linker stub files are out of date, and then these three symbols are undefined:

I think it's just an issue with my machine and I wouldn't worry about it if it's working for you.

ryanmcgrath commented 2 years ago

Ah, interesting - are you by any chance on High Sierra or something?

(Or alternatively, if you're up for just listing your OS version, lol)

dagit commented 2 years ago

Yeah, this machine is 10.13.6. Oh and I see. Apple lists it as 10.14+. That would explain it.

ryanmcgrath commented 2 years ago

Yeah, so those are used in the color module to enable dynamic color types (dependent on the UI settings of the system). It should build and run in 10.13, albeit with the warnings you're seeing - what's your experience like?