12878 shaares
329 private links
329 private links
Some projects has more value to be written in Rust:
- Rust's safety allow to use complex patterns more safely
- Concurrent or multi-threaded systems
- Security-critical components
There are three approaches for ar Rust migration:
- Full Rewrite
- the codebase is relatively small and the scope is tractable
- there is an exhaustive blackbpx test suite that validates behavior
- the API surface is well defined and stable
- the deployment environment is controlled
- Incremental migration for each module
- all other use cases
- Incremental migration with vertical features: each feature is built from the ground up to use 100% Rust code. Business value can be measured directly.
The incremental migration has its own challenge: FFI with C and C++. The rule of thumb is to keep the code responsible for the memory allocation do the deallocation.