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

Refactor/clarify dylib ios functionality #118

Closed
wants to merge 21 commits into from

Conversation

mattyg
Copy link
Member

@mattyg mattyg commented Sep 7, 2024

Change function names and comments to clarify that precompiled & serialized modules can be used on any platform, not just ios.

@@ -385,16 +385,6 @@ impl ModuleCache {
}
}

/// Configuration of a Target for wasmer for iOS
pub fn wasmer_ios_target() -> Target {
Copy link
Member Author

Choose a reason for hiding this comment

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

this function does not appear to be used anywhere in consuming crates

Copy link
Member

Choose a reason for hiding this comment

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

This was added by @jost-s, was it something that used to be in Holochain core and got moved here? That's what I vaguely remember. If so, was it something that Guillem was using?

Copy link
Member Author

@mattyg mattyg Sep 11, 2024

Choose a reason for hiding this comment

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

Yes I think that's right -- I don't see it used anywhere https://github.com/search?q=wasmer_ios_target&type=code

But actually now I realized that parts of this functionality aren't working so I'm not sure it was ever really tested or used. I'm going to wait to merge this PR and see if more changes needed to this crate first.

);
/// Compile a wasm binary, serialize it with wasmer's serializtion format, and write to a file.
/// This file can later be used for contexts where JIT compilation is not possible (iOS for example).
pub fn write_precompiled_serialized_module_to_file(
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove references to iOS in function name and comments, as this functionality can be used in other platforms as well

@mattyg mattyg marked this pull request as ready for review September 7, 2024 20:15
Copy link
Contributor

@jost-s jost-s left a comment

Choose a reason for hiding this comment

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

Sweet as, just one question about the test.

CHANGELOG.md Outdated Show resolved Hide resolved
crates/host/src/module/mod.rs Outdated Show resolved Hide resolved
crates/host/src/module/wasmer_sys.rs Outdated Show resolved Hide resolved
crates/host/src/module/wasmer_wamr.rs Outdated Show resolved Hide resolved
mattyg and others added 5 commits September 10, 2024 10:04
@mattyg
Copy link
Member Author

mattyg commented Sep 12, 2024

So it looks like the entire functionality to prebuild and include precompiled wasms as dylibs was borked during integration. I believe the wasms do need to be explicitly precompiled for the ios target (and any other target they would be executed on), and so this PR actually doesn't make sense.

I'm going to close this and revisit re-implementing or removing that functionality entirely in a subsequent PR when I can put some time towards it.

@mattyg mattyg closed this Sep 12, 2024
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