Commit Graph
13 Commits
Author SHA1 Message Date
Dario Gabriel Lipicar 7f6f1542a3 generator: glue-only cdylib mode for non-C++ impls
--lidl x.lidl --backend cdylib (no --impl-class) emits just the uniform
Qt-plugin glue; the C exports come from the module's own language
backend (e.g. the Rust SDK's lidl-gen --provider). This is the entry
point logos-module-builder's cdylib interface uses for Rust modules.
2026-06-11 18:54:13 -03:00
Dario Gabriel Lipicar aae15fffe9 Cdylib authoring backend: --backend cdylib emits the common C ABI wrapper + uniform Qt glue
From a module's LIDL contract the generator now emits:
- <name>_module_impl.cpp — the Qt-FREE logos_module_impl.h export
  wrapper (dispatch/get_methods/set_context/set_emit_callback/
  accept_token/get_protocol_version/string_free) around the universal
  impl class; compiled into the module's cdylib. Tagged {"_bytes"}
  bytes, StdLogosResult -> {success,value,error}, context via the
  existing _logos_codegen_::maybeSet* SFINAE helpers.
- <name>_events_cdylib.cpp — typed logos_events: bodies marshalling
  into nlohmann::json (the cdylib flavor of the events sidecar).
- <name>_cdylib_glue.{h,cpp} — the UNIFORM Qt-plugin glue forwarding
  LogosProviderObject to the C symbols; identical regardless of the
  module's source language (the Rust SDK emits the same exports).
- the .lidl sidecar.

Qt-container types are rejected at generation time (a cdylib impl is
Qt-free by definition). Verified end-to-end by dlopen smoke: typed
dispatch, typed events through the emit callback, result returns,
introspection, and the protocol-version handshake — and the SAME C
harness passes against a Rust cdylib generated by logos-lidl-gen
--provider.
2026-06-10 01:39:16 -03:00
Dario LipicarandClaude Opus 4.7 42a8b9ed5c feat: LIDL interface IR — --header-to-lidl frontend + --dep backend (#77)
* feat: LIDL as the interface IR — --header-to-lidl frontend + --dep backend

Make the generator pivot around LIDL so every binding flows source -> LIDL ->
C++ (and a future Rust module plugs into the same backend via Rust -> LIDL):

- --header-to-lidl <impl.h> --impl-class X --metadata m.json -o out.lidl: the
  standalone C++ frontend. Runs parseImplHeader -> lidlSerialize and emits ONLY
  the <name>.lidl contract (no Qt glue/dispatch), so a module can publish a
  cheap `lidl` artifact without compiling its plugin.
- --dep <name>=<lidl>: the LIDL backend for concrete dependencies. Reuses the
  interface-wrapper path with BindMode::Static, emitting the name-baked
  modules().<dep> wrapper from the dep's published LIDL. Deduped vs each other
  and vs --interface names.
- generateInterfaceWrappers gains a BindMode param (default Bound); --interface
  stays Bound, --dep is Static. parseInterfaceFlags generalized to
  parseSpecFlags(args, flag) for both --interface and --dep.

The umbrella already emits a `<dep>` member per metadata dependency, so no
umbrella change is needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* address review: strip leading '@' in --header-to-lidl paths; fix doc comment

- --header-to-lidl now strips a leading '@' from the header/metadata/output
  path args (matches legacy_main; some build drivers pass @/abs/path).
- Remove the stale "bound wrapper" doc comment above generateInterfaceWrappers
  (it now generates Static dep wrappers too via BindMode).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-08 11:43:10 -03:00
Dario Lipicar 8bdbd13848 Extend universal modules with module context (#61)
* extend universal modules with module context

* implement module calls and events for universal modules

* pr comments
2026-05-19 12:49:15 -03:00
Iuri Matias d633575677 add IDL parser & generator (wip) (#33)
* add IDL parser & generator (wip)

* fix fixtures issues affecting tests

* fix fixtures issues affecting tests
2026-03-31 16:29:35 -04:00
Iuri Matias 39b0a9acce Add tests; CI (#27)
* add tests for cpp-generator and sdk

* add tests for new api, module_proxy and factories

* add CI tests

* add tests for a module definition
2026-03-24 10:14:17 -04:00
Iuri MatiasandLogos Workspace 4197ee1830 Finish Abstraction & Refactor (Ongoing) - part 1 (#25)
* refactor: abstract connection/transport; and clearly separate qt remote obj and qt local into separate implementations

* abstract qt remote registry

* add mock implementation; these serves to further test the abstraction but also useful for testing modules later

* use LogosObject instead of QObject

* abstract provider side

* updates to use new api

* re-add async api back

---------

Co-authored-by: Logos Workspace <logos@workspace.local>
2026-03-23 11:45:25 -04:00
Khushboo-dev-cpp 128180971c feat: add auto support for async calls (#21) 2026-03-19 15:57:08 -04:00
Arnaud 4fdf157120 feat: LogosResult (#14)
* Add LogosResult

* Add documentation for complex types

* Add get type util function

* Add more shorthand functions

* Add bool support

* Provide more shorthand functions

* Throw exception on bad access

* Fix typo in doc
2026-02-25 09:13:43 -05:00
Iuri Matias 4b143922c1 support --general-only and --module-only options to make code generator more flexible 2025-10-23 10:45:34 -04:00
Iuri Matias 85d35b303f add support to generate only the files for a particular module 2025-10-23 10:15:06 -04:00
Iuri Matias aaddaf5ffb support setting an output folder for the code generator 2025-10-23 10:06:50 -04:00
Iuri Matias 65aa4a1b24 feat: move logos-cpp-sdk to its own repo 2025-09-30 14:56:47 -04:00