Question on roc build with the interpreter. It basically should be the same as roc run except that it will
Does this sound correct?
yeah that sounds right to me!
For our ipc, I see parent_base_address. Trying to makes sure I understand this correctly. Instead of serializing in a pointer free format, we serialize with pointers, but then shift them between the two different address spaces. Is that what is happening here?
Trying to understand the ramifications of serializing to a slice of bytes instead of to a shared mem allocator.
Something just feels a bit off to me
4 messages were moved here from #contributing > Worklog (Draft PRs and coordination) by Richard Feldman.
so the basic procedure is:
ModuleEnv data structure (some of which live in nested data structures like SafeList and SafeMultiList) - e.g. maybe it's like 20, I'm not sure what the exact number is, but it doesn't vary by what's in the module, it's always the same exact number no matter whatdoes that clarify? Happy to answer any follow-up questions about it!
That overall makes sense. I still don't quite understand why we serialize: parent_base_addr: u64, over the IPC. What is the parent in this case? the entire module+header?
I forget offhand, but I think it's the base address of the ModuleEnv
Oh cool, got it working!
That was surprisingly easy
That said, right now I have a hacked rocRun that builds an exe
Need to make it a separated updated rocBuild path.
standalone roc binary
Niiice :grinning_face_with_smiling_eyes:
For roc build, instead of ever touching shared memory, I should be able to:
Right?
So it will be a little bit of rearchitecting to do that, but nothing too bad. Probably the biggest hassle is that I want to factor it well instead of duplicating the code as a slight variant.
Nothing hard, just cleanup/organization.
sounds right, yeah!
Also, I am a little confused that our current module even shared memory thing. It doesn't actually call moduleenv.serialize. I guess it kinda just adhoc deals with everything instead to avoid an extra copy to serialize.
Also, hmm. I guess an arena is not guaranteed to be contiguous given it is a linked list of blocks. So either I need to still used the shm allocator.
I guess using the shm allocator is actually the minimal amount of copying (though not sure if it would include some extra unneeded data being serialized).
Cause shm allocator is:
Vs gpa/arena would be:
So assuming the shm allocator isn't accidentally including extra bytes or otherwise significantly costly to create. It likely is the nicest way to handle all of this.
Just an update: I still just have the prototype working on a branch. It is a hacked roc run that builds and runs. Hoping to get back to his later this week or early next.
Since I am planning to anchor to shared mem, I think it will make the refactoring to land pretty small. Mostly need to enable running the roc app compilation step at two different potential locations. For build it has to run before all the linking. For run. It should run after (or eventually in parallel)
So hyped for this. Will be really nice to unlock wasm based platforms.
Last updated: Nov 08 2025 at 12:13 UTC