Development
Rust
What is Rust?
Rust is a systems programming language that is focused on safety, speed, and concurrency. It is designed to be a "safe, concurrent, practical language", supporting functional and imperative-procedural paradigms. Rust is syntactically similar to C++, but is designed to provide better memory safety while maintaining high performance.
Install Rust
macOS
> curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
After installation, ensure Rust is available by checking the version:
> rustc --version
Dioxus
Dioxus is a Rust web framework that is designed to be fast, secure, and easy to use. It is built on top of the Actix Web framework, and provides a simple and intuitive API for building web applications.
Install Dioxus CLI
The dx command is part of the Dioxus CLI, which can be installed via cargo. Run the following command to install it:
> cargo install dioxus-cli
After installation, verify that the dx command is available:
> dx --version
If the dx command is not found, you may need to ensure that the ~/.cargo/bin directory is in your system’s PATH. Add the following line to your shell configuration file (~/.zshrc, ~/.bashrc, or equivalent):
> export PATH="$HOME/.cargo/bin:$PATH"
> source ~/.zshrc # or source ~/.bashrc
Create a New Project
> dx new my_project