A research project exploring the feasibility of running Blade graphics library on mobile platforms, with a focus on Android support.
This project investigates the current state of Rust on Android and explores the technical requirements for porting Blade - a lean GPU abstraction library - to mobile platforms. Blade is currently used in projects like Zed editor and provides cross-platform graphics capabilities across Vulkan, Metal, and OpenGL ES3.
gpui-mobile/
├── vendor/
│ ├── blade/ # Blade graphics library
│ └── zed/ # Zed editor source
├── research/ # Research documentation
│ └── rust-on-android.md
└── README.md # This file
- Research Rust on Android: Deep dive into the current state of Rust development for Android
- Blade Mobile Compatibility: Assess what's needed to get Blade running on mobile platforms
- Technical Feasibility: Document challenges and potential solutions
- Proof of Concept: Create a working example if feasible
- Research Rust on Android ecosystem
- Analyze Blade's architecture for mobile compatibility
- Identify required modifications
- Create proof of concept
According to Blade's documentation:
- Vulkan: Supported on desktop Linux, Windows, and Android
- Metal: Supported on desktop macOS and iOS
- OpenGL ES3: Supported on the Web
This suggests that Blade already has some level of mobile support through Vulkan (Android) and Metal (iOS).
For Android specifically:
- Rust toolchain with Android targets
- Android NDK
- JNI bindings for Android integration
- Surface management for rendering
- Input handling
See the research/ directory for detailed investigations on:
- Rust on Android - Current state, tooling, and best practices
- Blade mobile adaptation requirements
- Performance considerations
- Platform-specific challenges
- Rust toolchain (1.65+)
- Android Studio and NDK (for Android development)
- Xcode (for iOS development)
- Clone the repository with submodules:
git clone --recursive https://github.com/yourusername/gpui-mobile.git
cd gpui-mobile- Install Rust Android targets:
rustup target add aarch64-linux-android
rustup target add armv7-linux-androideabi
rustup target add x86_64-linux-android- Set up Android development environment:
export ANDROID_HOME=$HOME/Android/Sdk
export NDK_HOME=$ANDROID_HOME/ndk/[version]This is a research project. Contributions in the form of:
- Additional research
- Code experiments
- Documentation improvements
- Bug reports
are all welcome!
This research project follows the licensing of its vendored dependencies:
- Blade is licensed under MIT
- Zed is licensed under multiple licenses (check vendor/zed for details)