olivmath / merkly

🌳 The simple and easy implementation of Merkle Tree
https://pypi.org/project/merkly
MIT License
49 stars 11 forks source link

Mekle Root FFI #58

Open olivmath opened 9 months ago

olivmath commented 9 months ago

Build Merkle Root using Rust FFI

I want Merkly to work like this:

import merkly

mtree = MerkleTree(['a', 'b', 'c', 'd'], turbo=True)

# build merkle root using Rust by FFI
assert mtree.root.hex() == '68203f90e9d07dc5859259d7536e87a6ba9d345f2552b5b9de2999ddce9ce1bf'
Sovenok-Hacker commented 7 months ago

Maybe you should use Maturin and pyo3?

olivmath commented 5 months ago

I tried to go that route, but I'm learning a lot about the low level with FFI. BUT, it doesn't work as I thought at first, maybe I'll switch to Maturin or Pyo3.

Are you using the merkly? you have some suggestions to use Maturin or Pyo3? I'm super open to new ideas!