This functionality is provided by libFuzzer, which is available on most platforms. However, libFuzzer is also missing on some platforms. E.g. https://github.com/google/sanitizers/issues/1165

Thus, it could make sense to implement this in our code to be able to execute the existing fuzz inputs.

The basic idea is to check if a folder was passed into `main` (https://github.com/bitcoin/bitcoin/blob/63314b8211d795b2bf0814e244d801e74f50b152/src/test/fuzz/fuzz.cpp#L75) and then iterate over the files and pass them into `test_one_input`.

#### Useful skills:

* C++17 std::filesystem
* https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md


#### Want to work on this issue?

For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.

{
    
    CreateSock = [](const CService&) -> std::unique_ptr<Sock> { std::terminate(); };
    
    g_dns_lookup = [](const std::string& name, bool allow_lookup) {
        if (allow_lookup) {
            std::terminate();
        }
        return WrappedGetAddrInfo(name, false);
    };
    bool should_abort{false};
    if (std::getenv("PRINT_ALL_FUZZ_TARGETS_AND_ABORT")) {
        for (const auto& t : FuzzTargets()) {
            if (std::get<2>(t.second)) continue;
            std::cout << t.first << std::endl;
        }
        should_abort = true;
    }
    if (const char* out_path = std::getenv("WRITE_ALL_FUZZ_TARGETS_AND_ABORT")) {
        std::cout << "Writing all fuzz target names to '" << out_path << "'." << std::endl;
        std::ofstream out_stream{out_path, std::ios::binary};
        for (const auto& t : FuzzTargets()) {
            if (std::get<2>(t.second)) continue;
            out_stream << t.first << std::endl;
        }
        should_abort = true;
    }
    Assert(!should_abort);
    std::string_view fuzz_target{Assert(std::getenv("FUZZ"))};
    const auto it = FuzzTargets().find(fuzz_target);