Rust bindings for GNU Octave oct.h

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Rust bindings for GNU Octave oct.h

Cameron Taggart
I've been hacking on Rust bindings for GNU Octave oct.h. I could use some help figuring out how to make bindgen generate valid bindings. I've made decent progress. If you'd like to hack on it, please have a look at:





Reply | Threaded
Open this post in threaded view
|

Re: Rust bindings for GNU Octave oct.h

Jordi Gutiérrez Hermoso-2
On Fri, 2017-04-21 at 00:51 -0500, Cameron Taggart wrote:
> I've been hacking on Rust bindings for GNU Octave oct.h.

I've been toying with D instead, which seems to me a lot easier to
interface with C++, since it has an explicit C++ interface. I haven't
gotten beyond the toying stage, but I do want to say that I really
enjoy D and think we might even start rewriting parts of Octave in D.

- Jordi G. H.



Reply | Threaded
Open this post in threaded view
|

Re: Rust bindings for GNU Octave oct.h

Cameron Taggart
I think I made decent progress trying to get the helloworld to work. I was able to get it to compile, the current problem is I can't get it to link. It has something to do with references from the compiled C++ file:

#include "octhc.h"
// https://github.com/servo/rust-bindgen/issues/714
extern "C" octave_value_list octave_value_list_create() {
return octave_value_list();
}

That file only exists because bindgen can't creating bindings to inline constructors. Would it be possible to expose those for the sake of interopability?

Another possibility is that I'm hitting a bug with support for old gcc versions. Octave 4.2.1 for Windows ships with gcc 4.9.4. Any chance of getting the next version upgraded to gcc 6.3.0?

thanks,
Cameron

On Sun, Apr 23, 2017 at 12:38 AM, Jordi Gutiérrez Hermoso <[hidden email]> wrote:
On Fri, 2017-04-21 at 00:51 -0500, Cameron Taggart wrote:
> I've been hacking on Rust bindings for GNU Octave oct.h.

I've been toying with D instead, which seems to me a lot easier to
interface with C++, since it has an explicit C++ interface. I haven't
gotten beyond the toying stage, but I do want to say that I really
enjoy D and think we might even start rewriting parts of Octave in D.

- Jordi G. H.