{"id":42043106,"url":"https://github.com/nebulastream/nautilus","last_synced_at":"2026-01-26T06:03:15.246Z","repository":{"id":221035456,"uuid":"753270666","full_name":"nebulastream/nautilus","owner":"nebulastream","description":"Nautilus is a lightweight tracing JIT compiler for C++ ","archived":false,"fork":false,"pushed_at":"2025-12-25T17:07:44.000Z","size":6137,"stargazers_count":30,"open_issues_count":10,"forks_count":9,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-12-26T08:20:28.812Z","etag":null,"topics":["cpp","jit-compiler","llvm","mlir"],"latest_commit_sha":null,"homepage":"https://nebula.stream","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nebulastream.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-05T19:46:49.000Z","updated_at":"2025-12-25T15:16:18.000Z","dependencies_parsed_at":"2024-08-28T12:44:39.553Z","dependency_job_id":"0ac139c2-3c11-451f-981a-0523d7187a38","html_url":"https://github.com/nebulastream/nautilus","commit_stats":null,"previous_names":["nebulastream/lib-nautilus","nebulastream/nautilus"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nebulastream/nautilus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebulastream%2Fnautilus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebulastream%2Fnautilus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebulastream%2Fnautilus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebulastream%2Fnautilus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nebulastream","download_url":"https://codeload.github.com/nebulastream/nautilus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nebulastream%2Fnautilus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28767998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","jit-compiler","llvm","mlir"],"created_at":"2026-01-26T06:03:00.361Z","updated_at":"2026-01-26T06:03:15.237Z","avatar_url":"https://github.com/nebulastream.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nautilus: A tracing jit compiler for C++\n\n[![Build Nautilus](https://github.com/nebulastream/nautilus/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/nebulastream/nautilus/actions/workflows/build.yml)\n\nNautilus is a lightweight and adaptable just-in-time (JIT) compiler for C++ projects.\nIt offers:\n\n1. A high-level code generation API that accommodates C++ control flows.\n2. A tracing JIT compiler that produces a lightweight intermediate representation (IR) from imperative code fragments.\n3. Multiple code-generation backends, allowing users to balance compilation latency and code quality at runtime (see [benchmarks](https://nebulastream.github.io/nautilus/dev/bench/)).\n\nNautilus is used for the query compiler of NebulaStream, a data management system from the DIMA group at TU Berlin.\nLearn more about Nebula Stream at https://www.nebula.stream\n\n### Example\n\nThe example below demonstrates Nautilus with a simplified aggregation operator,\n`ConditionalSum`. This function aggregates integer values based on a boolean mask.\nNautilus introduce `val\u003c\u003e` objects to capture all executed operations in an intermediate representation during tracing.\nDepending on the execution context, it can utilize a bytecode interpreter or generate efficient MLIR or C++ code.\nThis enables Nautilus to trade of performance characteristics and to optimize the generated code towards the target\nhardware.\n\n```c++\nval\u003cint32_t\u003e conditionalSum(val\u003cint32_t\u003e size, val\u003cbool*\u003e mask, val\u003cint32_t*\u003e array) {\n\tval\u003cint32_t\u003e sum = 0;\n\tfor (val\u003cint32_t\u003e i = 0; i \u003c size; i++) {\n\t\t// check mask\n\t\tif (mask[i]) {\n\t\t\t// load value from array at position i\n\t\t\tval\u003cint32_t\u003e value = array[i];\n\t\t\t// add value to sum\n\t\t\tsum += value;\n\t\t}\n\t}\n\treturn sum;\n}\n\nint main(int, char*[]) {\n\tengine::Options options;\n\toptions.setOption(\"engine.backend\", \"cpp\");\n\t// options.setOption(\"engine.Compilation\", false);\n\tauto engine = engine::NautilusEngine(options);\n\tauto function = engine.registerFunction(conditionalSum);\n\tauto mask = new bool[4] {true, true, false, true};\n\tauto array = new int32_t[4] {1, 2, 3, 4};\n\tauto result = function(4, mask, array);\n\tstd::cout \u003c\u003c \"Result: \" \u003c\u003c result \u003c\u003c std::endl;\n\treturn 0;\n}\n```\n\n### Build:\n\nTo build Nautilus from source execute use cmake:\n\n```sh\nmkdir build\ncd build\ncmake ..\ncmake --build . --target nautilus\n```\n\n### Components:\n\nThe codebase is structured in the following components:\n\n| Component                         | Description                                                                                               |\n|-----------------------------------|-----------------------------------------------------------------------------------------------------------|\n| [include](nautilus/include)       | Contains the public api of Nautilus, e.g., `val` objects.                                                 |\n| [tracing](nautilus/src/tracing)   | Hosts core functionality for tracing generic C++ code.                                                    |\n| [compiler](nautilus/src/compiler) | Implements the Nautilus compiler, including its IR, optimization passes, and various generation backends. |\n\n### Publication:\n\nThis paper discusses Nautilus's architecture and its usage in the NebulaStream query compiler.\nNote that it references an earlier version of the code-generation API, which has changed.\n\n```BibTeX\n@article{10.1145/3654968,\n    author = {Grulich, Philipp M. and Lepping, Aljoscha P. and Nugroho, Dwi P. A. and Pandey, Varun and Del Monte, Bonaventura and Zeuch, Steffen and Markl, Volker},\n    title = {Query Compilation Without Regrets},\n    year = {2024},\n    issue_date = {June 2024},\n    volume = {2},\n    number = {3},\n    url = {https://doi.org/10.1145/3654968},\n    doi = {10.1145/3654968},\n    journal = {Proc. ACM Manag. Data},\n    articleno = {165},\n    numpages = {28},\n}\n```\n\n### Related Work:\n\nThe following work is related to Nautilus and influenced our design decisions.\n\n* [Tidy Tuples and Flying Start](db.in.tum.de/~kersten/Tidy%20Tuples%20and%20Flying%20Start%20Fast%20Compilation%20and%20Fast%20Execution%20of%20Relational%20Queries%20in%20Umbra.pdf):\n  This paper describes the low-latency query compilation approach of [Umbra](https://umbra-db.com/).\n  This work was one of the main motivations for the creation of the Nautilus project and its use in NebulaStream.\n\n* [Flounder](https://vldb.org/pvldb/vol14/p2691-funke.pdf):\n  Flounder is simple low latency jit compiler that based on [AsmJit](https://asmjit.com/), which is designed for query\n  compilation.\n\n* [Build-It](https://buildit.so/):\n  BuildIt is a framework for developing Domain Specific Languages in C++.\n  It pioneered the capability of extracting control-flow information form imperative C++ code.\n\n* [GraalVM](https://www.graalvm.org/):\n  The GraalVM project provides a framework to implement AST interpreters that can be turned into high-performance code\n  through partial evaluation.\n\n* [MLIR](https://mlir.llvm.org/):\n  The MLIR project provides a novel approach to building reusable and extensible compiler infrastructure.\n  Nautilus leverages it as a foundation for its high-performance compilation backend.\n\n* [MIR](https://github.com/vnmakarov/mir):\n  The MIR projects provides a lightweight jit compiler that targets low compilation latency.\n  Nautilus leverages MIR as a low latency compilation backend.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnebulastream%2Fnautilus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnebulastream%2Fnautilus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnebulastream%2Fnautilus/lists"}