Compile to Shared Library

Can I compile mojo code as a shared library,? If yes, how?
4 Replies
Jabadahut50
Jabadahut502mo ago
If you mean shared Objects then yeah I asked this question before to which the answer is Yes but it's not actually properly supported and will likley be broken in the future... if instead you mean just a library to use in other projects then yes AND it's supported and documented under these two links https://docs.modular.com/mojo/cli/package https://docs.modular.com/mojo/manual/packages
mojo package | Modular Docs
Compiles a Mojo package.
Modules and packages | Modular Docs
Learn how to package Mojo code for distribution and importing.
sora
sora2mo ago
GitHub
GitHub - ihnorton/mojo-ffi: Mojo FFI demos: dynamic linking methods...
Mojo FFI demos: dynamic linking methods, and a static linking proof-of-concept - ihnorton/mojo-ffi
ViynShade
ViynShade2mo ago
Can this be used to run python function (maybe via mojo proxy funcion) or is interpreter not initialised?
Want results from more Discord servers?
Add your server