mirror of
https://github.com/icewind1991/ivory.git
synced 2026-06-03 10:44:09 +02:00
initial return type handling
This commit is contained in:
parent
17182003f5
commit
42f3a76e07
3 changed files with 42 additions and 1 deletions
|
|
@ -11,6 +11,16 @@ fn hello_world() {
|
|||
printf("Hello world, Rust!");
|
||||
}
|
||||
|
||||
#[ivory_export]
|
||||
fn add1(input: i64) -> i64 {
|
||||
input + 1
|
||||
}
|
||||
|
||||
#[ivory_export]
|
||||
fn format_hello(other: String) -> String {
|
||||
format!("Hello {}", other)
|
||||
}
|
||||
|
||||
ivory_module!({
|
||||
name: "demo",
|
||||
version: "0.0.1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue