About mulle-objc

This is for the community interested in mulle-objc.

mulle-objc is a new way to run Objective-C code on various platforms, based on a new compiler and a new runtime.

[Tell me more about mulle-objc and its technical background]

mulle-objc goals

mulle-objc politics

At the moment mulle-objc runs on Linux and on OS X (and FreeBSD). If you look at it in the long term, there is nothing that prevents it from running on Windows or Android or any other OS, that's 32 bit or more. As long as there is C and clang compiles for it, Objective-C works too. If your code is compatible with mulle-objc it has gained, by the mere existence of this project, portability and longevity and therefore worth.

Install mulle-objc

PlatformStateInstallation methods
OS XWorksmanual, homebrew
LinuxWorksmanual (RPM, DEB for compiler)
FreeBSDAssumed to be workingmanual
WindowsAssumed to be brokenmanual
mulle-objc should build OK with Visual Studio on Windows, but tests may fail.

Install mulle-objc with homebrew on OS X

First install homebrew for OS X. Then install all released community packages and the compiler:
brew install mulle-objc/software/mulle-objc-developer

Install mulle-objc manually

Install the compiler mulle-clang. After this you need to install mulle-bootstrap and mulle-build. Now you can build and install the community packages:
mulle-install --prefix /usr/local --branch release https://github.com/mulle-objc/mulleobjc
Checkout the Wiki for an example install into a ubuntu/trusty docker.

Hello World

As a first step after installing, here is the canonical "Hello World" example, with a twist: it's using the new `.aam` extension (`.m` is not gone):
cat <<EOF > hello-world.aam
#import <MulleObjC/MulleObjC.h>

@implementation Foo : NSObject

- (void) print
   printf( "Hello World\n");


int  main( int argc, char *argv[])
   Foo  *foo;

   foo = [Foo new];
   [foo print];

   return( 0);
build it with:
mulle-clang -o hello-world hello-world.aam -lMulleObjCStandalone  # linux: -ldl -lpthread

I did the Hello World, what now ?

Explore what's available

  1. Check out the debuging facilities with MULLE_OBJC_TRACE_ENABLED=YES ./hello-world
  2. Check out method search tracing with MULLE_OBJC_TRACE_METHOD_SEARCHES=YES ./hello-world
  3. Modify the program to dump the runtime as HTML pages. Add mulle_objc_dump_runtime_as_html_to_directory( "/tmp") to the end of your program.
  4. Modify the program to dump the runtime as GraphViz. Add mulle_objc_runtime_dump_graphviz_to_file( "/tmp/foo.dot") to the end of your program.
  5. Build it with -O0, -O1, -O2, how does the assembler code change ?
  6. Explore the examples in MulleObjC/tests

Become part of the community

The compiler is a fork of clang. One of the main goals of a community would be to integrate the compiler changes back into the mainline of clang. For that "Evidence of a significant user community" is one of the requirements.

Also it would be nice to lobby mulle-objc into the homebrew mainline, so that homebrew would be motivated to fix some of its own bugs.

Therefore, if you care about the project, it is important for you to become a member:

Community links