Skip to content
New issue

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

Expanding Language APIs #40

Open
akielaries opened this issue Mar 26, 2023 · 3 comments
Open

Expanding Language APIs #40

akielaries opened this issue Mar 26, 2023 · 3 comments
Labels
enhancement New feature or request TODO A list of some features openGPMP aims to implement

Comments

@akielaries
Copy link
Owner

akielaries commented Mar 26, 2023

At the moment a stable Python API is in place with the help of SWIG. Attempts with expanding to other languages are seen in the experiment folder, where FORTRAN, Go, R, and OCaml were explored. I was only able to successfully flesh out the API for FORTRAN, Go, and R but some cleaning up needs to do with class translation especially when it comes to C++ templates. It is also worth stating OCaml is very much in the experimental phase when it comes to the languages SWIG can work with and requires some extra effort/dependencies to get this working correctly (especially with the class translations and templates)

Some attempts were also made with creating a binding for Julia, this was attempted with the help of wrapit an open source and early stage tool for automatization of C++ ---> Julia wrapper generation. Some attempt were unsuccessfuly but this tool appears promising for using openMTPK as an import within Julia programs.

FOR CONTRIBUTORS

R: This will likely be the easiest API to get working. Some attempts were made in the R/ directory. Read up on how this is done using the SWIG documentation seen here https://www.swig.org/Doc1.3/R.html... also keep in mind generating wrappers for C++ with SWIG is not intuitive at times especially when it comes to C++ templates. SWIG requires there to be a definitive type instead of any type, therefore C++ -> R classes may require some extra design behind it. Take a look at the SWIG interface files (ending in .i) within the openmtpk folder that is used to house the Python API to copy the necessary header files into the interface file.

@akielaries akielaries added the TODO A list of some features openGPMP aims to implement label Mar 28, 2023
@rahulinti79
Copy link

@akielaries I will take care of this task can you please assign to me ...

@akielaries
Copy link
Owner Author

Yup! Went ahead and assigned you @rahulinti79

@akielaries akielaries assigned rahulinti79 and unassigned rahulinti79 Apr 2, 2023
@rahulinti79
Copy link

@akielaries

While executing the below command I got the error that
swig -r openmtpk.i
openmtpk.i:15: Error: Unable to find '../../include/arithmetic/arith.hpp'
openmtpk.i:16: Error: Unable to find '../../include/number_theory/primes.hpp'
openmtpk.i:17: Error: Unable to find '../../include/number_theory/rc4.hpp'
openmtpk.i:18: Error: Unable to find '../../include/number_theory/cipher.hpp'

it seems like path for the above files were wrong and need to update the path for those files in openmtpk.i

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request TODO A list of some features openGPMP aims to implement
Projects
Status: Todo
Development

No branches or pull requests

2 participants