Skip to content

Rewrite Zeek Module to C++#6

Merged
maldwg merged 14 commits into
mainfrom
4-rewrite-in-c-to-remove-python-environment
Mar 24, 2026
Merged

Rewrite Zeek Module to C++#6
maldwg merged 14 commits into
mainfrom
4-rewrite-in-c-to-remove-python-environment

Conversation

@stefanDeveloper
Copy link
Copy Markdown
Member

Fixes #4

@stefanDeveloper stefanDeveloper self-assigned this Mar 23, 2026
@stefanDeveloper stefanDeveloper added the enhancement New feature or request label Mar 23, 2026
@stefanDeveloper stefanDeveloper linked an issue Mar 23, 2026 that may be closed by this pull request
@stefanDeveloper stefanDeveloper marked this pull request as draft March 23, 2026 14:37
@stefanDeveloper stefanDeveloper requested a review from maldwg March 23, 2026 14:40
@stefanDeveloper
Copy link
Copy Markdown
Member Author

Adjust pre-commit, should we support Windows systems?

@maldwg
Copy link
Copy Markdown
Member

maldwg commented Mar 23, 2026

Adjust pre-commit, should we support Windows systems?

I think we can omit windows for our builds

@stefanDeveloper
Copy link
Copy Markdown
Member Author

Adjust pre-commit, should we support Windows systems?

I think we can omit windows for our builds

Perfect! This simplifies the building and test process.

@stefanDeveloper stefanDeveloper marked this pull request as ready for review March 23, 2026 15:13
Copy link
Copy Markdown
Member

@maldwg maldwg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise

Comment thread config.yaml Outdated
- external_port: 8098
node_ip: 127.0.0.1
- external_port: 8099
- external_port: 9092
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be using 8098 as port so that the config.yaml here is directly comparable with the setup in the infra repository.

@stefanDeveloper
Copy link
Copy Markdown
Member Author

I think, we do not need this / rewrite it to keep the container running. I'll take care if it.

// Replicating Python behavior: run tail -f /dev/null to keep container
// running
std::thread reader_thread([]() {
    FILE *pipe = popen("tail -f /dev/null", "r");
    if (!pipe) {
        spdlog::error("Failed to start tail process");
        return;
    }
    std::array<char, 1024> buffer;
    while (fgets(buffer.data(), buffer.size(), pipe) != nullptr) {
        std::cout << "[ZEEK LOG] " << buffer.data();
    }
    pclose(pipe);
});

@stefanDeveloper
Copy link
Copy Markdown
Member Author

I also see that in every C++ project in HAMSTRING we use a different logging mechanism, sometimes spdlog and sometimes an abstraction layer. We should define a common logging procedure.

@maldwg
Copy link
Copy Markdown
Member

maldwg commented Mar 24, 2026

Seems legit

@maldwg maldwg merged commit 8cf6dcf into main Mar 24, 2026
4 checks passed
@maldwg maldwg deleted the 4-rewrite-in-c-to-remove-python-environment branch March 24, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite in C++ to remove Python environment

2 participants