First install cargo-mobile2
cargo install cargo-mobile2
Then install and add the Android SDK and NDK for your platform to your path.
Start by creating a new crate and adding the required dependencies:
full_url = fn -> | |
port = case @port do | |
80 -> | |
"" | |
_ -> | |
":" <> Integer.to_string(@port) | |
end | |
"http://" <> conn.host <> port <> "/" <> short_url | |
end |
use std::io::prelude::*; | |
use std::net::{TcpListener, TcpStream}; | |
use std::thread; | |
fn main() { | |
let listener = TcpListener::bind("127.0.0.1:6667").unwrap(); | |
for stream in listener.incoming() { | |
thread::spawn(move || { | |
handle_client(stream.unwrap()); |
@Composable | |
public static final void A(final int x, final int y, @Nullable Composer $composer, final int $changed) { | |
$composer = $composer.startRestartGroup(-1513727942); | |
ComposerKt.sourceInformation($composer, "C(A)32@866L4,33@875L4:MainActivity.kt#ptgicz"); | |
int $dirty = $changed; | |
if (($changed & 14) == 0) { | |
$dirty = $changed | ($composer.changed(x) ? 4 : 2); | |
} | |
if (($changed & 112) == 0) { |
use dioxus::prelude::*; | |
use log::LevelFilter; | |
fn app(cx: Scope) -> Element { | |
render!(div { | |
onscroll: |_| todo!(), | |
width: "200px", | |
height: "200px", | |
overflow: "scroll", |
#[allow(non_snake_case)] | |
fn App() -> Element { | |
{ | |
dioxus_core::internal::verify_component_called_as_component(App); | |
{ | |
let mut data = use_signal(|| <[_]>::into_vec( | |
#[rustc_box] | |
::alloc::boxed::Box::new([ | |
<[_]>::into_vec( |
First install cargo-mobile2
cargo install cargo-mobile2
Then install and add the Android SDK and NDK for your platform to your path.
Start by creating a new crate and adding the required dependencies:
use std::{ | |
cell::{RefCell, UnsafeCell}, | |
mem, | |
ops::Deref, | |
}; | |
fn main() { | |
let c = Component::new(app); | |
let mut scope = Scope::new(c); | |
scope.run(); |
The graphical user interface (GUI) is the cornerstone of most modern applications. It is often the main interface to use a computer program, providing a bridge from your software to someone out there in the world. Therefore, to best represent our hard-earned application logic, a GUI should be responsive, robust, and accessible.
So let's use Rust, a modern language for efficient and robust software! Well...
I've been working on open-source Rust projects for about 8 years now,
{ | |
"program": "aztecs-bench", | |
"arguments": ["/home/matt/Documents/aztecs/dist-newstyle/build/x86_64-linux/ghc-9.10.1/aztecs-0.7.0/b/aztecs-bench/build/aztecs-bench/aztecs-bench", "iter", "exes"], | |
"rts_arguments": ["-pj"], | |
"end_time": "Mon Feb 24 17:13 2025", | |
"initial_capabilities": 0, | |
"total_time": 10.34, | |
"total_ticks": 10339, | |
"tick_interval": 1000, | |
"total_alloc":50298465544, |