This commit is contained in:
2025-08-25 10:09:52 +02:00
parent 9132e3de51
commit fde333e6f1
2 changed files with 6 additions and 1 deletions
+4 -1
View File
@@ -1,3 +1,6 @@
def hello(name): def hello(name):
print("Hello, bro! " + name) print("Hello, bro! " + name)
return "Idk, return value i guess" return "Idk, return value i guess"
def add(x, y):
return x + y
+2
View File
@@ -8,4 +8,6 @@ fn main() {
let m = python::import("bro.py", &gil); let m = python::import("bro.py", &gil);
println!("{:?}", m.call("hello", vec![&"leo"]).extract::<String>()); println!("{:?}", m.call("hello", vec![&"leo"]).extract::<String>());
println!("{:?}", m.call("add", vec![&10, &20]).extract::<i32>());
} }