Skip to content

Conversation

bbonaby
Copy link
Collaborator

@bbonaby bbonaby commented Oct 13, 2025

Why is this change needed?

This change introduces the foundation for Rust support in the EDL code generation toolchain.
It adds a procedural macro (#[derive(EdlDerive)]) and supporting crates that automatically generate conversion From traits between developer-facing EDL types and their corresponding FlatBuffer types.

What Changed?

New Crates

  • edlcodegen-coreno_std crate exposing the EdlDerive macro used by EDL-generated types.
  • edlcodegen-macros — defines procedural macros that emit From trait impls for structs and enums annotated with:
    • #[target_struct(...)] for struct mappings
    • #[target_enum(...)] for enum mappings
  • edlcodegen-tools — build helper crate that downloads and exposes paths to edlcodegen.exe and flatc.exe for use in Rust build scripts. In the future this crate will be used by other crates to run edlcodegen.exe on an edl file.
  • edlcodegen-core-test — test crate verifying round-trip conversions between EDL types and FlatBuffer-generated object API types.

How was it tested?

  • Included a comprehensive test confirming round-trip conversion between developer types and FlatBuffer object types that can be run with cargo test -p edlcodegen-core-test

Next Steps

Future PRs will expand on this foundation to cover:

  • Function parameter marshalling between host and enclave.
  • The actual rust code generation that will be produced by edlcodegen.exe .
  • Pipeline work to rust builds and publishing to crates.io

…rsion traits between edl types and flatbuffer types. Also added tools crate so edlcodegen and flatc compiler can both be consumed and used within a developers build.
@bbonaby bbonaby changed the title Add initial Rust support: EDL type <---> FlatBuffer type conversion Add EDL type <---> FlatBuffer type conversion for future rust support Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant