Skip to content

Refactor shared memory internals, expose embedder methods#5311

Merged
abrown merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:refactor-shared-memory
Nov 22, 2022
Merged

Refactor shared memory internals, expose embedder methods#5311
abrown merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:refactor-shared-memory

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit refactors the internals of wasmtime_runtime::SharedMemory a bit to expose the necessary functions to invoke from the wasmtime::SharedMemory layer. Notably some items are moved out of the RwLock from prior, such as the type and the VMMemoryDefinition. Additionally the organization around the atomic_* methods has been redone to ensure that the wasmtime-layer abstraction has a single method to call into which everything else uses as well.

This commit refactors the internals of `wasmtime_runtime::SharedMemory`
a bit to expose the necessary functions to invoke from the
`wasmtime::SharedMemory` layer. Notably some items are moved out of the
`RwLock` from prior, such as the type and the `VMMemoryDefinition`.
Additionally the organization around the `atomic_*` methods has been
redone to ensure that the `wasmtime`-layer abstraction has a single
method to call into which everything else uses as well.
@alexcrichton
Copy link
Copy Markdown
Member Author

cc @haraldh

@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Nov 21, 2022
@github-actions
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Contributor

@haraldh haraldh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although it could have been split into more commits

@abrown abrown merged commit 6ce2ac1 into bytecodealliance:main Nov 22, 2022
@alexcrichton alexcrichton deleted the refactor-shared-memory branch March 28, 2023 19:56
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.

3 participants