Trying to pack ruby for icp#653
Open
graial wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greetings!
I decided recently to see if I could deploy Rails to Internet Computer.
They are only starting to get Wordpress partially deployed at the moment. So this is a frontier deployment.
So far, I know that I need to provide some polyfills for the
wasi-snapshot-preview1and am still learning the specifics of the runtime.I also understand that a rails app on ICP will need to be split up into serverless functions.
For now, I'm just trying to get a successful build. If it's successful, I wonder if/how you would want to add this support?
What I've done
With this PR, I've generated a new build profile called
wasm32-unknown-icp.What's working
I can compile, pack and run the quick example on wasip1
I can compile for
emscripten&icptargets using the commandrake --verbose build:3.3-wasm32-unknown-icp-fullWhat's not working
I cannot convert the wasip1 build to ic using wasi2ic. I end up with lots of incompatible imports from the wasi-snapshot-preview1 (see discussion here)
I cannot pack the quick example on emscripten or icp. they fail with:
I tried
emscriptenfirst because the handler seemed simpler. But I think ICP mentioned that wasip1 can be supported. So maybe I can try linking the polyfills into the wasip1 module next.Side Note: I'm focusing on 3.3 right now because I was able to deploy it via
wasmify_railspreviously. I was unsuccessful in trying Versions 3.4 or 4