AIShell
AI Shell is a simple GUI-based terminal application built with Rust š¦ and the iced āļø GUI library. It allows users to enter shell commands š» and view the output within a graphical interface š„ļø.
Install / Use
/learn @Shubham0850/AIShellREADME
AI Shell š

AI Shell is a simple GUI-based terminal application built with Rust š¦ and the iced āļø GUI library. It allows users to enter shell commands š» and view the output within a graphical interface š„ļø.
Why Rust ?
Here's an updated table focusing on the Size aspect, incorporating typical application sizes:
| Aspect | Rust | C++ | Go | Python (PyInstaller) | Java (JAR files) | Electron (JavaScript) | |-------------|--------------------------------------------------------|------------------------------------------------------|------------------------------------------------------|------------------------------------------------------|------------------------------------------------------|------------------------------------------------------| | Size | - ~8.3 MB (as in your app)<br>- Produces small, standalone binaries without large runtimes | - ~10-15 MB<br>- Can produce small binaries but may require manual optimization | - ~10-20 MB<br>- Includes garbage collector, slight overhead | - ~20-30 MB<br>- Requires bundling interpreter and libraries | - ~50-100 MB<br>- Requires JVM, adds overhead | - ~50-150 MB<br>- Includes Chromium and Node.js runtime, leading to large sizes |
Key Takeaways:
-
Rust's Small Binary Size: Your 8.3MB application showcases Rust's efficiency in producing compact binaries, which is especially beneficial for distribution, faster downloads, and reduced storage requirements.
-
Comparison with Other Frameworks:
- Python: Applications bundled with tools like PyInstaller often exceed 20 MB because they need to include the Python interpreter and all dependencies.
- Java: Java applications require the Java Virtual Machine (JVM), adding significant overhead and increasing the overall size.
- Electron: Apps built with Electron can easily exceed 50 MB because they bundle a Chromium browser and Node.js runtime.
-
No Need for Large Runtimes: Rust compiles directly to machine code, eliminating the need for a virtual machine or interpreter at runtime, which contributes to smaller application sizes.
Features āØ
- Command Execution: Enter shell commands š» and view their output in a scrollable window š.
- Graphical User Interface: Built using the
icedāļø library for a modern and responsive GUI š„ļø. - Splash Screen: Displays a splash screen š on startup.
- Custom Application Icon: Includes a custom icon š¼ļø when running on macOS š.
Technologies Used š ļø
- Rust š¦: A systems programming language focused on safety š”ļø and performance š.
- Version:
1.56or later (edition 2021)
- Version:
- iced āļø: A cross-platform GUI library for Rust, inspired by Elm š³.
- Version:
0.12.1 - Features Used:
canvasšØtokioā”
- Version:
- cargo-bundle š¦: A tool for bundling Rust applications into distributable formats.
- Used to create a macOS š application bundle (
.app) with a custom icon š¼ļø.
- Used to create a macOS š application bundle (
- winit šŖ: A window handling library in Rust.
- Used indirectly through
icedāļø for window management and setting the application icon š¼ļø.
- Used indirectly through
Project Structure šļø
ai_shell/
āāā Cargo.toml
āāā resources/
ā āāā AppIcon.icns # Application icon š¼ļø for macOS bundling
ā āāā icon.png # Icon image š¼ļø used in the application
ā āāā splash.png # Splash screen image š (optional)
āāā src/
āāā executor.rs # Module handling command execution š»
āāā main.rs # Main application code š„ļø
Building and Running šļø
-
Clone the Repository š„:
git clone https://github.com/shubham0850/AIShell.git cd AIShell -
Build the Application š ļø:
cargo build -
Run the Application ā¶ļø:
cargo runFor development with live reloading ā»ļø:
cargo install cargo-watch cargo watch -x run -
Build the Application for Distribution š¦:
cargo install cargo-bundle # Install cargo-bundle if not already installed cargo bundle --release # Build and bundle the applicationThis command will create a bundled application in the
target/release/bundle/directory, including a macOS.appbundle with the custom icon š¼ļø specified inCargo.toml.
License š
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments š
- Thanks to the iced āļø community for providing an excellent GUI library for Rust š¦.
Contact š¬
- Author: Shubham Raj
- Email: rajshubham0850@gmail.com
- GitHub: Shubham0850
- LinkedIn: Shubham Raj
Feel free to customize this README to better suit your project. Include any additional sections or information that you think would be helpful for users and contributors.
