My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

NObjective bridge to Objective-C provides the necessary classes to develop and run .NET applications which interact with Objective-C frameworks and libraries under Mac OS X with high performance and reliability.

Description:
  • High-performance solution with minimal cpu/memory overheads compared to similar bridges ( Monobjc, Mobjc, Cocoa# )
  • Huge library of automatically generated proxies around Objective-C classes
    • More than 2300 classes and 23000 methods can be used directly from your .NET code
    • Proxies are generated using Objective-C introspection. Using .h files parsing provides more natural method signatures.
    • Generates essential enums and structs
    • Also proxies can be generated without C header files
  • Transparent cross-runtime exception rethrowing
    • from managed to unmanaged world
    • from unmanaged to managed world
  • Easy access to major Mac OS X frameworks and libraries
    • Ability to generate Objective-C proxies for any framework
    • Ability to build your own types that can be used inside Cocoa
  • Combines flexibility of managed and power of unmanaged code to achieve highest performance
    • Deep integration with Objective-C runtime
    • Ships with x86/ppc UB library
  • Used special coding style which provides exellent perception
  • Client applications can be written in some .NET language ( C#, VB.NET, etc )
  • Works with the most popular versions of OS X:
    • MacOS Tiger 10.4 ( x86/ppc )
      • about 2000 classes and 20000 methods are available
    • MacOS Leopard 10.5 ( x86/ppc )
      • about 2300 classes and 23000 methods are available
    • MacOS Snow Leopard 10.6 ( x86 )
      • about 2300 classes and 23000 methods are available
  • Open Source, Free Software

Notes:

  • Library aimed on mature Objective-C developers so if something will not work.. use Objective-C before shout that the bridge sucks.
  • Library doesn't provide any tools to simplify your build process on Mac.

Planned features:

  • Create hierarchy for property accessors.
  • Add Property synthezation for exported classes.
  • Add Ivars accessors for generated proxies.
  • Add bitset accessors for generated structs.
  • Reduce metadata size after fixing P/Invoke layer for vararg calls in Mono.

Also you can make project better!

  • Useful patches are welcomed!
  • Ask mono team to implement value type inheritance properly in compiler (it should not able to create such inheritance from C# code, but able to work with such structs referenced from assemblies ) and execution engine. Currently it behaviour differs from MS implementation. With such feature Proxy Dlls will about 4 times smaller. But Novell customers not interested in fast and efficient bindings (compatible on IL level with MS CLR) so it would be trouble.
  • Ask mono team to implement 'arglist' and related keywords in compiler and execution engine - it will reduce metadata size for native calls. Mono team don't like refactoring ( need to refactor P/Invoke layer for vararg calls ) so it would be trouble.

Results of simple performance benchmark:

1) Mac Pro ( Intel Xeon ) OS X 10.6.2

Jack$ ./run_leopard_tests.sh 

Mono JIT compiler version 2.6.3 (tarball Wed Mar 10 18:18:12 MST 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
	TLS:           normal
	GC:            Included Boehm (with typed GC)
	SIGSEGV:       normal
	Notification:  Thread + polling
	Architecture:  x86
	Disabled:      none

NObjective v0.9.6.0 results:
Invocations per second: 7342143
Allocations per second: 4179728
Vararg invocations per second: 36452
Protected calls per second: 224517
Exception rethrows per second: 28563
Managed memory consumption (KiB): 472
Unmanaged memory consumption (KiB): 19076

Monobjc v2.0.492.0 results:
Invocations per second: 1128158
Allocations per second: 119183
Vararg invocations per second: 20386
Managed memory consumption (KiB): 14876
Unmanaged memory consumption (KiB): 44860

mobjc v0.7.0.0 results:
Invocations per second: 73379
Allocations per second: 17912
Protected calls per second: 16635
Exception rethrows per second: 913
Managed memory consumption (KiB): 1384
Unmanaged memory consumption (KiB): 115772

cocoa-sharp v1.9.0.0 results:
Invocations per second: 47828
Allocations per second: 10930
Vararg invocations per second: 2531
Managed memory consumption (KiB): 29072
Unmanaged memory consumption (KiB): 71344

Note: vararg calls not implemented in mobjc

Note: cross-runtime exception rethrowing not supported by monobjc/cocoa#

2) Mac Pro ( Intel Xeon ) OS X 10.5.8

./run_leopard_tests.sh 

Mono JIT compiler version 2.6.3 (tarball Wed Mar 10 18:18:12 MST 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
	TLS:           normal
	GC:            Included Boehm (with typed GC)
	SIGSEGV:       normal
	Notification:  Thread + polling
	Architecture:  x86
	Disabled:      none

NObjective v0.9.6.0 results:
Invocations per second: 6731740
Allocations per second: 4285408
Vararg invocations per second: 36170
Protected calls per second: 217997
Exception rethrows per second: 29442
Managed memory consumption (KiB): 476
Unmanaged memory consumption (KiB): 16008

Monobjc v2.0.492.0 results:
Invocations per second: 1206709
Allocations per second: 129954
Vararg invocations per second: 20877
Managed memory consumption (KiB): 14116
Unmanaged memory consumption (KiB): 42220

mobjc v0.7.0.0 results:
Invocations per second: 72914
Allocations per second: 21188
Protected calls per second: 16732
Exception rethrows per second: 804
Managed memory consumption (KiB): 1364
Unmanaged memory consumption (KiB): 61484

cocoa-sharp v1.9.0.0 results:
Invocations per second: 48668
Allocations per second: 10461
Vararg invocations per second: 2459
Managed memory consumption (KiB): 29092
Unmanaged memory consumption (KiB): 65548

3) PowerMac G4 1GHz OS X 10.5.8

./run_leopard_tests.sh 

Mono JIT compiler version 2.6.3 (tarball Wed Mar 10 18:31:54 MST 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
	TLS:           normal
	GC:            Included Boehm (with typed GC)
	SIGSEGV:       normal
	Notification:  Thread + polling
	Architecture:  ppc
	Disabled:      none

NObjective v0.9.6.0 results:
Invocations per second: 813504
Allocations per second: 518510
Vararg invocations per second: 5902
Protected calls per second: 26115
Exception rethrows per second: 7383
Managed memory consumption (KiB): 448
Unmanaged memory consumption (KiB): 16360

Monobjc v2.0.492.0 results:

Unhandled Exception: System.ExecutionEngineException: SIGILL
mobjc v0.7.0.0 results:
Invocations per second: 10845
Allocations per second: 5730
Protected calls per second: 2437
Exception rethrows per second: 173
Managed memory consumption (KiB): 1364
Unmanaged memory consumption (KiB): 61948

cocoa-sharp v1.9.0.0 results:
Invocations per second: 8708
Allocations per second: 1778
Vararg invocations per second: 455
Managed memory consumption (KiB): 28484
Unmanaged memory consumption (KiB): 63384

Note Monobjc 2.0.492 didn't work on PowerPC with mono 2.6.3

4) PowerMac G4 1GHz OS X 10.4.11

./run_tiger_tests.sh 

Mono JIT compiler version 2.6.3 (tarball Wed Mar 10 18:31:54 MST 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
        TLS:           normal
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       normal
        Notification:  Thread + polling
        Architecture:  ppc
        Disabled:      none

NObjective v0.9.6.0 results:
Invocations per second: 992999
Allocations per second: 467836
Vararg invocations per second: 3660
Protected calls per second: 28710
Exception rethrows per second: 4167
Managed memory consumption (KiB): 448
Unmanaged memory consumption (KiB): 16344

Monobjc v1.0.492.0 results:

Unhandled Exception: System.ExecutionEngineException: SIGILL
cocoa-sharp v1.9.0.0 results:
Invocations per second: 5673
Allocations per second: 1945
Vararg invocations per second: 444
Managed memory consumption (KiB): 46300
Unmanaged memory consumption (KiB): 95768

Note Monobjc 2.0.492 didn't work on PowerPC with mono 2.6.3

Libraries used:

Contacts:

Email: eugeny.grishul(a)gmail.com

Facebook: http://www.facebook.com/profile.php?id=1038466393
VKontakte: http://vkontakte.ru/id181869

WBR, Eugeny Grishul

Powered by Google Project Hosting