We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File: main.w
def compute(): print("ok")
File: ffi_example.py
from photon import pimport main = pimport("main") main.compute()
To generate the shared constructor file (main.so or main.dll) you need to use the command:
main.so
main.dll
photon --build shared # Currently, it only works if the file is called `main.w` python ffi_example.py
The text was updated successfully, but these errors were encountered:
The name photon already exists in pypi ;/ We need a good library name. I'll also change the syntax to something like this:
import photon_magic #library name import photon_module import other as renamed photon_module.compute() renamed.compute()
Sorry, something went wrong.
Manually import each shared builder
from photon_lang import ffi photon_module = ffi("photon_module") renamed = ffi("other") photon_module.compute() renamed.compute()
Automatic import of shared builders
import photon_lang import photon_module import other as renamed photon_module.compute() renamed.compute()
Implemented first photon import!
Just install the photon-lang package
pip install photon-lang
import it and you should be able to import any modules in the current directory
import photon_lang import test print(test.compute())
No branches or pull requests
https://www.youtube.com/watch?v=Q8shKuNPP2o&t=3815s
File: main.w
File: ffi_example.py
To generate the shared constructor file (
main.so
ormain.dll
) you need to use the command:The text was updated successfully, but these errors were encountered: