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

WASM Support #248

Closed
AndrewJSchoen opened this issue Nov 11, 2021 · 9 comments · Fixed by #249 or #311
Closed

WASM Support #248

AndrewJSchoen opened this issue Nov 11, 2021 · 9 comments · Fixed by #249 or #311
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers rust issue related to the code Rust library

Comments

@AndrewJSchoen
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I am working on a project that uses this crate, and we are looking to deploy the project in WebAssembly for use on the web. However, it appears that this library is not currently setup to handle this, and as such it prevents this from being possible as-is.

Describe the solution you'd like
I know of one fork of this repo that has added this support. Since it would make sense for such a change to be as minimally invasive as possible, it might make sense to configure such implementation as a feature that could be enabled.

Describe alternatives you've considered
Currently I am just using the other repo mentioned, but it would be nice to see this in the official repo/crate.

@alphaville alphaville self-assigned this Nov 11, 2021
@alphaville alphaville added good first issue Good for newcomers enhancement New feature or request rust issue related to the code Rust library labels Nov 11, 2021
@alphaville
Copy link
Owner

Thank you, @AndrewJSchoen for reporting this. Would it be convenient if we supported WebAssembly using a feature?

@AndrewJSchoen
Copy link
Contributor Author

Yes, that would be fantastic!

@alphaville
Copy link
Owner

@AndrewJSchoen Support for Wasm has been added to OpEn version 0.7.4 - just released. You can have a look at the doucmentation.

@AndrewJSchoen
Copy link
Contributor Author

This looks great! Thanks!

@AndrewJSchoen
Copy link
Contributor Author

I was working with the new WASM support, and specified it my cargo.toml as such:

optimization_engine = { version = "0.7.4", features = ["wasm"] }

, and encountered an error when running it. The only log I was able to retrieve from WebAssembly was

panicked at 'time not implemented on this platform', library/std/src/sys/wasm/../unsupported/time.rs:13:9

I tested this again with the old version I was using (yepw/optimization-engine), and this error did not appear. Maybe something didn't quite make it through to 0.7.4?

@alphaville
Copy link
Owner

@AndrewJSchoen thank you for reporting this - let me check.

@alphaville alphaville reopened this Dec 6, 2021
@AndrewJSchoen
Copy link
Contributor Author

AndrewJSchoen commented Dec 6, 2021

Sounds good. Feel free to let me know if you would like me to try/test anything on my end!

@AndrewJSchoen
Copy link
Contributor Author

@alphaville Any updates on this? Ideally I would like to switch to the official release.

AndrewJSchoen added a commit to AndrewJSchoen/optimization-engine that referenced this issue Jan 6, 2023
Fixes lingering issue with alphaville#248
@alphaville
Copy link
Owner

@AndrewJSchoen This has been resolved in OpEn v0.7.7 which has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers rust issue related to the code Rust library
Projects
None yet
2 participants