6 个版本
使用旧的 Rust 2015
0.3.0 | 2016年6月3日 |
---|---|
0.2.4 | 2016年6月3日 |
#2075 in 开发工具
21KB
606 行
Pythonic
用法
创建 Python 的 "Hello, world" 程序相对简单,尽管有点冗长
let mut program = Block::new();
program.add_statement(
Statement::FunctionCall(
FunctionCall::new("print", vec![
Statement::Argument(Argument::bare("Hello, world")
])
)
)
println!("{}", program);
上面的 Rust 代码会打印
print("Hello, world")