Scenario 7 of 7 / 5 illustrated steps

From Design to Running Rust

The result is real Rust software that compiles and runs.

Inspect generated code, keep a custom handler, run Cargo, and verify the behavior in the application.

In this scenario 5 steps · jump to a capture

Select any screenshot to enlarge it. Use ← / → to move between captures, Esc to close, and 100% to inspect original detail.

01

Read the Rust behind the design

Code View shows generated_main_form.rs as a read-only generated preview. The visible form structure includes welcome_text, the state that a user handler can update.

Why it matters The generated interface and the state used by custom logic are inspectable.

Read-only generated Rust source with the public welcome_text field.
07.01 · Read the Rust behind the design
02

Keep your custom handler

The editable handlers.rs file contains a click handler that sets the message to “Built with VB-Rust!”. The Button caption is changed to “Run my Rust code”, while the custom handler remains in place.

Why it matters Generated design code and user-authored behavior can evolve together.

Preserved Rust click handler alongside the changed Run my Rust code caption.
07.02 · Keep your custom handler
03

Compile and launch with Cargo

Run triggers Cargo compilation and launches the executable. The captured output reports a finished dev profile and an exit code of 0 after the application closes. This is development-profile execution, not a release-profile build.

Why it matters The output provides concrete evidence of compilation and execution.

Cargo output showing successful dev-profile compilation, launch, and exit code 0.
07.03 · Compile and launch with Cargo
04

See the compiled application

The application is running with its “Run my Rust code” Button. The annotations compare 30.70 seconds for the first captured build with 0.71 seconds for the next; these are observations from this session, not performance guarantees.

Why it matters The generated project reaches a working application that can be exercised.

Compiled application running with first and subsequent build times annotated.
07.04 · See the compiled application
05

Verify the event behavior

Clicking the Button updates the Label to “Built with VB-Rust!”. The visible result matches the assignment in handlers.rs, completing the path from visual design to running Rust behavior.

Why it matters A successful build is followed by a direct check of the intended interaction.

Running application displaying Built with VB-Rust after its button is clicked.
07.05 · Verify the event behavior

← Back to Home