tricorder-observability / Starship

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

Prototyping building multiple .wasm files and linking them into one single .wasm #5

Open nascentcore-eng opened 1 year ago

nascentcore-eng commented 1 year ago

Let's say we have one API written in Rust And API caller written in C/C++ They are compiled into separate .wasm obj files How can we linking these obj files together and form a single .wasm file?

yunwei37 commented 1 year ago

https://github.com/eunomia-bpf/c-rust-component-test

A demo has been posted by someone in eunomia-bpf org.

nascentcore-eng commented 1 year ago

Please ask the author to provide a brief introduction to the underlying technical approach, so we can assess if the technical approach is compatible and would work with Tricorder Starship.

Ideally, we should ask them to contribute to Starship repo directly.

nascentcore-eng commented 1 year ago

https://crates.io/crates/wasm-compose Manually written wat file can invoke .wasm file's exported functions.

List .wasm file exported function

https://github.com/bytecodealliance/wasm-tools CLI tool to examine .wasm file