tricorder-observability / Starship

Starship: next-generation Observability platform built with eBPF+WASM
GNU Affero General Public License v3.0
163 stars 23 forks source link

Use cstruct bindgen's json output API in module json output #111

Open nascentcore-eng opened 1 year ago

nascentcore-eng commented 1 year ago

Is your feature request related to a problem? Please describe. Right now the json output needs manually write C code This is error prone and slow

Describe the solution you'd like https://github.com/eunomia-bpf/c-struct-bindgen#usage---genereate-struct-to-struct-binding Use this tool to generate C API to automatically compute the C struct into JSON string in one generated API

Describe alternatives you've considered None

Additional context None

nascentcore-eng commented 1 year ago

This contradicts a previous idea of removing the c_struct_bindgen's generated c struct in WASM. That decision was made when we do not know that there is tool to generate cJSON output.

yunwei37 commented 1 year ago

Also, c-struct-bindgen would be used to generate rust and golang bindings in wasm-bpf. This will be implement and updated in the next few days.

Starship can use this tool to add rust, golang support for wasm module in less than one hour.

nascentcore-eng commented 1 year ago

Also, c-struct-bindgen would be used to generate rust and golang bindings in wasm-bpf. This will be implement and updated in the next few days.

Starship can use this tool to add rust, golang support for wasm module in less than one hour.

@yunwei37 Is this done already?

nascentcore-eng commented 1 year ago

@owl-ltt