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

Added LinearMemory trait #3119

Merged
merged 15 commits into from
Aug 23, 2022
Merged

Added LinearMemory trait #3119

merged 15 commits into from
Aug 23, 2022

Conversation

ptitSeb
Copy link
Contributor

@ptitSeb ptitSeb commented Aug 18, 2022

Added LinearMemory trait, to describe memory used in runtime.

@ptitSeb ptitSeb requested a review from syrusakbary as a code owner August 18, 2022 15:02
@ptitSeb ptitSeb requested a review from john-sharratt August 18, 2022 15:02
@syrusakbary
Copy link
Member

@ptitSeb can you add tests using a custom memory implementation?

@syrusakbary
Copy link
Member

@ptitSeb I think we want the custom memory to be used from the Tunables to make sure the wasmer API is well-rounded so people can use it properly

_vm_definition_location: NonNull<VMMemoryDefinition>,
) -> Result<VMMemory, MemoryError> {
let memory = VMTinyMemory::new().unwrap();
Ok(VMMemory::from_custom(memory))
Copy link
Member

Choose a reason for hiding this comment

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

Can we do Ok(memory.into()) (as I believe the From is implemented)

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Aug 23, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 23, 2022

Build succeeded:

@bors bors bot merged commit ec95964 into master Aug 23, 2022
@bors bors bot deleted the feat_linearmemory_trait branch August 23, 2022 10:09
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.

3 participants