Logo
Explore Help
Sign In
logos-messaging/nim-ffi
1
0
Fork 0
You've already forked nim-ffi
mirror of https://github.com/logos-messaging/nim-ffi.git synced 2026-06-21 08:49:34 +00:00
Code Issues Packages Projects Releases Wiki Activity
nim-ffi/examples/timer/rust_native_bindings/Cargo.toml

5 lines
70 B
TOML
Raw Permalink Normal View History

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
[package]
name = "my_timer_native"
version = "0.1.0"
edition = "2021"
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.0 Page: 70ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API