C#: Add documentation about experimental nature of these bindings.
authorRichard Jones <rjones@redhat.com>
Mon, 4 Jan 2010 14:51:36 +0000 (14:51 +0000)
committerRichard Jones <rjones@redhat.com>
Mon, 4 Jan 2010 14:52:00 +0000 (14:52 +0000)
.gitignore
src/generator.ml
src/guestfs.pod

index 484b947..37fb73e 100644 (file)
@@ -43,6 +43,7 @@ config.log
 config.status
 config.sub
 configure
 config.status
 config.sub
 configure
+csharp/
 daemon/actions.h
 daemon/guestfsd
 daemon/guestfsd.exe
 daemon/actions.h
 daemon/guestfsd
 daemon/guestfsd.exe
index 3bc8d6f..adccf9e 100755 (executable)
@@ -9928,6 +9928,34 @@ and generate_csharp () =
   let library = "libguestfs.so.0" in
 
   pr "\
   let library = "libguestfs.so.0" in
 
   pr "\
+// These C# bindings are highly experimental at present.
+//
+// Firstly they only work on Linux (ie. Mono).  In order to get them
+// to work on Windows (ie. .Net) you would need to port the library
+// itself to Windows first.
+//
+// The second issue is that some calls are known to be incorrect and
+// can cause Mono to segfault.  Particularly: calls which pass or
+// return string[], or return any structure value.  This is because
+// we haven't worked out the correct way to do this from C#.
+//
+// The third issue is that when compiling you get a lot of warnings.
+// We are not sure whether the warnings are important or not.
+//
+// Fourthly we do not routinely build or test these bindings as part
+// of the make && make check cycle, which means that regressions might
+// go unnoticed.
+//
+// Suggestions and patches are welcome.
+
+// To compile:
+//
+// gmcs Libguestfs.cs
+// mono Libguestfs.exe
+//
+// (You'll probably want to add a Test class / static main function
+// otherwise this won't do anything useful).
+
 using System;
 using System.IO;
 using System.Runtime.InteropServices;
 using System;
 using System.IO;
 using System.Runtime.InteropServices;
index 3075960..c959d23 100644 (file)
@@ -36,8 +36,9 @@ LVs, what filesystem is in each LV, etc.).  It can also run commands
 in the context of the guest.  Also you can access filesystems over FTP.
 
 Libguestfs is a library that can be linked with C and C++ management
 in the context of the guest.  Also you can access filesystems over FTP.
 
 Libguestfs is a library that can be linked with C and C++ management
-programs (or management programs written in OCaml, Perl, Python, Ruby, Java
-or Haskell).  You can also use it from shell scripts or the command line.
+programs (or management programs written in OCaml, Perl, Python, Ruby,
+Java, Haskell or C#).  You can also use it from shell scripts or the
+command line.
 
 You don't need to be root to use libguestfs, although obviously you do
 need enough permissions to access the disk images.
 
 You don't need to be root to use libguestfs, although obviously you do
 need enough permissions to access the disk images.
@@ -480,11 +481,16 @@ You can use the I<guestfs.h> header file from C++ programs.  The C++
 API is identical to the C API.  C++ classes and exceptions are
 not implemented.
 
 API is identical to the C API.  C++ classes and exceptions are
 not implemented.
 
+=item B<C#>
+
+The C# bindings are highly experimental.  Please read the warnings
+at the top of C<csharp/Libguestfs.cs>.
+
 =item B<Haskell>
 
 =item B<Haskell>
 
-This is the only language binding that is incomplete.  Only calls
-which return simple integers have been bound in Haskell, and we are
-looking for help to complete this binding.
+This is the only language binding that working but incomplete.  Only
+calls which return simple integers have been bound in Haskell, and we
+are looking for help to complete this binding.
 
 =item B<Java>
 
 
 =item B<Java>