Add initial defination of the hello package
This commit is contained in:
parent
10ea7fed38
commit
643804cb22
|
@ -0,0 +1,17 @@
|
||||||
|
[package]
|
||||||
|
name = "hello"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
authors = ["Daohan Chong <wildcat.name@gmail.com>"]
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["cdylib"]
|
||||||
|
name = "hello"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
uniffi = "0.16.0"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
uniffi_build = "0.16.0"
|
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
uniffi_build::generate_scaffolding("./src/hello.udl").unwrap();
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
namespace Hello {
|
||||||
|
void say_hello(string name);
|
||||||
|
};
|
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
pub fn say_hello(name: &str) {
|
||||||
|
println!("Hello, {}!", name);
|
||||||
|
}
|
|
@ -1,9 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "todo_list_shared"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
author = "Daohan Chong <wildcat.name@gmail.com>"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
|
|
@ -1,8 +0,0 @@
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
#[test]
|
|
||||||
fn it_works() {
|
|
||||||
let result = 2 + 2;
|
|
||||||
assert_eq!(result, 4);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue