rana-cli/tests/samples/codefiles/rust.rs

22 lines
633 B
Rust
Raw Normal View History

2018-03-13 07:48:40 +00:00
extern crate proc_macro;
extern crate phrases as sayings;
extern crate syn;
#[macro_use]
extern crate quote;
use sayings::japanese::greetings as ja_greetings;
use sayings::japanese::farewells::*;
use sayings::english::{self, greetings as en_greetings, farewells as en_farewells};
extern "C" {
fn c_callback(n: c_int);
}
fn main() {
println!("Hello in English; {}", en_greetings::hello());
println!("And in Japanese: {}", ja_greetings::hello());
println!("Goodbye in English: {}", english::farewells::goodbye());
println!("Again: {}", en_farewells::goodbye());
println!("And in Japanese: {}", goodbye());
}