• Stars
    star
    419
  • Rank 100,077 (Top 3 %)
  • Language
    C
  • License
    MIT License
  • Created almost 10 years ago
  • Updated 28 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Objective-C runtime library intended for use with Clang.

GNUstep Objective-C Runtime

Linux and Windows CI: Libobjc2 CI

FreeBSD CI: Build Status

The GNUstep Objective-C runtime was designed as a drop-in replacement for the GCC runtime. It supports three ABIs:

  • The old GCC ABI, which provides support for Objective-C 1.0 features. This can be selected via the -fobjc-runtime=gcc flag in Clang or by compiling with GCC.
  • The initial GNUstep non-fragile ABI, which was intended to be compatible with the GCC ABI, but provide support for modern Objective-C features. This can be selected with the -fobjc-runtime=gnustep-1.9 flag in Clang.
  • The modern (v2) ABI, which provides richer reflection metadata, smaller binaries and reduced memory usage. This is selected with the -fobjc-runtime=gnustep-2.0 flag in Clang 7.0 or later.

The runtime can be built without support for older ABIs by setting the OLDABI_COMPAT flag to OFF in CMake configuration. This will result in a smaller binary, which will not link against code using the older ABIs.

All ABIs support the following feature above and beyond the GCC runtime:

  • The modern Objective-C runtime APIs, initially introduced with OS X 10.5.
  • Blocks (closures).
  • Synthesised property accessors.
  • Efficient support for @synchronized()
  • Type-dependent dispatch, eliminating stack corruption from mismatched selectors.
  • Support for the associated reference APIs introduced with Mac OS X 10.6.
  • Support for the automatic reference counting APIs introduced with Mac OS X 10.7

History

Early work on the GNUstep runtime combined code from the GCC Objective-C runtime, the Étoilé Objective-C runtime, Remy Demarest's blocks runtime for OS X 10.5, and the Étoilé Objective-C 2 API compatibility framework. All of these aside from the GCC runtime were MIT licensed, although the GPL'd code present in the GCC runtime meant that the combined work had to remain under the GPL.

Since then, all of the GCC code has been removed, leaving the remaining files all MIT licensed, and allowing the entire work to be MIT licensed.

The exception handling code uses a header file implementing the generic parts of the Itanium EH ABI. This file comes from PathScale's libcxxrt. PathScale kindly allowed it to be MIT licensed for inclusion here.

Various parts of Windows support were contributed by the WinObjC team at Microsoft.

Type-Dependent Dispatch

Traditionally, Objective-C method lookup is done entirely on the name of the method. This is problematic when the sender and receiver of the method disagree on the types of a method.

For example, consider a trivial case where you have two methods with the same name, one taking an integer, the other taking a floating point value. Both will pass their argument in a register on most platforms, but not the same register. If the sender thinks it is calling one, but is really calling the other, then the receiver will look in the wrong register and use a nonsense value. The compiler will often not warn about this.

This is a relatively benign example, but if the mismatch is between methods taking or returning a structure and those only using scalar arguments and return then the call frame layout will be so different that the result will be stack corruption, possibly leading to security holes.

If you compile the GNUstep runtime with type-dependent dispatch enabled, then sending a message with a typed selector will only ever invoke a method with the same types. Sending a message with an untyped selector will invoke any method with a matching name, although the slot returned from the lookup function will contain the types, allowing the caller to check them and construct a valid call frame, if required.

If a lookup with a typed selector matches a method with the wrong types, the runtime will call a handler. This handler, by default, prints a helpful message and exits. LanguageKit provides an alternative version which dynamically generates a new method performing the required boxing and calling the original.

More Repositories

1

libs-base

The GNUstep Base Library is a library of general-purpose, non-graphical Objective C objects.
Objective-C
901
star
2

libs-gui

The GNUstep gui library is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon Apple's Cocoa framework (which came from the OpenStep specification). *** Larger patches require copyright assignment to FSF. please file bugs here. ***
Objective-C
260
star
3

libs-quartzcore

GNUstep QuartzCore, an implementation of the Core Animation APIs intended for use with GNUstep
Objective-C
103
star
4

apps-gorm

Gorm is a clone of the Cocoa (OpenStep/NeXTSTEP) `Interface Builder' application for GNUstep
Objective-C
55
star
5

libs-back

The GNUstep gui library is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon Apple's Cocoa framework (which came from the OpenStep specification). *** Larger patches require copyright assignment to FSF. please file bugs here. ***
Objective-C
46
star
6

tools-android

Objective-C on Android with Foundation, CoreFoundation, and libdispatch.
Shell
43
star
7

tools-windows-msvc

Objective-C on Windows using Clang and GNUstep.
Batchfile
39
star
8

libs-corebase

The GNUstep CoreBase Library is a library of general-purpose, non-graphical C objects.
C
33
star
9

libs-xcode

The GNUstep Xcode Library is a library for building xcode projects. It can be used to parse and provide information regarding an xcode project or used to build an xcode project directly.
Objective-C
31
star
10

tools-make

The makefile package is a simple, powerful and extensible way to write makefiles for a GNUstep-based project.
Makefile
26
star
11

apps-gworkspace

GWorkspace is GNUstep's Workspace Manager and offers a File Manager and an optional Desktop with associated services and tools.
Objective-C
24
star
12

libs-opal

Opal is a vector drawing library with an API similar to Quartz 2D built on top of Cairo.
Objective-C
20
star
13

gap

MIRRORED from Savannah. Pull requests CANNOT be accepted. Please reach out to us over mailing lists.
Objective-C
19
star
14

apps-projectcenter

IDE - Integrated Development Environment. PC manages code and builds applications, frameworks and libraries, use GORM for Interface editing.
Objective-C
17
star
15

libs-performance

High-Performance library for Data Structures (FIFO, Indexed SkipLists, Linked Lists...) manipulation
Objective-C
12
star
16

libs-gsweb

GNUstepWeb is a library which was designed to be compatible with WebObjects 4.x (developed by NeXT (now Apple) Inc.).
Objective-C
12
star
17

apps-thematic

Application for creating image-only themes for GNUstep.
Objective-C
11
star
18

apps-topbar

A persistant bar at the top the screen.
Objective-C
11
star
19

libs-dbuskit

The DBusKit framework provides Objective-C applications with bindings for the D-Bus inter-process communication system.
Objective-C
11
star
20

libs-boron

Boron is the atom that comes before carbon.
C
10
star
21

plugins-sessions-windowmaker

Configs and scripts to launch a WindowMaker session with GNUstep, gnome-settings-daemon, conky and compton as compositing manager. A Windowmaker theme, a Gnome theme and an icontheme are also provided so that the look will be more coherent with GNUstep's Rik.theme.
CSS
10
star
22

libs-simplewebkit

Lightweight implementation of a subset of WebKit APIs using AppKit.
Objective-C
9
star
23

libs-webserver

WebServer library for GNUstep.
Objective-C
9
star
24

apps-systempreferences

System Preferences application and pane framework for GNUstep.
Objective-C
8
star
25

plugins-themes-sombre

A dark theme for GNUstep, using Rik icons.
Objective-C
7
star
26

plugins-themes-Gtk

GTK theme for GNUstep.
Objective-C
7
star
27

libs-renaissance

Objective-C
7
star
28

libobjc

C
7
star
29

libs-sqlclient

The SQLClient library is designed to provide a simple interface to SQL databases for GNUstep applications.
Objective-C
7
star
30

libs-mobile

Stub UIKit.
Makefile
7
star
31

libs-gdl2

The GNUstep Database Library 2 (GDL2) is a set of libraries to map Objective-C objects to rows of relational database management systems (RDBMS). It aims to be compatible with Enterprise Objects Framework (EOF) as released with WebObjects 4.5 from Apple Inc.
Objective-C
7
star
32

tests-examples

GNUstep Examples directory
Objective-C
6
star
33

tools-scripts

The purpose of these scripts is to simplify GNUstep installation and dependency management.
Shell
6
star
34

plugins-themes-nesedahrik

Nesedah Theme with Rik icons
Makefile
6
star
35

apps-easydiff

GNUstep's diff software.
Objective-C
6
star
36

gnustep.github.io

GNUstep website hosted on GitHub
HTML
6
star
37

plugins-themes-narcissusrik

Narcissus theme with Rik icons
5
star
38

libs-steptalk

StepTalk is a scripting framework for creating scriptable servers or applications.
Objective-C
5
star
39

android-examples

Examples showing the use of the android-toolchain with ObjectiveC
CMake
5
star
40

tools-pbxbuild

DEPRECATED! This tool converts XCode(tm) projects into GNUmakefiles and builds them.
Objective-C
5
star
41

plugins-themes-WinUXTheme

Win32 native widgets theme for GNUstep.
Objective-C
4
star
42

libs-audiotoolbox

Skeleton code for Audiotoolbox.
Makefile
4
star
43

libs-ruby

RIGS stands for Ruby Interface for GNUstep. It is a package allowing integration between Ruby and Objective-C/GNUstep. The main purpose of RIGS is to allow the use the GNUstep development environment from Ruby.
Ruby
4
star
44

apps-themepreview

A little window with several widgets of a gnustep theme. I use it to do a ThemePreview file that I would include in the theme resources.
Objective-C
3
star
45

themes

GNUstep themes
Makefile
3
star
46

icons-rik

Some Icons and App_Wrappers for GNUstep and GWorkspace to be used with the Rik.theme
Shell
3
star
47

gnustep-webpages

GNUstep experimental website
CSS
3
star
48

tools-packaging

Packaging modern GNUstep for Linux Distributions for Debian
Shell
3
star
49

libs-java

JIGS stands for Java Interface for GnuStep. It is a package allowing integration between Java and Objective-C. The main purpose of JIGS is to allow Java programmers to use the GNUstep libraries from Java.
Objective-C
3
star
50

libs-gscoredata

GNUstep's implementation of Core Data
Objective-C
3
star
51

libs-ec

Enterprise Control Configuration and Logging
Objective-C
3
star
52

libs-gsldap

gsldap is a library which use open ldap (www.openldap.org) C libraries to provide an Objective-C interface to access LDAP Servers
Objective-C
3
star
53

libs-coreimage

Stub project: Core Image
Objective-C
2
star
54

apps-gsldapwebexplorer

GSLDAPWebExplorer is a LDAP Web Browser using GNUstepWeb (www.gnustepweb.org) and GSLDAP (see GNUstep dev-libs).
Objective-C
2
star
55

tools-model-main

nib2gmodel is a tool developed for GNUstep which converts Apple/NeXT OpenStep 4.x and MacOSX nib files to a GNUstep gmodel file.
Shell
2
star
56

plugins-session

freedesktop.org session files for WindowMaker+GNUstep environment.
Shell
2
star
57

libs-ppd

This package contains PPD files for various printers for use with GNUstep.
Makefile
2
star
58

libs-smbkit

SMBKit.
Objective-C
2
star
59

plugins-gs-emacs

GNUstep plugin for Emacs
Emacs Lisp
2
star
60

libs-gscrypt

DEPRECATED! Old crypto code for GNUstep.
Objective-C
2
star
61

tools-bridge

Tools geared towards generation of metadata for easing the development of bridging between languages. This doesn't presume any garbage collection of any sort. It only generates data for use in making such things possible.
Objective-C
2
star
62

libs-palettes

Gorm palettes.
Objective-C
2
star
63

gitsvn-scripts

Scripts used to convert GNUstep from Subversion to Git.
Shell
2
star
64

xibparser

Objective-C
2
star
65

libs-guile

The gnustep_guile library lets you use (and extend) the GNUstep libraries from within Guile.
Objective-C
2
star
66

license

C
2
star
67

libs-gsantlr

gsantlr library contains classes needed by code generated with ANTLR ObjC Code Generator
Objective-C
2
star
68

core

Contains references to core libraries for convenience: libs-gui, libs-base, libs-make, libs-back
Shell
2
star
69

tools-xctest

Objective-C
2
star
70

tools-charsets

Utilities for use with NSCharacterSet bitmap files.
Objective-C
2
star
71

libs-buildkit

Stub project: Buildkit.
Objective-C
2
star
72

libs-corenetwork

The GNUstep CoreNetwork Library is a library of network-oriented stream C objects.
C
2
star
73

plugins-deprecated

**DEPRECATED** This will be replaced by repos for individual projects.
Objective-C
1
star
74

libs-ucsdata

The GNUstep Unicode Character Set Data Library is a small library which loads the contents of the file UnicodeData.txt into a set of Objective C objects.
Objective-C
1
star
75

xib2coder

Objective-C
1
star
76

tests-gormtest

Tests for GORM.
Objective-C
1
star
77

libs-sysconfig

Stub: SystemConfiguration framework.
Objective-C
1
star
78

NSLayoutConstraint_test

Objective-C
1
star
79

documentation

Aggregated documentation for the new doc website (WIP)
1
star
80

apps-nfsmanager

Objective-C
1
star
81

tests-palettetest

Tests for GORM palettes.
Objective-C
1
star
82

webkit-cef

Objective-C
1
star
83

libs-mica

Implementation of CoreGraphics on top of AppKit. A thin layer to aid porting, for a complete framework implementation, use Opal instead
Objective-C
1
star
84

libs-gsgd

gsgd is an Objc interface to libgd library. libgd is a library to create PNG and Jpeg images.
Objective-C
1
star
85

tests-retaincount

A simple test which shows the retain count after .gorm loading.
Makefile
1
star
86

tools-gormtool

Objective-C
1
star
87

tools-startup

GNUstep Startup is a set of scripts to automatically build and install the core GNUstep system. You can run it at any time: before, during, and after you have installed GNUstep.
Shell
1
star
88

tools-xibanalyzer

This is a metatool for examining XIB file structure and generating a set of files to parse the structure.
Objective-C
1
star
89

tools-installers

Installers for GNUstep, primarily NSIS installers for Windows.
NSIS
1
star
90

libs-av

Implementation of the AVFoundation library based on avformat/ffmpeg libraries
Objective-C
1
star
91

plugins-themes

Themes other than the GTK/Windows theme which aren't specific to a particular OS or Windowing system.
Makefile
1
star
92

tools-nfmake

Objective-C
1
star
93

tools-windows-development-installer

DEPRECATED: Use NSIS-based installers from the 'tools-installers' repository. GNUstep development installer for Windows.
Perl
1
star
94

libs-webservices

The WebServer library contains a collection of classes to be used for creating client and server 'web service' applications
Objective-C
1
star