Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh very cool. Maybe I should spend some more time looking into those. Thanks for pointing that out!


No problem. Some links to get you started:

* https://crates.io/crates/bindgen (generate Rust FFI from headers)

* https://crates.io/crates/cbindgen (the inverse of bindgen)

* https://cxx.rs/ (a similar tool to bindgen, newer)


That's it right there. You may have just won me over by pointing these out. It's just so hard to go back to writing bindings mostly by hand instead of the other way around. I've generated thousands of bindings for all sorts of things, so it's really critical to my work.

Thanks again, Steve. And for all your patience, too.


For what it's worth, I think it's great that you are willing to at least reconsider the pros/cons of Rust when presented to you, even if it's not enough to change your mind.

I believe your issue with the "Rust hype" is that your pain points are different from the pain points of many other Rust users, and when they tell you that Rust is great for reasons A, B, C, you say to yourself, "so what?" But maybe you'd find Rust useful for less often cited reasons X, Y, Z, and you'll like it once you use it in earnest. Maybe you won't, and Rust isn't for you. And that's okay, too.

Also, kudos to Steve. I sincerely admire your politeness and patience when confronted with less polite, less patient posts. You're probably the best ambassador the Rust community could have.


Yeah, I think you hit the nail on the head.

I think the biggest thing I'm worried about from my end is I just work with so much C and C++ I can't attempt to do programming that takes away from being productive. I don't have the hours for it. I don't recall the Rusts docs yelling out to me, "Don't forget! C FFI bindings can be generated!" But at least Steve was able to point out some libs to me that would help with my work.

I'm OK with a small productivity hit because learning something new will always entail that, but the long term benefits need to be there. I'm almost always more worried about shipping than I am about anything technical.

That being said I think I can see some benefits over the horizon. In C and C++ land, there are a lot of people who don't use std or boost for one reason or another, and I've worked in circles where I had exposure to that type of programming. Honestly, just the fact that I might be able to rely on Rust's libraries OOTB could be a productivity gain right there.

I have the "Hello, World!" rust app on my workstation, so I've given it a small try. I'd be curious to see how other powerful concepts like threading work in Rust, but that's reading I've got to do.

It's difficult trying to sort out threading concerns from Lua, another language I use frequently, since the most common distributions aren't thread-safe without some work. I'd be interested in seeing what a Rust + Lua software integration could look like, since that might be a successor to the C work I do now.


there’s a number of Lua bindings, but some of the semantics are indeed very tough. The game dev community is maintaining the most famous bindings https://github.com/amethyst/rlua/issues/174




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: