miracl / core

MIRACL Core
Apache License 2.0
208 stars 68 forks source link

core/python could be structured more like a Python module #42

Open friedrichsenm opened 3 years ago

friedrichsenm commented 3 years ago

After running config.py to configure the curves you want to use, if you want to build a module that relies on any of the curves and then write any code depending on that module, the dependencies are currently a little clunky.

In my case, I ended up copying each of the curve directories created by config.py to my project and put an __init__.py file inside each of the folders so that I could install each curve as a Python module. I also had to copy the constants.py file to any folder with code that relied on any of the configured elliptic curves. The example structure below is what I used. In the example, assume that module_code.py depends on bn254 and that test.py relies on module_code.py.

project
|       bn254
|       |        __init__.py
|       |        big.py
...
|       module
|       |       __init__.py
|       |       module_code.py
...
|       test
|       |       constants.py
|       |       test.py

If config.py could allow you to install the curves and any necessary constants as modules, it would be much easier to use in combination with other projects.

wanfuse123 commented 5 months ago

can someone please post derailed install instructions for the c, c++, and python versions of this library? Lots of wasted potential for this because there is no directions! I appreciate any help greatly! For Linux please!

mcarrickscott commented 5 months ago
  1. git clone https://github.com/miracl/core.git./Bnechtest
  1. mkdir work

  2. cd work

  3. cp ../core/cpp/* .

  4. python3 config64.py test

  5. ./benchtest_all

On Fri, May 31, 2024 at 11:33 PM wanfuse123 @.***> wrote:

can someone please post derailed install instructions for the c, c++, and python versions of this library? Lots of wasted potential for this because there is no directions! I appreciate any help greatly!

— Reply to this email directly, view it on GitHub https://github.com/miracl/core/issues/42#issuecomment-2143060087, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAU3ZDRJVMOFR6C2AI4PK53ZFD3DZAVCNFSM427WCRZKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJUGMYDMMBQHA3Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>