summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xsrc/generator.ml28
-rw-r--r--src/guestfs.pod16
3 files changed, 40 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 484b9470..37fb73ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,7 @@ config.log
config.status
config.sub
configure
+csharp/
daemon/actions.h
daemon/guestfsd
daemon/guestfsd.exe
diff --git a/src/generator.ml b/src/generator.ml
index 3bc8d6f1..adccf9e8 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -9928,6 +9928,34 @@ and generate_csharp () =
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;
diff --git a/src/guestfs.pod b/src/guestfs.pod
index 30759602..c959d236 100644
--- a/src/guestfs.pod
+++ b/src/guestfs.pod
@@ -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
-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.
@@ -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.
+=item B<C#>
+
+The C# bindings are highly experimental. Please read the warnings
+at the top of C<csharp/Libguestfs.cs>.
+
=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>