WELCOME TO THE INTERNET
Developed by sulfasTor

I decided to learn rust so I tried to write a sed replacement in sed.

Learning rust by implementing sed

According to wikipedia: Rust is a general-purpose programming language emphasizing performance, type safety, and concurrency. It enforces memory safety, meaning that all references point to valid memory. It does so without a traditional garbage collector; instead, memory safety errors and data races are prevented by the “borrow checker”, which tracks the object lifetime of references at compile time.

I started to look at Rust Book which is the official documentation to learn Rust.

My sed implementation is very basic but it can handle s (substitution) and y (transliteration) commands and some flags. Implementing other important flags is on my radar but no planned soon. I want to work on other rust project which includes embeddings and Raspberry Pi Pico.

Example

echo "foo is not bar but bar is foo" | sed-rust 's/foo/bar/g'

You can find code here: https://github.com/sulfasTor/sed-rust.git