From 0f6066d698b006c933683e0dd8874df7da9290f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Thu, 27 Aug 2015 14:29:20 -0400 Subject: [PATCH] contrib/objcwrapper: intro README.md file MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/objcwrapper/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 contrib/objcwrapper/README.md diff --git a/contrib/objcwrapper/README.md b/contrib/objcwrapper/README.md new file mode 100644 index 0000000..b33a682 --- /dev/null +++ b/contrib/objcwrapper/README.md @@ -0,0 +1,31 @@ +Generator of Nit extern classes to wrap Objective-C services. + +# Description + +_objcwrapper_ is a tool to help access Objective-C classes and methods from Nit. +It generates Nit code composed of extern classes and extern methods from the Objective-C FFI. +The code should be valid Nit, but it may need some tweaking by hand before use. + +_objcwrapper_ takes as input preprocessed Objective-C header files. +This preprocessing is usually done by combinig (or piping) calls to: +`gcc -E`, `header_keeper` and `header_static`. +See the check rules in the Makefile for example preprocessing. + +# Usage + +1. Compile _objcwrapper_ with: `make` + +2. Compile the wrapper `NSArray.nit` from the preprocessed header `NSArray.h` with: + + ~~~ + bin/objcwrapper -o NSArray.h NSArray.h + ~~~ + +3. Import the generated module as usual from any Nit program. + It is not recommended to modify the generated file directly, + but you can redef the generated classes from other modules. + +# See also + +_jwrapper_ is the inspiration for this tool. +It generate wrappers to access Java services from Nit. -- 1.7.9.5