Page 1 of 1

Rust bindings for the BWAPI

Posted: Mon Apr 10, 2017 4:56 pm
by 0x7cfe
Hello everyone,

I with my friend had just started an attempt to create idiomatic bindings to BWAPI for the upcoming language Rust.

We would like to ask the community, what would be the best way to link to BWAPI. AFAIK there are Java, Type Safe Java, C# and Python bindings. 
Do we need to create a wrapping layer from scratch or there exist some kind of an intermediate API that may be reused?

Rust does fine with C and under some circumstances with C++, but that's a tough question. There are binding generators that translate C++ into Rust but our goal is to create idiomatic and type safe API, so that's probably not an option. Still, we would like to hear any ideas or suggestions.

P.S.: If you're interested, feel free contacting us at https://github.com/RnDome/bwapi-rs

Re: Rust bindings for the BWAPI

Posted: Wed Apr 19, 2017 12:00 pm
by IMP
we have discussed this "live" already by now. Therefore just for reference / archive purpose:

We are working on a type-safe API for Java called BWAPI4J at https://github.com/OpenBW/BWAPI4J, which you can use as reference.
The binding is done manually, as opposed to e.g. bwmirror, which uses a generator.

Most binding code is here: https://github.com/OpenBW/BWAPI4J/blob/ ... Bridge.cpp

Also be aware that BWAPI 4.2 is about to be released. The change notes are here: https://github.com/bwapi/bwapi/wiki/Changes

Great initiative to add Rust to the family of supported languages! ^^ :)