Hello World
编写你的第一个 Sounio 程序
Hello World
当前最小的 hello world 路径仍然是带 with IO 的简单 main,先用 check 验证,再决定是否尝试 run。
今日已验证
examples/hello.sio仍然是最小的已验证起点。- 显式
with ...effect 仍然是语言真实合同的一部分。 - 先运行
souc check,再考虑run或build。
当前限制
run是否可用取决于你选择的构件和运行时路径。- 真实行为取决于具体的
souc二进制,而不只是仓库里有哪些文件。
在这个仓库中验证
fn main() with IO {
println("Hello, Sounio!")
}
# then
"$SOUC_BIN" check hello.sio
"$SOUC_BIN" run hello.sio