Rust bindings

Greg Hellings <[email protected]>
Newsgroups gmane.comp.literature.sword.devel
Message-ID <CAHxvOVJO5t4Lo=BNsfRbA2SvvvXaSzV+XL4tu6XCxgyFXSks+A@mail.gmail.com>
More for the fun of my own, personal enjoyment I spent this evening
tackling a Rust binding for the Sword library. I doubt it will go much of
anywhere, but I was able to get it to a point where it will instantiate an
SWMgr, list the installed modules, return a specific module, allow you to
set the module key (by text only), and retrieve the stripped text of the
module entry.

To prove it was doing the thing I thought, I added a little CLI that does
exactly that - iterate all installed modules, try setting them to a random
verse in John 3:1-20, and print the stripText results to the console.

If you're curious about what the code looks like:
https://src.thehellings.com/greg/sword_rs

This was pretty much just an excuse to learn how to link Rust and C++. It's
probably ugly on both sides of the FFI boundary, but it works!

--Greg

_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.