[Gmsh] Rust bindings experiment

Max Orok morok at mevex.com
Fri Jul 26 21:59:49 CEST 2019


Hello everyone,

I was thinking about a set of Rust bindings for the Gmsh C API (v4.4) and
made a very raw set using the bindgen tool:
https://github.com/mxxo/gmsh-sys

For a more idiomatic Rust API, I'll be following the re-implementation of
the C++ API in C (gmsh.h_cwrap) as a guide.

The naming for Rust's package manager is first come first serve (and
undeleteable), so I thought I'd see if there were any objections to
registering a "gmsh-sys" low-level C binding crate and a "gmsh" idiomatic
Rust API crate.

On the one hand, bindgen automatically generated Rust wrappers for Gmsh's C
header, so it could theoretically be part of the build pipeline and
included in the main repo. On the other hand, there may not be a huge
appetite for Rust support among Gmsh's users, especially compared to C++
and Python. My impression is using Rust for scientific codes is a bit of an
ongoing experiment.

On the maintenance side, packaging up an unofficial library crate for
distribution might be an interesting possibility without Gmsh having to
explicitly support yet another language API using the generator, especially
with the semantic differences for things like error handling.

Please let me know if you have any comments or suggestions.

Have a nice weekend!

Max
-- 
Max Orok
Contractor
www.mevex.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190726/27d2de33/attachment.html>


More information about the gmsh mailing list