contrib/objcwrapper: intro README.md file
authorAlexis Laferrière <alexis.laf@xymus.net>
Thu, 27 Aug 2015 18:29:20 +0000 (14:29 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 27 Aug 2015 19:26:50 +0000 (15:26 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/objcwrapper/README.md [new file with mode: 0644]

diff --git a/contrib/objcwrapper/README.md b/contrib/objcwrapper/README.md
new file mode 100644 (file)
index 0000000..b33a682
--- /dev/null
@@ -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.