Ivan FB 23152d4fe7
feat(codegen): native (non-CBOR) Rust generator + rust.nim -> rust_cbor.nim split
Splits the Rust codegen the way C++ is split: rename `rust.nim` -> `rust_cbor.nim`
(CBOR) and add `rust_native.nim` (native). Dispatch on `targetLang=rust` now
honours `-d:ffiMode` (native/cbor); the crates share file names so each mode
writes its own dir (rust_bindings vs rust_native_bindings).

`rust_native.nim` emits a `<lib>_native` crate — the Rust analogue of
`cpp_native`: `#[repr(C)]` POD mirrors + `extern "C"` native entry points
(ffi.rs); idiomatic structs with `to_c`/`from_c`, a holder owning the CStrings
for the call (types.rs); and a `<Lib>Node` whose methods marshal typed args in /
read typed struct returns out, blocking via std mpsc (api.rs).

First cut: scalar/string/bool/float/nested-struct fields (create/version/echo);
seq/Option params are SKIPPED, native events next. Verified end-to-end — the
generated crate builds and the demo round-trips a typed EchoResponse. Tasks:
genbindings_rust (CBOR), genbindings_rust_native.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 18:51:06 +02:00

5 lines
70 B
TOML

[package]
name = "my_timer_native"
version = "0.1.0"
edition = "2021"