
It did fall short for us in one key area: We were hoping WebAssembly would take us further in the browser and our browser extension than it has. Additionally, we constructed a substantial localization implementation to meet the requirements of our products. It has great documentation and an active community.Īlthough there are countless crates available for use, we did have to roll our own logging and tracing tools to ensure that they were safe to use in 1Password. The language itself has been designed with modern sensibilities and is improving with every release. We’ve been able to deploy it to nearly every one of our target platforms in some way shape or form (with the exception of Apple Watch). Rust has fulfilled 90% of what we were hoping for when we started this project.

Alternative to 1password 7 code#
We use this to great effect in our Rust code for things like calling out to the native implementations of biometric unlock (Touch ID, Face ID, Windows Hello) and platform-specific settings implementations like NSUserDefaults on Apple platforms. While safe native Rust libraries for everything are the dream (and they will come in time), there is always the option to dip down and easily consume something in C or from native platform libraries. The batteries-included test framework that Rust and Cargo also include mean that you always have an easy way to write unit-test suites for correct behavior in critical code, like any cryptographic functions that you write.

There is also a wonderful system in place for keeping track of vulnerabilities that do show up from time to time in Rust crates: the RustSec database, which is community-sourced by other Rust developers and is updated frequently with new information that can be consumed in CI audit scans. As I mentioned above, writing with Rust itself gives you much greater confidence in your memory usage and makes it much harder to accidentally introduce a memory-related exploit into your application. There are two large, prominent cryptography platforms ( ring and the Rust Crypto group) that together provide a wealth of functionality.

There is more than enough to build a majority of the base that security-centered applications require. This allows our devs to focus on solving problems without having to hand-roll boilerplate code to communicate over the FFI. Once our types are defined in Rust, we are able to immediately generate equivalent types in our client-side languages. This tool has been an integral component in our development process, allowing us to move much more quickly than ever before. We’ve integrated this tool into our continuous integration server as well, meaning that changes to the Rust models can result in compilation failures in the client applications that are caught during our review process. We get all of this while enjoying the benefits of compile-time type checking in every one of our target languages.
Alternative to 1password 7 free#
The output from this tool handles the serialization/deserialization process automatically, meaning our client-side devs can continue to work in their language of choice while interacting with the Rust library and can be free from the concerns of JSON parsing over the foreign function interface (FFI). 🙂Īnother very powerful (and often overlooked) feature of Rust is its procedural macro system, which has allowed us to write a tool that automatically shares types defined in Rust with our client-side languages (Swift, Kotlin, and TypeScript). It may not be what you want but it will be “correct”. If it compiles, you can be fairly sure it won’t exhibit unexpected behaviour. Rust requires very little runtime debugging compared to other languages. Having to perform less runtime state validation leads to cleaner, more efficient, more focused, and higher quality code. Carefully aligning application logic with Rust’s strong type rules makes APIs difficult to use incorrectly and results in simpler code that’s free from runtime checking of constraints and invariants the compiler can guarantee there are no invalid runtime code paths that will lead your program astray before it executes. The strong type system enforces these rules at compile-time. Rust offers a form of “program correctness” and many guarantees against undefined behaviour at runtime. There is a significant performance benefit to the lack of a traditional runtime we don’t have to worry about the overhead of a garbage collector, for instance.

Beyond memory safety, though, there’s so much more we love about the Rust ecosystem. One of the main things that drew us to Rust initially was the memory safety it definitely excites us knowing that Rust helps us maximize our confidence in the safety of our customers’ secrets.
