Hello Michal,
I haven't found a nice way of linking CAmkES generated symbols against the top level of rumprun apps yet. By top level I mean the POSIX app that gets linked against syscall layer, and the bottom level is the implementation of the syscall layer including
the rump kernel, platform layer code, and camkes generated code. The two layers are individually compiled and linked separately and both have a main function. When the layers are combined into the same address space, the main function in the top layer is
renamed and it is then linked with the bottom layer (this is done using the rumprun_bake tool). Symbols are effectively name-spaced so that they don't collide across the two layers.
The CAmkES generated connectors are compiled and linked into the bottom layer. I don't think it is currently possible to take the generated objects, create a new archive of them and then link the archive into the top layer without ending up with two sets of the same symbols. Maybe there needs to be a way to mark connections as either top level or bottom level and they will only be linked in once (this would also nicely extend to supporting connectors that directly generate rust instead of C).
The current way I achieve what you want in the Ethernet app is by marking the symbols weak in the top layer, the compiler won't complain if they don't exist, and then when the top is combined with the bottom, the symbols are successfully linked.
I managed to get this working with your rust app here: https://github.com/kent-mcleod/camkes/tree/rustapp
It isn't pretty, and I hope there is a better way in Rust of marking C foreign functions as weak. See this discussion here for more info: https://github.com/rust-lang/rust/issues/29603
Rust only allows pointers to be marked as weak which is why the functions in the rust code are declared as function pointers, and then cast to actual functions (yuck).
Kind regards,
Kent