GithubHelp home page GithubHelp logo

merkle-patricia-tree's Introduction

Merkle Patricia tree

Testing codecov

$ git clone https://github.com/Azazel-h/merkle-patricia-tree.git --recursive

Updating submodules with:

$ git submodule update --init

Clean building

$ cmake -S . -B build
$ cmake --build build

Note

If you want to build with tests just add the flag

$ cmake -S . -B build -DTRIE_BUILD_TESTING=ON
$ cmake --build build

Important

Be careful, if you are using CLion or other IDE with СMake/CTest integration, run the mpt-tests to build them before using CTest.

You can run tests with smth like

$ ./build/mpt-tests

Or using CTest

$ ctest --verbose -j$(nproc) --test-dir build

C-wrappers

Caution

Was generated by AI!! Not tested at all. WIP for now.

Language-Linkage Example

- CMake
test-language-linkage/
├── lib/
│   └── merkle-patricia-tree/
│       └── ...
├── CMakeLists.txt
└── main.c
# CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(test-language-linkage C CXX)

# Add the C++ library
add_subdirectory(lib/merkle-patricia-tree)

# Add the C executable
add_executable(main main.c)
target_link_libraries(main PRIVATE
        merkle-patricia-tree
        keccak
        intx
)
target_include_directories(main PRIVATE lib/merkle-patricia-tree/include)
// main.c
#include <stdio.h>
#include "merkle-patricia-tree/trie/hash_builder.hpp"

int main() {
printf("%s", "Hello World");
silkworm_HashBuilder* builder = silkworm_HashBuilder_new();
printf("%p", builder);
return 0;
}
- Manually :)
    Sorry, I hate bash and compiling things with commands cause I'm a bit dummy

merkle-patricia-tree's People

Contributors

azazel-h avatar oolonge avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.