Can I call a (compiled) Mojo function from Python?
Otherwise, do we have any ETA for when that is going to be available? It seems like the killer feature for Mojo.
15 Replies
Hi @jordiae it should work by packaging exported Mojo functions, I'm working on this today and will post back here
Looking forward! Thanks!
Hello, is there any guide or section in the documentation that shows how to do this?
basically, my idea would be
1. write a module/package in Mojo
2. expose the functions (and if possible the structures)
3. compile it, I guess
4. import it from Python.
is this possible?
@Jack Clayton any updates?
Congrats @jordiae, you just advanced to level 1!
@Sarctiann yeah should be possible @jordiae working on it as part of blog. I'll let you know in here when I have a solution to share 🙂
Happy to hear that 🙂 thank you!
This would be great, I've been using Rust since Python with pyo3. I would love to try Mojo from Python.
Hi @jordiae @Sarctiann @Orwink sorry there's currently no way to do this from the Mojo SDK my mistake. They want to make sure they design that feature the right way before releasing it.
Oh, I understand. Thanks for the update. For my part, I'm happy with the speed with which Mojo is advancing so I can't complain. I will continue practicing with the features we already have.
The best things in life take time. Thank you for all the work you are doing.
Congrats @Orwink, you just advanced to level 1!
we need this!
I created an issue about this feature to ask if it could be mentioned in the roadmap: https://github.com/modularml/mojo/issues/1423
It is frustrating that there is absolutely no mention of this in Mojo website.
GitHub
[Docs] Add to the roadmap: a good story for using Mojo from Python ...
Where is the problem? https://docs.modular.com/mojo/roadmap.html What can we do better? This issue is just about adding a new item to the roadmap :-) about building a good story for using Mojo from...
Good idea thanks, I pinged in your ticket