Migrate more wip demo recipes to Cargo data types

This commit is contained in:
Ribbon 2026-03-12 11:46:49 -03:00
parent cc6fb284ab
commit 9b9e25841c
22 changed files with 205 additions and 152 deletions

View File

@ -3,9 +3,10 @@
git = "https://github.com/Wayoung7/firework-rs"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_packages firework-rs
cookbook_cargo_examples fountain heart vortex
"""
template = "cargo"
cargopackages = ["firework-rs"]
cargoexamples = [
"fountain",
"heart",
"vortex",
]

View File

@ -3,21 +3,11 @@
git = "https://github.com/ardaku/fonterator"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
recipe="$(basename "${COOKBOOK_RECIPE}")"
examples="main directions image raster"
for example in "${examples}"
do
"${COOKBOOK_CARGO}" build \
--manifest-path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}/Cargo.toml" \
--example "${example}" \
--release \
--features "monospace-font"
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 monospace-font"]
cargoexamples = [
"main",
"directions",
"image",
"raster",
]

View File

@ -3,8 +3,7 @@
git = "https://github.com/aetherknight/fractal-rs"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_packages fractal-piston
"""
template = "cargo"
cargopackages = [
"fractal-piston",
]

View File

@ -3,18 +3,64 @@
git = "https://github.com/marc2332/freya"
shallow_clone = true
[build]
template = "custom"
template = "cargo"
cargoexamples = [
"animated_position",
"animated_tabs",
"animation",
"button",
"camera",
"checkbox",
"clock",
"counter",
"drag",
"drag_drop",
"dynamic_theme",
"file_explorer",
"frameless_window",
"gradient",
"graph",
"highlight",
"image",
"image_viewer",
"images_slideshow",
"infinite_list",
"input",
"keyboard_navigation",
"menu",
"mouse_trace",
"opacity",
"pointer",
"popup",
"position",
"progress_bar",
"radio",
"render_canvas",
"rotate",
"scroll",
"selectable_text",
"sequential_animation",
"shader",
"shader_editor",
"shadow",
"simple_editor",
"speedometer",
"svg",
"tab",
"table",
"text",
"text_editors",
"tic_tac_toe",
"touch",
"ui",
"website",
"window_size",
]
dependencies = [
"openssl3",
"gtk3",
]
script = """
DYNAMIC_INIT
cookbook_cargo_examples animated_position animated_tabs animation \
button camera checkbox clock counter drag drag_drop dynamic_theme \
file_explorer frameless_window gradient graph highlight image image_viewer \
images_slideshow infinite_list input keyboard_navigation menu mouse_trace \
opacity pointer popup position progress_bar radio render_canvas rotate scroll \
selectable_text sequential_animation shader shader_editor shadow simple_editor \
speedometer svg tab table text text_editors tic_tac_toe touch ui website window_size
cookbook_cargo_examples
"""

View File

@ -3,12 +3,20 @@
git = "https://github.com/SamiPerttu/fundsp"
shallow_clone = true
[build]
template = "custom"
template = "cargo"
cargoexamples = [
"beep",
"file",
"grain",
"grain2",
"keys",
"network",
"optimize",
"peek",
"plot",
"sequence",
"type",
]
dependencies = [
"fontconfig",
]
script = """
DYNAMIC_INIT
cookbook_cargo_examples beep file grain grain2 keys network \
optimize peek plot sequence type
"""

View File

@ -3,8 +3,7 @@
git = "https://github.com/SamiPerttu/funutd"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples editor
"""
template = "cargo"
cargoexamples = [
"editor",
]

View File

@ -3,9 +3,6 @@
git = "https://github.com/FyroxEngine/Fyrox-demo-projects"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
COOKBOOK_SOURCE="${COOKBOOK_SOURCE}/ui"
cookbook_cargo_packages executor
"""
template = "cargo"
cargopath = "ui"
cargopackages = ["executor"]

View File

@ -3,8 +3,5 @@
git = "https://git.sr.ht/~ireas/genpdf-rs"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples demo
"""
template = "cargo"
cargoexamples = ["demo"]

View File

@ -3,8 +3,5 @@
git = "https://github.com/alexheretic/gfx-shader-watch"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples watch-shaders
"""
template = "cargo"
cargoexamples = ["watch-shaders"]

View File

@ -3,9 +3,16 @@
git = "https://github.com/ggez/ggez"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples 02_hello_world 04_snake cube \
hello_canvas input_test shader shadows sounds text vertex_shader
"""
template = "cargo"
cargoexamples = [
"02_hello_world",
"04_snake",
"cube",
"hello_canvas",
"input_test",
"shader",
"shadows",
"sounds",
"text",
"vertex_shader",
]

View File

@ -3,8 +3,5 @@
git = "https://github.com/polymonster/hotline"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples triangle
"""
template = "cargo"
cargoexamples = ["triangle"]

View File

@ -1,10 +1,8 @@
#TODO require the "smol" feature flag
#TODO not compiled or tested
[source]
git = "https://github.com/mxinden/if-watch"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo --example if_watch -F smol
"""
template = "cargo"
cargoflags = ["--features smol"]
cargoexamples = ["if_watch"]

View File

@ -3,10 +3,18 @@
git = "https://github.com/ccbrown/iocraft"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples borders calculator counter \
fullscreen hello_world overlap progress_bar scrolling \
table use_input use_output weather
"""
template = "cargo"
cargoexamples = [
"borders",
"calculator",
"counter",
"fullscreen",
"hello_world",
"overlap",
"progress_bar",
"scrolling",
"table",
"use_input",
"use_output",
"weather",
]

View File

@ -3,9 +3,12 @@
git = "https://github.com/tesselode/kira-examples"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_packages dynamic-music ghost-noise metronome \
score-counter spatial-audio simple-sound-playback
"""
template = "cargo"
cargopackages = [
"dynamic-music",
"ghost-noise",
"metronome",
"score-counter",
"spatial-audio",
"simple-sound-playback",
]

View File

@ -3,10 +3,23 @@
git = "https://github.com/sebcrozet/kiss3d"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples camera cube lines multi_windows planar_lines \
points post_processing primitives primitives2d procedural rectangle \
screenshot stereo text texturing ui window
"""
template = "cargo"
cargoexamples = [
"camera",
"cube",
"lines",
"multi_windows",
"planar_lines",
"points",
"post_processing",
"primitives",
"primitives2d",
"procedural",
"rectangle",
"screenshot",
"stereo",
"text",
"texturing",
"ui",
"window",
]

View File

@ -3,9 +3,16 @@
git = "https://github.com/not-fl3/macroquad"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples 3d basic_shapes camera first_person \
particles_example platformer shadertoy snake text ui
"""
template = "cargo"
cargoexamples = [
"3d",
"basic_shapes",
"camera",
"first_person",
"particles_example",
"platformer",
"shadertoy",
"snake",
"text",
"ui",
]

View File

@ -3,8 +3,8 @@
git = "https://github.com/baad-c0de/mage-core"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples basic hello
"""
template = "cargo"
cargoexamples = [
"basic",
"hello",
]

View File

@ -1,26 +1,10 @@
#TODO not compiled or tested
#TODO maybe need a patch to use the sdl2 dependency from redox
[source]
git = "https://github.com/j-g00da/mousefood"
shallow_clone = true
[build]
template = "custom"
template = "cargo"
cargopackages = ["simulator"]
dependencies = [
"sdl2",
]
script = """
DYNAMIC_INIT
recipe="$(basename "${COOKBOOK_RECIPE}")"
for example in simulator
do
"${COOKBOOK_CARGO}" build \
--manifest-path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}/Cargo.toml" \
--example "${example}" \
--release \
--features=simulator
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
cp -v \
"target/${TARGET}/${build_type}/examples/${example}" \
"${COOKBOOK_STAGE}/usr/bin/${recipe}_${example}"
done
"""

View File

@ -3,9 +3,10 @@
git = "https://github.com/Nazariglez/notan"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples renderer_cube draw_path_flower \
game_pong game_of_life
"""
template = "cargo"
cargoexamples = [
"renderer_cube",
"draw_path_flower",
"game_pong",
"game_of_life",
]

View File

@ -3,8 +3,8 @@
git = "https://github.com/cloudflare/pingora"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples server client
"""
template = "cargo"
cargoexamples = [
"server",
"client",
]

View File

@ -3,8 +3,5 @@
git = "https://github.com/lhvy/pipes-rs"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_packages pipes-rs
"""
template = "cargo"
cargopackages = ["pipes-rs"]

View File

@ -3,9 +3,13 @@
git = "https://github.com/pistondevelopers/piston-examples"
shallow_clone = true
[build]
template = "custom"
script = """
DYNAMIC_INIT
cookbook_cargo_examples cube hello_world image multi_window \
shapes snake sprite
"""
template = "cargo"
cargoexamples = [
"cube",
"hello_world",
"image",
"multi_window",
"shapes",
"snake",
"sprite",
]