{"id":51444828,"url":"https://github.com/xaliphostes/rosetta-old","last_synced_at":"2026-07-05T15:01:17.909Z","repository":{"id":317649393,"uuid":"1068267048","full_name":"xaliphostes/rosetta-old","owner":"xaliphostes","description":"A C++ hearders only for automatic language binding","archived":false,"fork":false,"pushed_at":"2026-05-12T14:23:18.000Z","size":10660,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-10T10:18:06.945Z","etag":null,"topics":["cpp20","introspection","javascript","lua","python"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xaliphostes.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":"2025-10-02T05:47:42.000Z","updated_at":"2026-06-10T07:01:52.000Z","dependencies_parsed_at":"2025-10-06T05:47:29.875Z","dependency_job_id":null,"html_url":"https://github.com/xaliphostes/rosetta-old","commit_stats":null,"previous_names":["xaliphostes/rosetta"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xaliphostes/rosetta-old","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaliphostes%2Frosetta-old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaliphostes%2Frosetta-old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaliphostes%2Frosetta-old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaliphostes%2Frosetta-old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xaliphostes","download_url":"https://codeload.github.com/xaliphostes/rosetta-old/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaliphostes%2Frosetta-old/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35158308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cpp20","introspection","javascript","lua","python"],"created_at":"2026-07-05T15:01:16.861Z","updated_at":"2026-07-05T15:01:17.899Z","avatar_url":"https://github.com/xaliphostes.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Rosetta — A C++ Introspection \u0026 Automatic Language Binding\n\n# **One registration, infinite possibilities** 🚀\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"media/logo.png\" alt=\"Logo rosetta\" width=\"300\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=Linux\u0026logo=linux\u0026logoColor=white\u0026message=support\u0026color=success\" alt=\"Linux support\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=macOS\u0026logo=apple\u0026logoColor=white\u0026message=support\u0026color=success\" alt=\"macOS support\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=Windows\u0026logo=windows\u0026logoColor=white\u0026message=support\u0026color=success\" alt=\"Windows support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/badge/C%2B%2B-20+-green.svg\" alt=\"Language\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-LGPL-green.svg\" alt=\"License\"\u003e\n\u003c/p\u003e\nWith support to:\n\u003cp align=\"left\"\u003e\n\u003cdiv style=\"padding-left: 50px;\"\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=Python\u0026logo=python\u0026logoColor=white\u0026message=support\u0026color=success\" alt=\"Python support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=Javascript\u0026logo=javascript\u0026logoColor=white\u0026message=support\u0026color=success\" alt=\"JavaScript support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=WebAssembly\u0026logo=webassembly\u0026logoColor=white\u0026message=support\u0026color=success\" alt=\"Emscripten support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=REST%20API\u0026logo=swagger\u0026logoColor=white\u0026message=support\u0026color=success\" alt=\"REST API support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=Qt\u0026logo=qt\u0026logoColor=white\u0026message=support\u0026color=success\" alt=\"Qt support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=ImGui\u0026logo=imgui\u0026logoColor=white\u0026message=support\u0026color=success\" alt=\"ImGui support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=Lua\u0026logo=lua\u0026logoColor=white\u0026message=soon\u0026color=informational\" alt=\"Lua support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=Java\u0026logo=java\u0026logoColor=white\u0026message=soon\u0026color=informational\" alt=\"Java support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=Ruby\u0026logo=ruby\u0026logoColor=white\u0026message=soon\u0026color=informational\" alt=\"Ruby support\"\u003e\u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/static/v1?label=Julia\u0026logo=julia\u0026logoColor=white\u0026message=soon\u0026color=informational\" alt=\"Julia support\"\u003e\n  \u003c/div\u003e\n\u003c/p\u003e\n\n---\n\n## 🧩 Overview\n\n**Rosetta** is a **non-intrusive C++ header-only introspection library** that is used to automatically generates consistent bindings for Python, JavaScript, Lua, Ruby, Julia and more — without modifying your C++ code.\n\nDescribe your introspection once, and export them everywhere. You do not need to know anything about the underlaying libs that are used for the bindings (NAPI, Pybind11, Rice...)\n\n## Examples\n- [CGAL-rosetta](https://github.com/xaliphostes/cgal-rosetta) based on the [CGAL](https://github.com/CGAL/cgal) library, for 3D surfaces intersections and remeshing\n\n  \u003cimg src=\"media/cgal-rosetta.png\" alt=\"Logo rosetta\" width=\"500\"\u003e\n\n- [PMP-rosetta](https://github.com/xaliphostes/pmp-rosetta) based on the [PMP](https://github.com/pmp-library/pmp-library) library, for decimation, remeshing, subdivision or smoothing\n\n  \u003cimg src=\"media/pmp-rosetta.png\" alt=\"Logo rosetta\" width=\"500\"\u003e\n\n- [Arch-rosetta](https://github.com/xaliphostes/arch3-rosetta) based on the [Arch](https://github.com/xaliphostes/arch3) library, the successor of [Poly3D](https://structuralgeology.stanford.edu) from Stanford and [iBem3D](https://www.sciencedirect.com/science/article/abs/pii/S0098300414001496#:~:text=Review-,iBem3D%2C%20a%20three-dimensional%20iterative%20boundary%20element%20method%20using%20angular,dislocations%20for%20modeling%20geologic%20structures) from slb, a 3D Boundary Element Method in geomechanics\n\n  \u003cimg src=\"media/arch-rosetta.jpg\" alt=\"Logo rosetta\" width=\"500\"\u003e\n\n- [Cassini-rosetta](https://github.com/xaliphostes/cassini-rosetta) based on the [Cassini](https://github.com/xaliphostes/cassini) library, the successor of [Dynel2D/Dynel3D](https://stacks.stanford.edu/file/druid:pr225my1140/RFP_2002_Maerten%20and%20Maerten%20b.pdf) from Stanford and then slb.\n  \u003cimg src=\"media/cassini-rosetta.png\" alt=\"Logo rosetta\" width=\"500\"\u003e\n\n## 🧩 Usages\n\n1. **C++ Introspection**\n2. **Generator** for `scripting languages`\n   - Python\n   - JavScript\n   - WebAssembly\n   - TypeScript\n   - Rest API\n   - ...\n3. **Property editor (GUI)**\n   - Qt\n   - ImGui\n4. **Serialization**\n5. **Undo/redo** framework\n6. **Documentation** generation in `Markdown`\n7. **Validation** on `field` or `property` (range...)\n\n\n---\n\n## ✨ Features\n\n1. **Zero-intrusion** — No inheritance, no macros inside your classes, no wrapper\n2. **Simple to use**\n3. **One API -\u003e Multi-language output** — Python (pybind11), JavaScript (N-API), Lua, WASM...\n4. Supports:\n   - **Multiple constructors**\n   - **Inheritance \u0026 polymorphism** — Virtual methods, multiple inheritance\n   - **Const correctness** — Differentiates const/non-const methods\n   - **Method Complete Overload Access**\n   - **Synthetic Methods** - methods to classes that don't exist in the original C++ class definition.\n   - **Functors**\n   - **Fields** - Member variables\n   - **Virtual fields (`property`)** - From `setDummy`/`getDummy` methods, create the virtual field `dummy`\n   - **Static methods**\n   - **Free functions**\n   - **STL Containers** — `vector`, `map`, `set`, `array`, etc... of any type\n   - **Smart pointers** — `shared_ptr`, `unique_ptr`, raw pointers\n1.  **Validation system** — Runtime constraints and checks\n2.  **Serialization**\n3.  **Documentation generation** — Markdown / HTML export\n5.  **Qt Integration** — QML bridge for dynamic property editing, automatic property editor widgets\n6.  **Undo/Redo extension** - Generic undo/redo manager for tracking and reverting property/field changes\n  \n## 📊 Comparison with Other Systems\n\n| Feature | Rosetta | Qt MOC | RTTR | Boost.Describe |\n|---------|---------|--------|------|----------------|\n| Non-intrusive | ✅ | ❌ | ✅ | ✅ |\n| No macros in class | ✅ | ❌ | ❌ | ❌ |\n| Header-only | ✅ | ❌ | ❌ | ✅ |\n| Static methods | ✅ | ✅ | ✅ | ⚠️ |\n| Virtual methods | ✅ | ✅ | ✅ | ❌ |\n| Free functions | ✅ | ❌ | ✅ | ❌ |\n| Python bindings | ✅ | ✅ | ⚠️ | ❌ |\n| JavaScript bindings | ✅ | ❌ | ❌ | ❌ |\n| WebAssembly bindings | ✅ | ❌ | ❌ | ❌ |\n| REST API generation | ✅ | ❌ | ❌ | ❌ |\n| Serialization | ✅ | ✅ | ✅ | ⚠️ |\n| Qt integration | ✅ | ✅ | ⚠️ | ❌ |\n\n### Legends\n\n| Symbol | Meaning | Description |\n|--------|---------|-------------|\n| ✅ | **Fully Supported** | Feature is implemented, stable, and works as expected |\n| ⚠️ | **Partial Support** | Feature exists but has limitations, requires workarounds, or is incomplete |\n| ❌ | **Not Supported** | Feature is not available or not applicable |\n| 🚧 | **In Progress** | Feature is being developed or planned |\n\n## 🚀 Short overview\n\n### 1. Your lib\n```cpp\nclass Vector3D {...};\nclass SceneManager {...};\n...\n```\nalong with a static or dynamic library or nothing (if headers only).\n\n### 2. Describe your API with Rosetta and generate the binding for any language \nThis description provide the introspection of your classes that will be used by the generators (see below).\n```cpp\n#include \u003crosetta/rosetta.h\u003e\n#include \u003cyourlib/all.h\u003e\n\nvoid rosetta_registration() {\n    ROSETTA_REGISTER_CLASS(Vector3D)\n        .field(\"z\", \u0026Vector3D::z)\n        .method(\"length\", \u0026Vector3D::length)\n        .method(\"normalize\", \u0026Vector3D::normalize);\n\n    ROSETTA_REGISTER_CLASS(SceneManager)\n        .method(\"add\", \u0026SceneManager::add)\n        ...;\n}\n```\n\n### 3. Generate the binding for any language (Python, JavaScript, TypeScript, Wasm, REST-API...)\nSince the introspection of your C++ classes (and free functions) is now created by Rosetta, binding is\nstraightforward as long as the generator for a given language is available. To generate a rosetta skeleton for your project, use [**this tool**](./tools/README.md), a project scaffolding tool for creating Rosetta binding projects.\n\nRead [**this tuto**](./include/rosetta/extensions/generators/USAGE.md) and have a look at [**this example**](examples/geometry_generator/) for how to use the generators in combination with Rosetta.\n\nAlso, for more complex examples, see (1) [**this project**](https://github.com/xaliphostes/arch3-rosetta), (2) [**this one**](https://github.com/xaliphostes/cgal-rosetta) or (3) [**this one**](https://github.com/xaliphostes/pmp-rosetta).\n\n## 🖼️ Qt Integration\n\nRosetta provides seamless Qt6 integration with two complementary components:\n\n### QML Bridge\nThe `QmlBridge` class exposes Rosetta-registered objects to QML, enabling dynamic property editing without compile-time type knowledge:\n```qml\nQmlBridge {\n    id: bridge\n}\n\n// Bind any Rosetta-registered object\nbridge.setObject(\"MyClass\", myObject)\n\n// Dynamically access fields and methods\nvar value = bridge.getField(\"position\")\nbridge.setField(\"scale\", 2.0)\nbridge.invokeMethod(\"reset\", [])\n```\n\n### Automatic Property Editor\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"media/editor_properties.png\" alt=\"Properties\" width=\"300\"\u003e\n  \u003cimg src=\"media/editor_methods.png\" alt=\"Methods\" width=\"300\"\u003e\n\u003c/p\u003e\n\nGenerate Qt widgets automatically from your Rosetta-registered classes:\n```cpp\n#include \u003crosetta/extensions/qt/qt_property_editor.h\u003e\n#include \u003crosetta/rosetta.h\u003e\n\nclass Person {...};\n\nstatic auto reg = []() {\n    rosetta::core::Registry::instance()...\n}();\n\nint main(int argc, char *argv[]) {\n    QApplication app(argc, argv);\n\n    Person person;\n\n    auto *inspector = new rosetta::qt::ObjectInspector\u003cPerson\u003e(\u0026person);\n    inspector-\u003esetWindowTitle(\"Person Inspector\");\n    inspector-\u003eresize(300, 400);\n    inspector-\u003eshow();\n\n    return app.exec();\n}\n```\n\nThe property editor supports:\n- **Automatic widget generation** — Spinboxes for numbers, checkboxes for bools, line edits for strings\n- **Custom widget registration** — Sliders, color pickers, file selectors, combo boxes\n- **Grouped properties** — Organize fields into collapsible sections\n- **Multi-object editing** — Edit multiple objects simultaneously\n- **Method invocation** — Button panels for calling registered methods\n- **Undo/redo support** — Track property changes for reversible editing\n\n## 🖼️ ImGui Integration\n\nRosetta provides seamless **ImGui** integration with its `PropertyEditor` for fields and methods\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"media/imgui.png\" alt=\"Properties\" width=\"500\"\u003e\n\u003c/p\u003e\n\n## 💡 Contribute Your Own Generator or Extension\n\nYou're very welcome to create a generator based on **Rosetta introspection** for other scripting languages — such as **Lua**, **Julia**, or **Ruby**!\n\nAlso, any extension is welcome ;-)\n\n👉 Check out [this folder](include/rosetta/extensions/generators/) to see the existing **Python**, **JavaScript**, **Wasm** and **REST API** generators for inspiration.\n\nEvery new generator or extension helps expand the ecosystem — contributions are always greatly appreciated ❤️\n\n## 📜 License\n\nLGPL 3 License — see [LICENSE](LICENSE)\n\n---\n\n## 💡 Credits\n\n[Xaliphostes](https://github.com/xaliphostes) (fmaerten@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaliphostes%2Frosetta-old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxaliphostes%2Frosetta-old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaliphostes%2Frosetta-old/lists"}