News for hackers. Stuff that matters.
Re:Cloudflare Workers: Run JavaScript Service Workers at the... by kentonv on Friday September 29, 2017 @10:29AM (#15365562)
V8's API is C++. While bindings exist in other languages, they don't always expose everything and don't always keep up with V8's frequent API changes. I felt it was essential that we bind closely to V8, being able to use all of its features, and that we be able to track closely to the latest stable release.

Also, I personally have decades of experience in C++ and wasn't sure this should be the project where I work on learning Rust.

That said, I love Rust and highly encourage more people to use it.

Re:Cloudflare Workers: Run JavaScript Service Workers at the... by chrismorgan on Friday September 29, 2017 @11:05AM (#15365916)
That’s about what I expected; thanks.

Just for reference for people reading this: rust-bindgen can produce bindings to C++ code these days, though that gets you an unsafe library; you’d want to build another thin layer on top of it to nail down the ownership semantics so that you can provide a safe interface.

Re:Cloudflare Workers: Run JavaScript Service Workers at the... by comex on Friday September 29, 2017 @09:04PM (#15370550)
bindgen’s C++ support is better than it used to be, but still pretty limited, e.g. no support for inline functions, or their moral equivalent, methods defined within a class definition (which most C++ code has a ton of). And even if it works, to quote the documentation:

> using [C++] types in Rust will be nowhere near as nice as using them in C++. You will have to manually call constructors, destructors, overloaded operators, etc yourself.

source: https://github.com/rust-lang-nursery/rust-bindgen/blob/maste...

Re:Cloudflare Workers: Run JavaScript Service Workers at the... by tmccrmck on Friday September 29, 2017 @11:03PM (#15370980)
Thanks. Sometimes I feel like the "just use X" folks don't really think about the problem at hand, not to mention how trivializing it can be. And this is coming from a Rust fan and someone who uses bindgen.
Re:Cloudflare Workers: Run JavaScript Service Workers at the... by steveklabnik on Friday September 29, 2017 @01:04PM (#15367020)
https://www.neon-bindings.com/ is written by Dave Herman, you might find it interesting to play with :)