Comments (12)
Here is a repo with what I need to reproduce on my machine
https://github.com/sandstrom/wasmer-install-repro
from wasmer-ruby.
Thank you for the investigation. I'll try to find time to address that. I'll keep you updated.
from wasmer-ruby.
@Hywan Check out this script from Skylight. They also have a rust-agent, so should be fairly similar to your case.
It's also a very well-written gem (one of its authors is a former Rails core team member and (I think) also a former Rust core team member).
https://github.com/skylightio/skylight-ruby/blob/master/ext/extconf.rb
https://github.com/skylightio/skylight-ruby/blob/master/skylight.gemspec#L49
from wasmer-ruby.
Hello,
Thanks for the bug report. I see in your logs:
Using rake 13.0.3
Using concurrent-ruby 1.1.8
Using i18n 1.8.9
Using minitest 5.10.3
[… redacted for brevity]
Using therubyracer 0.12.3
Using tzinfo-data 1.2021.1
Using user_agent_parser 2.7.0
where those dependencies are coming from? We aren't using them as far as I know.
I just tried on macOS Big Sur with Ruby 3.0.0 and it succeeded with no issue.
I've then installed Ruby 2.6.6 with rbenv
and retried. It succeeded with no issue.
[…]
current directory: /Users/hwhost/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/wasmer-0.5.0
/Users/hwhost/.rbenv/versions/2.6.6/bin/ruby -rrubygems /Users/hwhost/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rake-13.0.3/exe/rake RUBYARCHDIR\=/Users/hwhost/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/extensions/-darwin-20/2.6.0/wasmer-0.5.0 RUBYLIBDIR\=/Users/hwhost/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/extensions/-darwin-20/2.6.0/wasmer-0.5.0
Successfully installed wasmer-0.5.0
Parsing documentation for wasmer-0.5.0
Parsing sources...
100% [ 2/ 2] lib/wasmer.rb
Installing ri documentation for wasmer-0.5.0
Done installing documentation for wasmer after 0 seconds
1 gem installed
How did you install Ruby 2.6.6?
from wasmer-ruby.
I installed it via https://github.com/postmodern/ruby-install,
something likebrew install ruby-install && ruby-install 2.6
from wasmer-ruby.
Checked the install script (Rakefile), could it be that I don't have cargo
installed? (not found…)
from wasmer-ruby.
Tried adding cargo, but doesn't seem to help.
Looking closer at the error message, I think this is the failing line:
https://github.com/wasmerio/wasmer-ruby/blob/master/Rakefile#L12
Don't know why though, but maybe there are assumptions there, about the host environment, that one shouldn't do in a general install script?
Maybe you could check similar install scripts in other gems, and see what they've done?
from wasmer-ruby.
I've failed to reproduce your error even with the given repository.
What version of gem
do you have?
To simplify our debugging session, can you please try to clone this repository, and run:
$ rake test
I suspect that you have a static version of Ruby, which isn't compatible with how rutie
works (rutie
is the underlying library we use to integrate seamlessly with Ruby). Check the Dynamic vs Static Builds Section to learn more. Can you please give me the result of:
$ ruby -e "pp RbConfig::CONFIG['ENABLE_SHARED']"
We should see a "yes"
.
from wasmer-ruby.
Yes, you are correct, I have a static version of ruby.
I left a comment in rutie (danielpclark/rutie#45 (comment)), about maybe checking if helix has found a solution to this problem. Other than that, I don't have much I can contribute.
Still looking forward to trying out wasmer! I'll see if we can change our environment setup to use dynamic ruby. If that isn't easily, we'll have to wait and see if rutie gets support for static builds. Thanks for taking time looking into this!
Maybe you could add that check to the rake file, raise "Expected dynamic ruby, see http://www….com" unless pp(RbConfig::CONFIG['ENABLE_SHARED']) == 'yes'
from wasmer-ruby.
Yeah, raising such error is indeed a good idea.
For what project would you like to use wasmer-ruby
? I'm curious :-).
(Closing the issue as the problem is “solved”).
from wasmer-ruby.
Evaluate untrusted code (probably AssemblyScript) in a Rails application.
Yeah, feel free to close, agree initial issue is "solved"!
Two things that one could do though:
- Add the suggested warning above (for others that trip on this)
- Check in with the rutie folks and see how much work it would be to support static builds (and if it's possible to help out).
It's up to you and the Wasmer team though to decide, obviously! 😄
Either way I'll keep my eyes on this and hopefully we'll be able to give it a try in 3-6 months, if we're lucky 💯
from wasmer-ruby.
If you're willing to open a PR to raise an error/warning when the Ruby version has been statically distributed, I would be very happy to merge it!
I can try to take a look at Rutie itself also, as soon as I've time :-).
from wasmer-ruby.
Related Issues (20)
- Support Ruby 2.7 HOT 1
- Export Wasm globals ? HOT 4
- WASI / import function support ? HOT 4
- Failed to install this gem HOT 7
- gem install fails with Rust 1.46.0 HOT 3
- Too much rust too little Ruby HOT 1
- Install fails on Ruby 3.0.1 HOT 1
- More parity with other languages HOT 5
- Seg fault with statically linked version of Ruby HOT 4
- Migrate `rutie-derive` and `rutie-derive-macros` to `rutie HOT 1
- Release version 1.0.1 HOT 1
- [More Examples] Could more examples be added? HOT 1
- Integer conversion raising en exception
- Challenges in Running JS Interpreter via wasmer-ruby HOT 4
- Update to latest wasmer 2.3 (or 3.0 when released)
- Redirecting STDOUT and STDERR HOT 9
- Feature request : new classes `Uint64View`, `Int64View`, `Float32View`, and `Float64View` HOT 1
- Support WCGI?
- `undefining the allocator of T_DATA class ...` warning on Ruby 3.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasmer-ruby.