The small app below records which checks you have reviewed. It gives the native build a real interactive screen to launch, but does not pretend that a checkbox can inspect the host's SDK.
Replace the normal src/lib.rs as well as the screen, keeping the generated src/main.rs. The marked state belongs to the checklist and resets when the app restarts; the package manager remains the authority for what is installed.
{"id":"fission-tabs-1","tabs":[{"index":0,"label":"src/app.rs","value":"src-app-rs"},{"index":1,"label":"src/lib.rs","value":"src-lib-rs"},{"index":2,"label":"src/translations.rs","value":"src-translations-rs"},{"index":3,"label":"i18n/en-US.yaml","value":"i18n-en-us-yaml"},{"index":4,"label":"i18n/es-ES.yaml","value":"i18n-es-es-yaml"},{"index":5,"label":"preview/lib.rs","value":"preview-lib-rs"}]}
{"id":"fission-tabs-1","index":0,"label":"src/app.rs","value":"src-app-rs"}
use fission::prelude::*;
fission_component! {
pub ToolchainChecklist<()> {
state {
tools_checked: bool = false,
runtime_checked: bool = false,
targets_checked: bool = false,
}
}
view(setup, _state, cx) {
let tokens = &cx.view.env().theme.tokens;
let reviewed = [setup.tools_checked, setup.runtime_checked, setup.targets_checked]
.iter().filter(|checked| **checked).count();
} =>
Container(SafeArea(child: Scroll(child: Container(
Column(gap: tokens.spacing.m, children: [
Text(cx.tr("setup.title")).size(tokens.typography.heading2_size),
Text(cx.tr("setup.summary")).color(tokens.colors.text_secondary),
Text(cx.tr("setup.manual")).weight(tokens.typography.font_weight_semibold),
Divider(),
Checkbox(
checked: setup.tools_checked,
label: Some(cx.tr("setup.tools.check")),
semantics_identifier: Some("setup.tools".into()),
bind(on_toggle): to(setup.tools_checked),
),
Text(cx.tr("setup.tools.detail")),
Checkbox(
checked: setup.runtime_checked,
label: Some(cx.tr("setup.runtime.check")),
semantics_identifier: Some("setup.runtime".into()),
bind(on_toggle): to(setup.runtime_checked),
),
Text(cx.tr("setup.runtime.detail")),
Checkbox(
checked: setup.targets_checked,
label: Some(cx.tr("setup.targets.check")),
semantics_identifier: Some("setup.targets".into()),
bind(on_toggle): to(setup.targets_checked),
),
Text(cx.tr("setup.targets.detail")),
Divider(),
Text(cx.tr("setup.reviewed").replace("{count}", &reviewed.to_string())),
Text(cx.tr("setup.scope")).color(tokens.colors.text_secondary),
])
).padding_all(tokens.spacing.l)
.width_length(Length::percent(100.0))
.max_width(680.0))))
.height_length(Length::vh(100.0))
}
{"id":"fission-tabs-1","index":1,"label":"src/lib.rs","value":"src-lib-rs"}
mod app;
mod translations;
use fission::prelude::*;
#[cfg(not(any(target_arch = "wasm32", target_os = "android", target_os = "ios")))]
pub fn run_desktop() -> anyhow::Result<()> {
DesktopApp::<(), _>::new(app::ToolchainChecklist)
.with_env(translations::create_env())
.run()
}
#[cfg(any(target_os = "android", target_os = "ios"))]
fn mobile_app() -> MobileApp<(), app::ToolchainChecklist> {
let app = MobileApp::<(), _>::new(app::ToolchainChecklist)
.with_env(translations::create_env())
.with_title("Toolchain checklist");
#[cfg(target_os = "android")]
let app = app.with_test_control_port(48761);
app
}
#[cfg(any(target_os = "android", target_os = "ios"))]
pub fn run_mobile() -> anyhow::Result<()> { mobile_app().run() }
#[cfg(target_os = "android")]
#[no_mangle]
fn android_main(app_handle: AndroidApp) {
let _ = mobile_app().run_with_android_app(app_handle);
}
#[cfg(target_arch = "wasm32")]
#[wasm_bindgen::prelude::wasm_bindgen(start)]
pub fn run_web() -> Result<(), wasm_bindgen::JsValue> {
console_error_panic_hook::set_once();
WebApp::<(), _>::new(app::ToolchainChecklist)
.with_env(translations::create_env())
.with_title("Toolchain checklist")
.run()
.map_err(|error| wasm_bindgen::JsValue::from_str(&error.to_string()))
}
{"id":"fission-tabs-1","index":2,"label":"src/translations.rs","value":"src-translations-rs"}
use std::collections::HashMap;
use fission::i18n::{Locale, TranslationBundle};
use fission::prelude::*;
pub fn create_env() -> Env {
let mut env = Env::default();
env.locale = Locale::from("en-US");
for (locale, source) in [
("en-US", include_str!("../i18n/en-US.yaml")),
("es-ES", include_str!("../i18n/es-ES.yaml")),
] {
let messages: HashMap<String, String> =
serde_yaml::from_str(source).expect("checked-in setup translations");
env.i18n.add_bundle(TranslationBundle { locale: Locale::from(locale), messages });
}
env
}
{"id":"fission-tabs-1","index":3,"label":"i18n/en-US.yaml","value":"i18n-en-us-yaml"}
setup.title: "Android development checklist"
setup.summary: "Keep track of the checks you have run in your own terminal."
setup.manual: "Mark these only after reviewing the command output."
setup.tools.check: "SDK root and command-line tools found"
setup.tools.detail: "Run sdkmanager --version and review ANDROID_HOME before installing packages."
setup.runtime.check: "Platform and build tools installed"
setup.runtime.detail: "Review sdkmanager --list_installed for the platform and build-tools versions you intend to use."
setup.targets.check: "NDK installed and doctor checked"
setup.targets.detail: "Inspect the installed NDK and run fission doctor android from this project."
setup.reviewed: "{count} of 3 checks marked"
setup.scope: "This is a manual checklist, not a toolchain diagnostic. Your marks are local to this session; reloading clears them."
{"id":"fission-tabs-1","index":4,"label":"i18n/es-ES.yaml","value":"i18n-es-es-yaml"}
setup.title: "Lista de desarrollo para Android"
setup.summary: "Anota las comprobaciones que has ejecutado en tu propio terminal."
setup.manual: "Marca cada casilla tras revisar la salida del comando."
setup.tools.check: "Raíz del SDK y herramientas encontradas"
setup.tools.detail: "Ejecuta sdkmanager --version y revisa ANDROID_HOME antes de instalar paquetes."
setup.runtime.check: "Plataforma y herramientas de compilación instaladas"
setup.runtime.detail: "Revisa sdkmanager --list_installed y las versiones de plataforma y herramientas previstas."
setup.targets.check: "NDK instalado y diagnóstico revisado"
setup.targets.detail: "Inspecciona el NDK instalado y ejecuta fission doctor android en este proyecto."
setup.reviewed: "{count} de 3 comprobaciones marcadas"
setup.scope: "Esta lista es manual; no diagnostica las herramientas. Las marcas son locales a la sesión y se borran al recargar."
{"id":"fission-tabs-1","index":5,"label":"preview/lib.rs","value":"preview-lib-rs"}
mod app;
mod translations;
use fission::prelude::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen(start)]
pub fn run() -> Result<(), JsValue> {
console_error_panic_hook::set_once();
WebApp::<(), _>::new(app::ToolchainChecklist)
.with_env(translations::create_env())
.with_title("Toolchain checklist")
.mount("#fission-web-mount")
.run()
.map_err(|error| JsValue::from_str(&error.to_string()))
}
{"id":"fission-tabs-1"}