Learn Velato - 10 Code Examples & CST Typing Practice Test
Velato is a Rust library (crate) that parses and renders Vello-compatible graphics from Lottie JSON animation files, enabling vector animations in Rust applications.
Learn VELATO with Real Code Examples
Updated Nov 26, 2025
Code Sample Descriptions
Hello World in Velato
[MIDI-BASED] The 'Hello World' program is represented as a sequence of notes. For example, middle C (C4) might represent an instruction prefix, with subsequent notes encoding ASCII values for 'H', 'e', 'l', 'l', 'o', etc. The actual program is a .mid file rather than plain text.
A Velato program that prints 'Hello World'. It is encoded as a MIDI file where the sequence of notes corresponds to the ASCII codes of the characters.
Simple Addition in Velato
[MIDI-BASED] Sequence of notes: C4 -> instruction prefix for load A, D4 -> value 3, E4 -> load B, F4 -> value 5, G4 -> add, A4 -> output result. The program is a .mid file.
Adds two numbers using Velato MIDI instructions encoded as note sequences.
Loop Example in Velato
[MIDI-BASED] Notes: C4 -> setup counter, D4 -> start loop, E4 -> increment, F4 -> check condition, G4 -> jump to loop start if not done, A4 -> output final value. Encoded in a .mid file.
Demonstrates looping using repeated MIDI note patterns to increment a counter.
Conditional Branch in Velato
[MIDI-BASED] Notes: C4 -> load variable, D4 -> compare to threshold, E4 -> if greater jump to label, F4 -> else instructions, G4 -> label target, H4 -> continue. Encoded in a .mid file.
Uses Velato MIDI sequences to perform an if-else branch based on a value.
String Output in Velato
[MIDI-BASED] Notes: C4 -> output start, D4 -> ASCII 'H', E4 -> ASCII 'i', F4 -> ASCII '!', G4 -> output end. The program is stored in a .mid file.
Outputs a string character by character using MIDI-encoded ASCII values.
Multiplication in Velato
[MIDI-BASED] Notes: C4 -> load A, D4 -> load B, E4 -> multiply, F4 -> store result, G4 -> output. Program is a .mid file.
Multiplies two numbers using a sequence of MIDI instructions.
Decrement Example in Velato
[MIDI-BASED] Notes: C4 -> set counter, D4 -> decrement, E4 -> check if zero, F4 -> jump if not zero, G4 -> output. Encoded in .mid file.
Decreases a counter using MIDI instructions repeatedly.
Nested Loop Example in Velato
[MIDI-BASED] Notes: C4 -> outer loop start, D4 -> inner loop start, E4 -> increment, F4 -> check inner, G4 -> jump inner start, H4 -> check outer, I4 -> jump outer start, J4 -> output. Stored in a .mid file.
Shows nested loops with MIDI note sequences representing inner and outer loops.
Array Handling in Velato
[MIDI-BASED] Notes: C4 -> load array, D4 -> access index, E4 -> modify value, F4 -> iterate, G4 -> output array. Program is encoded in .mid file.
Represents array operations using MIDI sequences for load, store, and iterate.
Function Call Example in Velato
[MIDI-BASED] Notes: C4 -> define function, D4 -> function instructions, E4 -> call function, F4 -> return, G4 -> output result. Encoded as .mid file.
Defines and calls a simple function using MIDI instruction patterns.
Frequently Asked Questions about Velato
What is Velato?
Velato is a Rust library (crate) that parses and renders Vello-compatible graphics from Lottie JSON animation files, enabling vector animations in Rust applications.
What are the primary use cases for Velato?
Rendering Lottie animations in Rust desktop or cross‑platform apps. Embedding vector-based animations in Rust game UIs. Interactive UI animations for Rust GUI applications. Converting Lottie projects to native Rust-based rendering pipelines. Prototyping or experimenting with animated graphics in Rust + Vello
What are the strengths of Velato?
Native Rust performance and safety (no JS runtime overhead). Leverages GPU via Vello for smooth vector animations. Cross-platform - desktop and experimental web builds. Opens Lottie’s animation possibilities to Rust ecosystem. Flexible: can integrate with other Rust rendering pipelines or GUI frameworks
What are the limitations of Velato?
Not fully spec‑complete: some Lottie features are not yet supported (e.g. text layers, image embedding, advanced effects like motion blur or drop shadows, certain easing or time‑remapping) :contentReference[oaicite:7]{index=7}. Dependent on Vello’s capabilities - limitations in Vello propagate to Velato. Web usage depends on WebGPU - browser support is still experimental or limited. Less tooling/documentation compared to mainstream Lottie libraries (e.g. lottie‑web). Requires Rust knowledge - not a no‑code or simple JS solution
How can I practice Velato typing speed?
CodeSpeedTest offers 10+ real Velato code examples for typing practice. You can measure your WPM, track accuracy, and improve your coding speed with guided exercises.