Skip to content

InstancePre can impl Clone#3510

Merged
alexcrichton merged 1 commit into
mainfrom
pch/instance_pre_clone
Nov 8, 2021
Merged

InstancePre can impl Clone#3510
alexcrichton merged 1 commit into
mainfrom
pch/instance_pre_clone

Conversation

@pchickey
Copy link
Copy Markdown
Contributor

@pchickey pchickey commented Nov 6, 2021

Its a manually written impl, not a derive, because InstancePre<T>: Clone
is not bound by T: Clone.

The clone should be reasonably inexpensive: Clone for Module is just an
Arc, and Clone for Definition should also just be an Arc on the HostFunc
or Instance variants. An InstancePre shouldnt contain any
Definition::Extern variants because there is not yet a Store associated
with it- right?

Its a manually written impl, not a derive, because InstancePre<T>: Clone
does not require T: Clone.

The clone should be reasonably inexpensive: Clone for Module is just an
Arc, and Clone for Definition should also just be an Arc on the HostFunc
or Instance variants. An InstancePre shouldnt contain any
Definition::Extern variants because there is not yet a Store associated
with it- right?
@pchickey pchickey force-pushed the pch/instance_pre_clone branch from cb6bcc9 to ee153bf Compare November 6, 2021 00:15
@pchickey pchickey requested a review from alexcrichton November 6, 2021 00:16
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Nov 6, 2021
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 6, 2021

Subscribe to Label Action

cc @peterhuene

Details This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton alexcrichton merged commit 2053e97 into main Nov 8, 2021
@alexcrichton alexcrichton deleted the pch/instance_pre_clone branch November 8, 2021 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants