Skip to Content
Tooling

Tooling crash course

TaskKotlin/GradleRust/Cargo
New projectIDE / gradle initcargo new my_app
Build./gradlew buildcargo build (--release for optimized)
Run./gradlew runcargo run
Test./gradlew testcargo test
Add dependencyedit build.gradlecargo add serde (edits Cargo.toml)
Formatktlint / spotlesscargo fmt (rustfmt — one canonical style)
Lintdetektcargo clippy — genuinely excellent, run it constantly
DocsDokkacargo doc --open
REPLKotlin REPLnone official; use play.rust-lang.org

clippy is the single best learning tool — it suggests idiomatic rewrites. Install everything via rustup (the toolchain manager, like sdkman for Rust).

Write tests inline, in the same file:

#[cfg(test)] mod tests { use super::*; #[test] fn it_adds() { assert_eq!(add(2, 2), 4); } }
Last updated on