Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workspaces for ww_net and ww_proc. #6

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Conversation

lthibault
Copy link
Contributor

@lthibault lthibault commented Apr 16, 2024

This PR sets up two workspaces in Cargo.toml:

  • ww_net
  • ww_proc

The contents of src/net is move to ww_net/src.

src/proc contains a partial implementation of a process using Wasmer. It contains build-hooks to generate capnp schemas.

This is a refactor. There are no functional changes to the top-level application. The intent is to start separating out our main code components. Expect things to continue moving around a bit.

@lthibault lthibault added the enhancement New feature or request label Apr 16, 2024
@lthibault lthibault requested a review from mikelsr April 16, 2024 21:00
@lthibault lthibault self-assigned this Apr 16, 2024
@lthibault lthibault marked this pull request as ready for review April 16, 2024 21:00
@mikelsr
Copy link
Collaborator

mikelsr commented Apr 17, 2024

@lthibault I added some type gymnastics to be able to implement the Dialer trait. It's not an elegant solution, but AFAIK it's the only way of implementing traits for external types (I don't yet know much about rust so take it with a big grain of salt).

It's missing generics in the new type, if we decide this is the way to go we should add them on the next commit: add generics to DefaultSwarm(swarm::Swarm<ww_net::DefaultBehaviour>) making it DefaultSwarm<T>(swarm::Swarm<T>) or something like that.

@lthibault
Copy link
Contributor Author

Thanks for the fix, Mikel!

I get the feeling I'm shaving against the grain with this Dialer trait. I wonder if there's a simpler approach (or at least an approach that's more aligned with the Rust way of doing things).

Let me play around with this a bit before merging :)

@lthibault lthibault merged commit b146c7d into master Apr 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants