📱

Read on Your E-Reader

Thousands of readers get articles like this delivered straight to their Kindle or Boox. New articles arrive automatically.

Learn More

This is a preview. The full article is published at news.ycombinator.com.

Build Android apps using Rust and Iced

Build Android apps using Rust and Iced

By IbaryshnikovHacker News: Front Page

There are NativeActivity and GameActivity examples here. Based on several other examples: na-mainloop and agdk-mainloop from android-activity na-winit-wgpu from rust-android-examples integration from iced iced integration example You can also run most of the examples from iced. For this omit the scene rendering part and set the background of the root container. Text input partially works, unresolved issues: window doesn't resize on show/hide soft keyboard how to change input language of soft keyboard ime is not supported Copy/paste and show/hide soft keyboard is implemented by calling Java Check android-activity crate for detailed instructions. During my tests I was running the following command and using android studio afterwards: export ANDROID_NDK_HOME="path/to/ndk" export ANDROID_HOME="path/to/sdk" rustup target add x86_64-linux-android cargo install cargo-ndk cargo ndk -t x86_64 -o app/src/main/jniLibs/ build My setup is the following: archlinux 6.9.6 jdk-openjdk 22 target api 35 Thanks to android-activity we can already build android apps in Rust, and key crates such as winit and wgpu also support building for android. iced doesn't support android out of the box, but it can be integrated with existing graphics pipelines, as shown in integration example. As a result, it was possible to convert existing example running winit + wgpu to use iced on top.

Preview: ~201 words

Continue reading at Hacker News

Read Full Article

More from Hacker News: Front Page

Subscribe to get new articles from this feed on your e-reader.

View feed

This preview is provided for discovery purposes. Read the full article at news.ycombinator.com. LibSpace is not affiliated with Hacker News.

Build Android apps using Rust and Iced | Read on Kindle | LibSpace