{"id":22625105,"url":"https://github.com/gnustep/libobjc2","last_synced_at":"2025-05-15T04:00:24.130Z","repository":{"id":1583566,"uuid":"22781599","full_name":"gnustep/libobjc2","owner":"gnustep","description":"Objective-C runtime library intended for use with Clang.","archived":false,"fork":false,"pushed_at":"2025-05-01T08:34:44.000Z","size":1658,"stargazers_count":455,"open_issues_count":33,"forks_count":121,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-05-01T09:34:13.061Z","etag":null,"topics":["clang","gnustep","objective-c","objective-c-plus-plus","objective-c-runtime","runtime-library"],"latest_commit_sha":null,"homepage":"http://www.gnustep.org/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnustep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-08-09T07:37:34.000Z","updated_at":"2025-05-01T08:34:47.000Z","dependencies_parsed_at":"2023-11-17T23:00:13.464Z","dependency_job_id":"9b52b98e-75f5-46ad-b992-8ddab5a6337f","html_url":"https://github.com/gnustep/libobjc2","commit_stats":{"total_commits":1273,"total_committers":40,"mean_commits":31.825,"dds":0.4611154752553024,"last_synced_commit":"71e38a048fc06fea0c2015662540d46a33b5c45d"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnustep%2Flibobjc2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnustep%2Flibobjc2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnustep%2Flibobjc2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnustep%2Flibobjc2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnustep","download_url":"https://codeload.github.com/gnustep/libobjc2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270640,"owners_count":22042858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clang","gnustep","objective-c","objective-c-plus-plus","objective-c-runtime","runtime-library"],"created_at":"2024-12-09T00:19:24.486Z","updated_at":"2025-05-15T04:00:24.107Z","avatar_url":"https://github.com/gnustep.png","language":"C","readme":"GNUstep Objective-C Runtime\n===========================\n\nLinux and Windows CI: [![Libobjc2 CI](https://github.com/gnustep/libobjc2/actions/workflows/main.yml/badge.svg)](https://github.com/gnustep/libobjc2/actions/workflows/main.yml)\n\nFreeBSD CI: [![Build Status](https://api.cirrus-ci.com/github/gnustep/libobjc2.svg)](https://cirrus-ci.com/github/gnustep/libobjc2)\n\nThe GNUstep Objective-C runtime was designed as a drop-in replacement for the\nGCC runtime.  It supports three ABIs:\n\n- The old GCC ABI, which provides support for Objective-C 1.0 features.  This\n  can be selected via the `-fobjc-runtime=gcc` flag in Clang or by compiling\n  with GCC.\n- The initial GNUstep non-fragile ABI, which was intended to be compatible with\n  the GCC ABI, but provide support for modern Objective-C features.  This can be\n  selected with the `-fobjc-runtime=gnustep-1.9` flag in Clang.\n- The modern (v2) ABI, which provides richer reflection metadata, smaller\n  binaries and reduced memory usage.  This is selected with the\n  `-fobjc-runtime=gnustep-2.0` flag in Clang 7.0 or later.\n\nThe runtime can be built without support for older ABIs by setting the\n`OLDABI_COMPAT` flag to `OFF` in CMake configuration.  This will result in a\nsmaller binary, which will not link against code using the older ABIs.\n\nAll ABIs support the following feature above and beyond the GCC runtime:\n\n- The modern Objective-C runtime APIs, initially introduced with OS X 10.5.\n- Blocks (closures).\n- Synthesised property accessors.\n- Efficient support for @synchronized()\n- Type-dependent dispatch, eliminating stack corruption from mismatched\n  selectors.\n- Support for the associated reference APIs introduced with Mac OS X 10.6.\n- Support for the automatic reference counting APIs introduced with Mac OS X\n  10.7\n\nHistory\n-------\n\nEarly work on the GNUstep runtime combined code from the GCC Objective-C\nruntime, the Étoilé Objective-C runtime, Remy Demarest's blocks runtime for OS\nX 10.5, and the Étoilé Objective-C 2 API compatibility framework.  All of these\naside from the GCC runtime were MIT licensed, although the GPL'd code present\nin the GCC runtime meant that the combined work had to remain under the GPL.\n\nSince then, all of the GCC code has been removed, leaving the remaining files\nall MIT licensed, and allowing the entire work to be MIT licensed.  \n\nThe exception handling code uses a header file implementing the generic parts\nof the Itanium EH ABI.  This file comes from PathScale's libcxxrt.  PathScale\nkindly allowed it to be MIT licensed for inclusion here.\n\nVarious parts of Windows support were contributed by the WinObjC team at\nMicrosoft.\n\nType-Dependent Dispatch\n-----------------------\n\nTraditionally, Objective-C method lookup is done entirely on the name of the\nmethod.  This is problematic when the sender and receiver of the method\ndisagree on the types of a method.  \n\nFor example, consider a trivial case where you have two methods with the same\nname, one taking an integer, the other taking a floating point value.  Both\nwill pass their argument in a register on most platforms, but not the same\nregister.  If the sender thinks it is calling one, but is really calling the\nother, then the receiver will look in the wrong register and use a nonsense\nvalue.  The compiler will often not warn about this.\n\nThis is a relatively benign example, but if the mismatch is between methods\ntaking or returning a structure and those only using scalar arguments and\nreturn then the call frame layout will be so different that the result will be\nstack corruption, possibly leading to security holes.\n\nIf you compile the GNUstep runtime with type-dependent dispatch enabled, then\nsending a message with a typed selector will only ever invoke a method with the\nsame types.  Sending a message with an untyped selector will invoke any method\nwith a matching name, although the slot returned from the lookup function will\ncontain the types, allowing the caller to check them and construct a valid call\nframe, if required.\n\nIf a lookup with a typed selector matches a method with the wrong types, the\nruntime will call a handler.  This handler, by default, prints a helpful\nmessage and exits.  LanguageKit provides an alternative version which\ndynamically generates a new method performing the required boxing and calling\nthe original.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnustep%2Flibobjc2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnustep%2Flibobjc2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnustep%2Flibobjc2/lists"}