Comments (23)
openssl
is now enabled by default on master. We're now merging this into the next GraalVM release.
from truffleruby.
We can now load the openssl
C extension and the associated Ruby code that sets it up. We pass most of the specs for it, but can't even successfully run the setup for the MRI tests for it. And actually trying to use it doesn't work. Progress is pretty quick now though.
from truffleruby.
All the openssl
specs now pass. There's still lots of tests, and it still doesn't actually work.
I'm having some trouble with what I think is undefined behaviour in openssl
which Clang happens to accept but Sulong is more strict about and detects as undefined.
from truffleruby.
openssl
seems to basically work now for making requests that use HTTPS
. We still need to integrate so it's available by default.
from truffleruby.
We can now run the setup for the MRI tests, so we've got a large number of fine-grained tests we can now work through.
from truffleruby.
I'll post things here next time I do some commits so you can see concretely what I'm doing.
from truffleruby.
Today I'm looking at how to implement rb_scan_args
. It's a simple function but happens to trip up a few things that Sulong doesn't implement as well as we'd like.
from truffleruby.
We've been working on C extension specs for the last week, to hopefully make it easier to run openssl without encountering so many bugs.
from truffleruby.
@eregon I am glad that the system-provided OpenSSL library is being used. A lot of the crypto stuff makes assumptions regarding timing that might break on a JIT, and besides much of it is in assembly anyway. And none of it accesses Ruby objects.
from truffleruby.
sulong
looks tremendous. Where can we follow along the progress of getting OpenSSL to work via Sulong? From what I quickly gathered, and perhaps I'm wrong, there will be some kind of a fork of or commits to OpenSSL that will get it prepped to compile properly with sulong
and this is where your effort is going to come in in terms of what you're saying here. Ultimately it would seem that this will be a support step for rvm
installation as it will have to grab this version of OpenSSL or compile it itself via sulong
during the install process...
This is quite a selfish inquiry as I'd love to follow along (and probably many others) so that we could get a feel for how to convert other programs or libraries over with sulong
and this seems like a perfect opportunity! :)
from truffleruby.
From what I quickly gathered, and perhaps I'm wrong, there will be some kind of a fork of or commits to OpenSSL that will get it prepped to compile properly with sulong and this is where your effort is going to come in in terms of what you're saying here
Just to clarify, we might need to modify the code of the openssl C extension, but we do not plan on touching the OpenSSL library itself (but rather use the system-installed library).
from truffleruby.
Where can we follow along the progress of getting OpenSSL to work via Sulong?
That's what this issue is for.
From what I quickly gathered, and perhaps I'm wrong, there will be some kind of a fork of or commits to OpenSSL that will get it prepped to compile properly with sulong and this is where your effort is going to come in in terms of what you're saying here.
Yes I may modify openssl in place here
https://github.com/graalvm/truffleruby/tree/master/truffleruby/src/main/c/openssl
But I then hope to go back and fix the need for any modifications later on.
Ultimately it would seem that this will be a support step for rvm installation as it will have to grab this version of OpenSSL or compile it itself via sulong during the install process...
It should come ready to use in the GraalVM bundle.
from truffleruby.
Where can we follow along the progress of getting OpenSSL to work via Sulong?
If you mean how to build it yourself, see
https://github.com/graalvm/truffleruby/blob/master/doc/contributor/cexts.md
from truffleruby.
Yes, wanting to follow along with your code changes in order to get an idea of the workflow at converting our own C, etc. projects over to run via Sulong. Thanks!
from truffleruby.
Trying to implement rb_scan_args
as a macro #74.
from truffleruby.
Related to C extensions, I'm looking at implementing fiddle
in #85.
from truffleruby.
It really looks like you're mowing down https://github.com/graalvm/truffleruby/tree/master/spec/tags/optional/capi rather quickly.
from truffleruby.
You're doing fantastic. Been tracking your updates and commits. Several of us have been here in the background silently and cautiously cheering you on and are very excited!
from truffleruby.
@DemiMarie yes definitely right for OpenSSL, but I should just also mention that Sulong can actually handle inline assembly as well!
from truffleruby.
@chrisseaton Nice! Does it treat it the same way as ex. GCC or Clang?
from truffleruby.
I think it still interprets (and just-in-time compiles) the assembly instructions, rather than copying them into machine code. It all has to work on a standard JVM where you can't just emit machine code whenever you want.
from truffleruby.
Great work guys. Really excited to see you forging ahead here.
Giving you a little love over on Reddit.
I think Rails users will be most interested in this at the moment for server purposes and I think that's your primary target right now from listening to your talks, etc. Please correct me if I'm wrong.
from truffleruby.
The next version of GraalVM will include this by default.
from truffleruby.
Related Issues (20)
- Prepending a module to Integer disables many Inlined*Node
- method_source compatibility problems introduced with TruffleRuby 24.0.0 HOT 3
- Error installing pg 1.1.4 HOT 1
- concurrent-ruby Fixed Thread Pool memory leak HOT 2
- Array#pack does not support :buffer kwarg HOT 1
- Monkey patching not working HOT 2
- TruffleRuby set `host_cpu` to `aarch64` on `arm64-darwin` causing `REUSE_AS_BINARY_ON_TRUFFLERUBY` to not work as expected HOT 3
- rails 7, rails new - no such filre or directory HOT 1
- gem error: OpenSSL is not available in Oracle Linux 9 HOT 4
- How to call a method from java whose name is send? HOT 2
- dead handle with mongoid HOT 8
- Benchmark ORM on Truffleruby vs CRuby HOT 1
- using "find pattern" matching in a dynamically-defined method results in NPE HOT 3
- Segfault in 24.1.0-dev GFTC builds with pg driver HOT 6
- `StringIO` does not set the ASCII-8BIT encoding in `wb` mode HOT 1
- Hash.to_h with block not yielding splat args well HOT 2
- Documentation: installing TruffleRuby in JVM mode from RVM HOT 1
- Segfault in 24.2.0-dev GFTC when bundle installing HOT 4
- Java exceptions not caught by bare rescue HOT 8
- EA build: Crashes when `config/puma.rb` starts with the line `#!/usr/bin/env puma` HOT 3
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 truffleruby.