Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace slicec-cs by code generators written in C# #3978

Open
bernardnormier opened this issue Mar 29, 2024 · 0 comments
Open

Replace slicec-cs by code generators written in C# #3978

bernardnormier opened this issue Mar 29, 2024 · 0 comments

Comments

@bernardnormier
Copy link
Member

bernardnormier commented Mar 29, 2024

Currently, slicec-cs is written in Rust, which is impractical for C# developers updating / improving code in icerpc-csharp: you need to be familiar with Rust to update the code generator, even though the focus of icerpc-csharp is naturally C#.

Protobuf provides an elegant solution to this issue: the protoc compiler launches plugins (in particular code-generator plugins) that can be written in any language.

We want to do the same for Slice:

  • slicec (the compiler executable) remains in Rust but doesn't generate any code. Its focus is parsing.
  • slicec communicates with plugins via stdint/stdout; in particular it serializes the AST using Slice2
  • the slicec code generators for C# (base code generator and IceRPC code generator) are (re)written in C#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant