oc

Macro magic for declaring/calling Objective-C APIs from C11 or C++. Preloads selectors, chooses the correct objc_msgSend to call per method/platform. (by garettbass)

Oc Alternatives

Similar projects and alternatives to oc

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better oc alternative or higher similarity.

oc reviews and mentions

Posts with mentions or reviews of oc. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-19.
  • C-Macs – a pure C macOS application
    11 projects | news.ycombinator.com | 19 Apr 2024
    Here's something similar by Garret Bass:

    https://github.com/garettbass/oc

    ...I also experimented a bit with parsing macOS system headers via clang-ast-dump and then code-generating C and Zig APIs but that didn't get far:

    https://github.com/floooh/objc-ast-experiments

    ...with a bit of effort and maybe using libclang instead of clang-ast-dump that's definitely feasible though.

    I guess a similar approach is used by the official C++ bindings for Metal:

    https://developer.apple.com/metal/cpp/

  • Space-shooter.c: cross-platform, top-down 2D space shooter written in C
    5 projects | news.ycombinator.com | 11 Dec 2021
    Metal can be called from C by going directly through the Objective-C runtime, but it requires either macro magic (like: https://github.com/garettbass/oc/), or code-generated C headers.

    But it's not a big deal to move all the ObjC code into a separate .m source file and expose a smaller and higher level C API.

Stats

Basic oc repo stats
2
45
10.0
almost 5 years ago

garettbass/oc is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of oc is C.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com