<iframe src="//www.googletagmanager.com/ns.html?id=GTM-KXSCJR" height="0" width="0" style="display:none;visibility:hidden">

Josh Chase

Recent Posts

Prevoty Labs: Rust and Java

Josh Chase | Nov 15, 2016

TL;DR Call Rust from Java using this crate.

Lately, there's been a lot of buzz around Mozilla's relatively new language, Rust. For the unfamiliar, it's a systems programming language that fills the same niche as C or C++ while adding strong memory safety guarantees, a powerful hygienic macro system, first-class function closures, and a type system directly influenced by Haskell - all without requiring a garbage collector. These properties make it an excellent language choice for large projects where security and performance are main concerns.

All of this sounds great for new project development, but what about programs that we’ve already written? Traditionally, if one needed to get more performance out of a high-level language, program bottlenecks could be replaced with bindings to a feature equivalent C library. Fortunately for us, Rust supports compiling to a shared object and presenting a C-compatible interface with no runtime overhead. Since many of the world’s programs run on Java, it's a prime candidate for a low barrier-to-entry FFI helper library.

Continue reading

Topics: Prevoty Technology, Prevoty Labs, rust, java, JNI, Programming Languages

Subscribe to Email Updates