Hello
Console program10 lines of .st49 lines of generated Rust
Hello, world!
On this page
The .st files#
intent.st
structop {
type_app {
exec = {
lang = "Rust"
}
}
}main.st
ability "print" "Hello" {
message = "Hello, world!"
}Input, plan and generated Rust#
structop plan
structop plan
# program.app will be created
+ program.app (.structop/build/app)
+ ability.print.Hello
Plan: 1 to add, 0 to change, 0 to destroy.Generated main.rs
To inspect this generated file, select Rust in intent.st, initialize the project and export its source.
Export locally
structop init
structop apply -source -no-runTry it
cd rust-hello # a folder holding the .st files above
structop init
structop plan
structop apply