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 gloo-worker crate #180

Merged
merged 5 commits into from
Jan 3, 2022
Merged

Add gloo-worker crate #180

merged 5 commits into from
Jan 3, 2022

Conversation

ranile
Copy link
Collaborator

@ranile ranile commented Jan 2, 2022

Migrate yew-agent to gloo-worker

The code in this PR is moved from the Yew repository as of commit yewstack/yew@6f6519d. All the credits go to original code authors.

All the code in this commit is moved from the [Yew repository](https://github.com/yewstack/yew) as of commit yewstack/yew@6f6519d

All the credits go to original code authors.
The crate level documentation is copied from the Agents docs at yew.rs
@ranile ranile mentioned this pull request Jan 2, 2022
3 tasks
@futursolo
Copy link
Collaborator

This looks fine to me for migrating from yew-agent to gloo-worker.

However, as we don't have non-worker based "agents" anymore, I think the implementation could be revised to be more specialised to implement workers:

  • Do we need Reach on the worker itself?
    If we remove Reach from the worker trait, then a worker can be spawned as any type and the type can be specified at the time it is created. (this also means that we can merge PublicWorker and PrivateWorker together.)
  • Currently, the path of a worker is not dynamic (specified in name_of_resource). If we make it possible to specify the path at the time a worker is created, will it be easier to handle relative paths? (as well as whether a worker is defined as a ES module.)

@ranile
Copy link
Collaborator Author

ranile commented Jan 3, 2022

I'm going to merge this then.
I agree with the changes. Do you want to PR those changes? If not, I think we should release this as 0.1 right now. The implementation revisions could come later (I don't really have the time to make these changes myself right now)

@ranile ranile merged commit e482f2e into rustwasm:master Jan 3, 2022
@futursolo
Copy link
Collaborator

Do you want to PR those changes?

Not at anytime soon. I already have a lot on my plate at this moment.

This was referenced Feb 15, 2022
@ranile ranile mentioned this pull request Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants