hermit-os / hermit-playground

A playground to build C/C++/Go/Fortran applications on top of RustyHermit
https://hermitcore.org
Apache License 2.0
32 stars 13 forks source link

Support combined rust and c application #3

Open tlambertz opened 4 years ago

tlambertz commented 4 years ago

I want to trace a C application running on hermitcore with my tracer written in rust (rftrace). I'd ideally want to:

I got it working, but this currently requires a number of workarounds:

stlankes commented 4 years ago

@tlambertz I oversaw this issue. I merged the latest version of libhermit to this project. However, some test cases didn't run. I will solve it.

stlankes commented 4 years ago

Now, the latest version of lib hermit-rs is able to run C applications. Now, I will look in your problems.

I am not sure if I understand your issue. Do you want to use Rust`s libstd in combination newlib?

tlambertz commented 4 years ago

Do you want to use Rust`s libstd in combination newlib?

Yes, this is essentially what I want. libstd in a library, linked to a newlib C application.

stlankes commented 4 years ago

Hm, difficult... Currently, Rust's libstd uses another memory layout in comparison to newlib. This is the reason, why we forward the feature flag newlib during the build process of libhermit, if we use it in combination of newlib.