These are chat archives for rust-lang/rust

26th
Jun 2016
mhsjlw
@mhsjlw
Jun 26 2016 22:51
rust, better for client or server'-
G
woah my keyboard clunked out. Ignore that :P
but yeah, it's probably much better for clients, correct?
Peter Atashian
@retep998
Jun 26 2016 23:20
@mhsjlw Rust works well for both clients and servers
For clients it helps to make a lightweight safe and fast client that your customers will enjoy using, while for the server it makes a safe efficient server so you can serve lots of requests at low cost.
Basically Rust works well anywhere you can use native code
mhsjlw
@mhsjlw
Jun 26 2016 23:23
@retep998 ok, nice.
In this specific situation I need to use a C++ library called 'RakNet'
It can be found here: https://github.com/OculusVR/RakNet
Is it possible to bind or use C++ from Rust?
Peter Atashian
@retep998
Jun 26 2016 23:24
Does RakNet have C bindings?
mhsjlw
@mhsjlw
Jun 26 2016 23:24
No, unfortunately, I'd really like to avoid to write glue code too.
If possible
Peter Atashian
@retep998
Jun 26 2016 23:25
Unfortunately you can't use C++ directly, it has to export C functions to be able to use it from Rust
mhsjlw
@mhsjlw
Jun 26 2016 23:25
I could also rewrite RakNet in Rust, but that wouldn't be too much fun.
Peter Atashian
@retep998
Jun 26 2016 23:25
also unfortunate that the only results for "raknet rust" are about the game Rust using raknet Q_Q
mhsjlw
@mhsjlw
Jun 26 2016 23:25
Ha
yeah, I'm actually looking to do some game dev in Rust with RakNet as the networking engine
ok interesting, I found some RakNet glue
could I possibly make a crate that can compile that glue then use it inside of Rust without any extra steps
just simply install and go?
I'd probably go RakNet -> glue -> Rust RakNet crate
anyway, thanks @retep998
Peter Atashian
@retep998
Jun 26 2016 23:35
Yes, you can have a build script for your crate, which uses the gcc crate to compile the glue
mhsjlw
@mhsjlw
Jun 26 2016 23:36
fantastic, thanks