From 00350d5f8ceee2670360d93fbe5e0ec8429df641 Mon Sep 17 00:00:00 2001 From: Ribbon Date: Thu, 12 Mar 2026 13:58:28 -0300 Subject: [PATCH] Migrate remaining demo recipes to Cargo data types --- recipes/wip/demos/pix-engine/recipe.toml | 25 ++++++++++++----- recipes/wip/demos/pixels/recipe.toml | 14 +++++----- recipes/wip/demos/rain/recipe.toml | 7 ++--- recipes/wip/demos/rapier/recipe.toml | 12 ++++----- recipes/wip/demos/rend3/recipe.toml | 7 ++--- recipes/wip/demos/renderling/recipe.toml | 7 ++--- recipes/wip/demos/reticulum-rs/recipe.toml | 11 ++++---- recipes/wip/demos/rootvg/recipe.toml | 7 ++--- recipes/wip/demos/rpt/recipe.toml | 21 ++++++++++----- recipes/wip/demos/rsille/recipe.toml | 26 ++++++------------ recipes/wip/demos/rui/recipe.toml | 29 ++++++++++++++------ recipes/wip/demos/ruscii/recipe.toml | 10 +++---- recipes/wip/demos/rustubble/recipe.toml | 21 +++++++++------ recipes/wip/demos/rustui/recipe.toml | 14 +++++----- recipes/wip/demos/servo-gtk/recipe.toml | 7 ++--- recipes/wip/demos/simdjson-rs/recipe.toml | 7 ++--- recipes/wip/demos/slint/recipe.toml | 21 ++++++++++----- recipes/wip/demos/soft-ratatui/recipe.toml | 7 ++--- recipes/wip/demos/speedy2d/recipe.toml | 11 ++++---- recipes/wip/demos/spinners/recipe.toml | 14 +++++----- recipes/wip/demos/spinoff/recipe.toml | 11 ++++---- recipes/wip/demos/tachyonfx/recipe.toml | 11 ++++---- recipes/wip/demos/taffy/recipe.toml | 7 ++--- recipes/wip/demos/termtree/recipe.toml | 7 ++--- recipes/wip/demos/three-d/recipe.toml | 31 ++++++++++++++++------ recipes/wip/demos/uniocr/recipe.toml | 10 +++---- recipes/wip/demos/usfx/recipe.toml | 11 ++++---- recipes/wip/demos/vizia/recipe.toml | 17 ++++++------ recipes/wip/demos/wavy/recipe.toml | 12 +++++---- recipes/wip/demos/xilem/recipe.toml | 7 ++--- 30 files changed, 217 insertions(+), 185 deletions(-) diff --git a/recipes/wip/demos/pix-engine/recipe.toml b/recipes/wip/demos/pix-engine/recipe.toml index d5aaf0f0c..ccacaeca9 100644 --- a/recipes/wip/demos/pix-engine/recipe.toml +++ b/recipes/wip/demos/pix-engine/recipe.toml @@ -3,7 +3,24 @@ git = "https://github.com/lukexor/pix-engine" shallow_clone = true [build] -template = "custom" +template = "cargo" +cargoexamples = [ + "maze", + "2d_raycasting", + "3d_raycasting", + "asteroids", + "colors", + "fluid_simulation", + "gui", + "hello_world", + "image", + "light", + "matrix", + "shapes", + "textures", + "tree", + "windows", +] dependencies = [ "sdl2", "sdl2-image", @@ -11,9 +28,3 @@ dependencies = [ "sdl2-ttf", "sdl-gfx", ] -script = """ -DYNAMIC_INIT -cookbook_cargo_examples maze 2d_raycasting 3d_raycasting \ -asteroids colors fluid_simulation gui hello_world image \ -light matrix shapes textures tree windows -""" diff --git a/recipes/wip/demos/pixels/recipe.toml b/recipes/wip/demos/pixels/recipe.toml index ec637e695..c3130afee 100644 --- a/recipes/wip/demos/pixels/recipe.toml +++ b/recipes/wip/demos/pixels/recipe.toml @@ -3,9 +3,11 @@ git = "https://github.com/parasyte/pixels" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages conway invaders minimal-egui \ -minimal-winit tiny-skia-winit -""" +template = "cargo" +cargopackages = [ + "conway", + "invaders", + "minimal-egui", + "minimal-winit", + "tiny-skia-winit", +] diff --git a/recipes/wip/demos/rain/recipe.toml b/recipes/wip/demos/rain/recipe.toml index 2ec43f257..10f4c39e7 100644 --- a/recipes/wip/demos/rain/recipe.toml +++ b/recipes/wip/demos/rain/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/saschagrunert/rain" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples demo -""" +template = "cargo" +cargoexamples = ["demo"] diff --git a/recipes/wip/demos/rapier/recipe.toml b/recipes/wip/demos/rapier/recipe.toml index cae50ae1c..a9939ffd1 100644 --- a/recipes/wip/demos/rapier/recipe.toml +++ b/recipes/wip/demos/rapier/recipe.toml @@ -3,9 +3,9 @@ git = "https://github.com/dimforge/rapier" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages rapier-examples-2d rapier-examples-3d \ -rapier-examples-3d-f64 -""" +template = "cargo" +cargopackages = [ + "rapier-examples-2d", + "rapier-examples-3d", + "rapier-examples-3d-f64", +] diff --git a/recipes/wip/demos/rend3/recipe.toml b/recipes/wip/demos/rend3/recipe.toml index 17a06ea9e..55a85a8f7 100644 --- a/recipes/wip/demos/rend3/recipe.toml +++ b/recipes/wip/demos/rend3/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/BVE-Reborn/rend3" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages rend3-examples-package -""" +template = "cargo" +cargopackages = ["rend3-examples-package"] diff --git a/recipes/wip/demos/renderling/recipe.toml b/recipes/wip/demos/renderling/recipe.toml index 178c6516d..16fa47630 100644 --- a/recipes/wip/demos/renderling/recipe.toml +++ b/recipes/wip/demos/renderling/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/schell/renderling" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages example -""" +template = "cargo" +cargopackages = ["example"] diff --git a/recipes/wip/demos/reticulum-rs/recipe.toml b/recipes/wip/demos/reticulum-rs/recipe.toml index 97f0cf818..55cf1a1dc 100644 --- a/recipes/wip/demos/reticulum-rs/recipe.toml +++ b/recipes/wip/demos/reticulum-rs/recipe.toml @@ -4,8 +4,9 @@ git = "https://github.com/BeechatNetworkSystemsLtd/Reticulum-rs" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples tcp_client kaonic_client -""" +template = "cargo" +cargoexamples = [ + "tcp_client", + "kaonic_client", +] +dev-dependencies = ["protobuf"] diff --git a/recipes/wip/demos/rootvg/recipe.toml b/recipes/wip/demos/rootvg/recipe.toml index f2ef09e8f..e73fafcd1 100644 --- a/recipes/wip/demos/rootvg/recipe.toml +++ b/recipes/wip/demos/rootvg/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/MeadowlarkDAW/rootvg" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples demo -""" +template = "cargo" +cargoexamples = ["demo"] diff --git a/recipes/wip/demos/rpt/recipe.toml b/recipes/wip/demos/rpt/recipe.toml index 09d72696d..d2b94fe72 100644 --- a/recipes/wip/demos/rpt/recipe.toml +++ b/recipes/wip/demos/rpt/recipe.toml @@ -3,10 +3,17 @@ git = "https://github.com/ekzhang/rpt" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples basic cylinder fractal_spheres \ -fractal_teapots glass marbles metal rustacean sphere \ -spheres teapot -""" +template = "cargo" +cargoexamples = [ + "basic", + "cylinder", + "fractal_spheres", + "fractal_teapots", + "glass", + "marbles", + "metal", + "rustacean", + "sphere", + "spheres", + "teapot", +] diff --git a/recipes/wip/demos/rsille/recipe.toml b/recipes/wip/demos/rsille/recipe.toml index cdeb85f12..63263715c 100644 --- a/recipes/wip/demos/rsille/recipe.toml +++ b/recipes/wip/demos/rsille/recipe.toml @@ -3,21 +3,11 @@ git = "https://github.com/nidhoggfgg/rsille" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples anime-mix obj-mix cube cube-colorful -recipe="$(basename "${COOKBOOK_RECIPE}")" - for example in imgille - do - "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}/Cargo.toml" \ - --example "${example}" \ - --release \ - --features=img - mkdir -pv "${COOKBOOK_STAGE}/usr/bin" - cp -v \ - "target/${TARGET}/${build_type}/examples/${example}" \ - "${COOKBOOK_STAGE}/usr/bin/${recipe}_${example}" - done -""" +template = "cargo" +cargoflags = ["--features=img"] +cargoexamples = [ + "anime-mix", + "obj-mix", + "cube", + "cube-colorful", +] diff --git a/recipes/wip/demos/rui/recipe.toml b/recipes/wip/demos/rui/recipe.toml index 67d5fba9c..215aa8887 100644 --- a/recipes/wip/demos/rui/recipe.toml +++ b/recipes/wip/demos/rui/recipe.toml @@ -3,11 +3,24 @@ git = "https://github.com/audulus/rui" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages calculator synth -cookbook_cargo_examples action background basic canvas \ -counter counter2 font_size gallery list menu shapes slider \ -text_editor toggle -""" +template = "cargo" +cargopackages = [ + "calculator", + "synth", +] +cargoexamples = [ + "action", + "background", + "basic", + "canvas", + "counter", + "counter2", + "font_size", + "gallery", + "list", + "menu", + "shapes", + "slider", + "text_editor", + "toggle", +] diff --git a/recipes/wip/demos/ruscii/recipe.toml b/recipes/wip/demos/ruscii/recipe.toml index 400e6012d..b4eb74dca 100644 --- a/recipes/wip/demos/ruscii/recipe.toml +++ b/recipes/wip/demos/ruscii/recipe.toml @@ -3,8 +3,8 @@ git = "https://github.com/lemunozm/ruscii" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples pong space_invaders -""" +template = "cargo" +cargoexamples = [ + "pong", + "space_invaders", +] diff --git a/recipes/wip/demos/rustubble/recipe.toml b/recipes/wip/demos/rustubble/recipe.toml index 259672c2b..9d4609c9b 100644 --- a/recipes/wip/demos/rustubble/recipe.toml +++ b/recipes/wip/demos/rustubble/recipe.toml @@ -3,11 +3,16 @@ git = "https://github.com/warpy-ai/rustubble" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples list_example menu_list_example \ -progress_bar_example spinner_example stopwatch_example \ -table_example text_area_example text_input_example \ -timer_example viewport_example -""" +template = "cargo" +cargoexamples = [ + "list_example", + "menu_list_example", + "progress_bar_example", + "spinner_example", + "stopwatch_example", + "table_example", + "text_area_example", + "text_input_example", + "timer_example", + "viewport_example", +] diff --git a/recipes/wip/demos/rustui/recipe.toml b/recipes/wip/demos/rustui/recipe.toml index a5b0deeae..f66d51738 100644 --- a/recipes/wip/demos/rustui/recipe.toml +++ b/recipes/wip/demos/rustui/recipe.toml @@ -3,9 +3,11 @@ git = "https://github.com/broccolingual/rustui" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples hello_world colors inputs file_reader -cookbook_cargo_packages tetris -""" +template = "cargo" +cargopackages = ["tetris"] +cargoexamples = [ + "hello_world", + "colors", + "inputs", + "file_reader", +] diff --git a/recipes/wip/demos/servo-gtk/recipe.toml b/recipes/wip/demos/servo-gtk/recipe.toml index 1a32ba039..7a7cd092b 100644 --- a/recipes/wip/demos/servo-gtk/recipe.toml +++ b/recipes/wip/demos/servo-gtk/recipe.toml @@ -3,11 +3,8 @@ git = "https://github.com/nacho/servo-gtk" shallow_clone = true [build] -template = "custom" +template = "cargo" +cargoexamples = ["browser"] dependencies = [ "gtk4" ] -script = """ -DYNAMIC_INIT -cookbook_cargo_examples browser -""" diff --git a/recipes/wip/demos/simdjson-rs/recipe.toml b/recipes/wip/demos/simdjson-rs/recipe.toml index 385d27fa1..8cff50949 100644 --- a/recipes/wip/demos/simdjson-rs/recipe.toml +++ b/recipes/wip/demos/simdjson-rs/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/simd-lite/simd-json" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples perf -""" +template = "cargo" +cargoexamples = ["perf"] diff --git a/recipes/wip/demos/slint/recipe.toml b/recipes/wip/demos/slint/recipe.toml index 8a3708720..472f19836 100644 --- a/recipes/wip/demos/slint/recipe.toml +++ b/recipes/wip/demos/slint/recipe.toml @@ -3,10 +3,17 @@ git = "https://github.com/slint-ui/slint" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages gallery energy-monitor carousel \ -memory imagefilter plotter opengl_underlay opengl_texture \ -maps virtual_keyboard 7guis -""" +template = "cargo" +cargopackages = [ + "gallery", + "energy-monitor", + "carousel", + "memory", + "imagefilter", + "plotter", + "opengl_underlay", + "opengl_texture", + "maps", + "virtual_keyboard", + "7guis", +] diff --git a/recipes/wip/demos/soft-ratatui/recipe.toml b/recipes/wip/demos/soft-ratatui/recipe.toml index 2fee98520..d1e27a140 100644 --- a/recipes/wip/demos/soft-ratatui/recipe.toml +++ b/recipes/wip/demos/soft-ratatui/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/gold-silver-copper/soft_ratatui" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages egui_colors_example -""" +template = "cargo" +cargopackages = ["egui_colors_example"] diff --git a/recipes/wip/demos/speedy2d/recipe.toml b/recipes/wip/demos/speedy2d/recipe.toml index 42de4fa7d..f910fffb5 100644 --- a/recipes/wip/demos/speedy2d/recipe.toml +++ b/recipes/wip/demos/speedy2d/recipe.toml @@ -3,8 +3,9 @@ git = "https://github.com/QuantumBadger/Speedy2D" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples animation hello_world moving_text -""" +template = "cargo" +cargoexamples = [ + "animation", + "hello_world", + "moving_text", +] diff --git a/recipes/wip/demos/spinners/recipe.toml b/recipes/wip/demos/spinners/recipe.toml index d99ca635f..0517f05d5 100644 --- a/recipes/wip/demos/spinners/recipe.toml +++ b/recipes/wip/demos/spinners/recipe.toml @@ -3,9 +3,11 @@ git = "https://github.com/FGRibreau/spinners" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples cycle simple stop_persist \ -stop_symbol timer -""" +template = "cargo" +cargoexamples = [ + "cycle", + "simple", + "stop_persist", + "stop_symbol", + "timer", +] diff --git a/recipes/wip/demos/spinoff/recipe.toml b/recipes/wip/demos/spinoff/recipe.toml index 6b06f8ea1..2ba09e28e 100644 --- a/recipes/wip/demos/spinoff/recipe.toml +++ b/recipes/wip/demos/spinoff/recipe.toml @@ -3,8 +3,9 @@ git = "https://github.com/ad4mx/spinoff" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples simple stop_and_persist stream -""" +template = "cargo" +cargoexamples = [ + "simple", + "stop_and_persist", + "stream", +] diff --git a/recipes/wip/demos/tachyonfx/recipe.toml b/recipes/wip/demos/tachyonfx/recipe.toml index 716935e96..642207eed 100644 --- a/recipes/wip/demos/tachyonfx/recipe.toml +++ b/recipes/wip/demos/tachyonfx/recipe.toml @@ -3,8 +3,9 @@ git = "https://github.com/junkdog/tachyonfx" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples basic-effects open-window tweens -""" +template = "cargo" +cargoexamples = [ + "basic-effects", + "open-window", + "tweens", +] diff --git a/recipes/wip/demos/taffy/recipe.toml b/recipes/wip/demos/taffy/recipe.toml index 9b28c45c4..9d4ea39ee 100644 --- a/recipes/wip/demos/taffy/recipe.toml +++ b/recipes/wip/demos/taffy/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/DioxusLabs/taffy" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples basic -""" +template = "cargo" +cargoexamples = ["basic"] diff --git a/recipes/wip/demos/termtree/recipe.toml b/recipes/wip/demos/termtree/recipe.toml index dd6c6203a..fa4388054 100644 --- a/recipes/wip/demos/termtree/recipe.toml +++ b/recipes/wip/demos/termtree/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/rust-cli/termtree" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples tree -""" +template = "cargo" +cargoexamples = ["tree"] diff --git a/recipes/wip/demos/three-d/recipe.toml b/recipes/wip/demos/three-d/recipe.toml index 9b2f62225..d0b6ec668 100644 --- a/recipes/wip/demos/three-d/recipe.toml +++ b/recipes/wip/demos/three-d/recipe.toml @@ -3,14 +3,29 @@ git = "https://github.com/asny/three-d" shallow_clone = true [build] -template = "custom" +template = "cargo" +cargoexamples = [ + "animation", + "environment", + "fireworks", + "fog", + "forest", + "image", + "instanced_shapes", + "lighting", + "lights", + "logo", + "mandelbrot", + "multiwindow", + "pbr", + "shapes", + "shapes2d", + "sprites", + "statues", + "terrain", + "texture", + "triangle", +] dependencies = [ "openssl3", ] -script = """ -DYNAMIC_INIT -cookbook_cargo_examples animation environment fireworks \ -fog forest image instanced_shapes lighting lights logo \ -mandelbrot multiwindow pbr shapes shapes2d sprites statues \ -terrain texture triangle -""" diff --git a/recipes/wip/demos/uniocr/recipe.toml b/recipes/wip/demos/uniocr/recipe.toml index d52658f39..34630936e 100644 --- a/recipes/wip/demos/uniocr/recipe.toml +++ b/recipes/wip/demos/uniocr/recipe.toml @@ -3,11 +3,11 @@ git = "https://github.com/mediar-ai/uniOCR" shallow_clone = true [build] -template = "custom" +template = "cargo" +cargoexamples = [ + "basic", + "batch_processing", +] dependencies = [ "openssl3", ] -script = """ -DYNAMIC_INIT -cookbook_cargo_examples basic batch_processing -""" diff --git a/recipes/wip/demos/usfx/recipe.toml b/recipes/wip/demos/usfx/recipe.toml index 5280d1279..0249b4ea2 100644 --- a/recipes/wip/demos/usfx/recipe.toml +++ b/recipes/wip/demos/usfx/recipe.toml @@ -3,12 +3,13 @@ git = "https://github.com/tversteeg/usfx" shallow_clone = true [build] -template = "custom" +template = "cargo" +cargoexamples = [ + "cpal", + "music", + "sdl2", +] dependencies = [ "libalsa", "sdl2", ] -script = """ -DYNAMIC_INIT -cookbook_cargo_examples cpal music sdl2 -""" diff --git a/recipes/wip/demos/vizia/recipe.toml b/recipes/wip/demos/vizia/recipe.toml index e7de869a6..14fb4f295 100644 --- a/recipes/wip/demos/vizia/recipe.toml +++ b/recipes/wip/demos/vizia/recipe.toml @@ -3,11 +3,12 @@ git = "https://github.com/vizia/vizia" shallow_clone = true [build] -template = "custom" -#dependencies = [ -# "libwayland", -#] -script = """ -DYNAMIC_INIT -cookbook_cargo_examples animation dragdrop number input timers -""" +template = "cargo" +cargoexamples = [ + "animation", + "dragdrop", + "number", + "input", + "timers", +] +#dependencies = ["libwayland"] diff --git a/recipes/wip/demos/wavy/recipe.toml b/recipes/wip/demos/wavy/recipe.toml index 5b5bcc30b..0817d56e2 100644 --- a/recipes/wip/demos/wavy/recipe.toml +++ b/recipes/wip/demos/wavy/recipe.toml @@ -3,8 +3,10 @@ git = "https://github.com/ardaku/wavy" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples monitor play query record -""" +template = "cargo" +cargoexamples = [ + "monitor", + "play", + "query", + "record", +] diff --git a/recipes/wip/demos/xilem/recipe.toml b/recipes/wip/demos/xilem/recipe.toml index 08ac1a8a0..f58daeeeb 100644 --- a/recipes/wip/demos/xilem/recipe.toml +++ b/recipes/wip/demos/xilem/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/linebender/xilem" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples components -""" +template = "cargo" +cargoexamples = ["components"]