microsoft / bond

Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.
MIT License
2.62k stars 322 forks source link

[c#] Generate IDL Schema from C# data contracts #779

Open MrGlock opened 6 years ago

MrGlock commented 6 years ago

Hello I have written C # data contracts with MS Bond attributes. It's work fine for C# only data exchange. But I can't get IDL or AST schema (.bond file) for generating these data contracts in other languages (с++, python).

Bond API support only "Runtime schema" generation, but the bond compiler can't make AST or IDL schema from Runtime schema.

Avro and Protobuf.NET support "schema generation" (Serializer.GetProto()) in runtime.

How can I solve this problem with Bond API and without developing "AutoCodeGen" or "AutoBondGen"?

Thanks for your responses.

chwarr commented 6 years ago

It would be a nice feature to be able to emit a .bond file from a RuntimeSchema. I'm not sure when that will fit into the Bond team's development plans. Is this something you would be interested in contributing to gbc or the C# library?

MrGlock commented 6 years ago

I think that more interesting and easy to developing is the C# library. Based on the C# library we can create other executable applications.