WASM Container Skeleton - Build for Browser Light Clients #894
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
I'm ok with all those decisions.
Concerning Makefile, Circle CI uses the nix-shell setup in shell.nix
. @thedavidmeister, what is needed to add tests to the CI?
And yeah, holochain_cas_implementations
won't compile for WASM because of the file implementation that depends on filesystem OS functions which are not there in WASM.. Which, currently, also blocks container_api
from being built for WASM. Did you try core
? That should actually work now..
Would this crate container_wasm
be a surrogate for container_api
or do we need that there as well? I guess there is code in container_api
that we might want to use in WASM as well. We would need to split that out then, or only make container
dependend on cas_implementations
, but not container_api
...
Not yet, I'm excited to iterate on this once it's a priority!
Yeah, I was, at one point, thinking we'd want to just wrap core, but I don't think that's correct... with micro-service apps bridging / capabilities etc being managed at the container level, I'm pretty sure we'll need that in the browser as well. |
@neonphog @lucksus this is great
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as per comment in main thread
Can we have Compiler flags and bindgen as follow ups, @thedavidmeister? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting to add crate to nix scripts.
@lucksus yeah followup sounds fine, i think what we need is some space in the SoA to track all of this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've updated the SoA tree to track the followups for this, so happy for now
but am wondering if actually we want this in a dedicated repo, much like moving the node conductor to a different repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lemme nixify
nixified and added tests to ci |
Baby steps to getting us a build target that will work for Holo light client. Currently just imports core_types and exposes a test function that we should remove later.
Mostly just want everyone's opinion on:
conductor_wasm
ok?--nodejs
ok? our options are: browser-only or nodejs only... but there are tools (like rollup / webpack) to turn nodejs projects into web projects, so I started with that... it makes it easier to do unit tests too, since we don't have to spin up a web-serverbefore we start working through the real problems.
Example real problem... I suspect we will run into a lot of wasm incompatibilities as we try to include all of the crates needed: