-
Notifications
You must be signed in to change notification settings - Fork 180
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
Support the openssl standard library #61
Comments
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 |
That's what this issue is for.
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.
It should come ready to use in the GraalVM bundle. |
If you mean how to build it yourself, see https://github.com/graalvm/truffleruby/blob/master/doc/contributor/cexts.md |
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! |
I'll post things here next time I do some commits so you can see concretely what I'm doing. |
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). |
Today I'm looking at how to implement |
Trying to implement |
Related to C extensions, I'm looking at implementing |
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. |
It really looks like you're mowing down https://github.com/graalvm/truffleruby/tree/master/spec/tags/optional/capi rather quickly. |
We can now load the |
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! |
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. |
All the I'm having some trouble with what I think is undefined behaviour in |
|
@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. |
@DemiMarie yes definitely right for OpenSSL, but I should just also mention that Sulong can actually handle inline assembly as well! |
@chrisseaton Nice! Does it treat it the same way as ex. GCC or Clang? |
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. |
|
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. |
The next version of GraalVM will include this by default. |
* commit 'fa94243553b8ac15b5acc8f0e6223defea6ed212': Fixes Fix integer coercions in float Revert "Bignum should be IS_BOXED and UNBOX to a double" Documentation fix Lint Fix coercion guards Minor fixes Float#== specialisation too broad to_s and to_str on foreign objects Foreign objects should respond_to?(:inspect) Truffle::Debug.java_to_string becomes Truffle::Interop.to_string Coercion of foreign numbers to Ruby numbers works Truffle::Interop.unbox_if_needed Bignum should be IS_BOXED and UNBOX to a double Make the backtrace interleaver tolerant to running out of Java frames Let Truffle::Debug.print print anything Most objects with #[] shouldn't have KEYS, so people don't READ them
Process::Status#==: compare raw process status Merge-Requested-By: chrisseaton Merge-Queue-Digest: ded691629c2d53cdaf513f69b863a5ed00dc40f182ec0b71a1707f87a8fdef9d
We are implementing support for
openssl
using Sulong as described in our RubyConf talk Ruby's C Extension Problem and How We're Fixing It.I'll comment on progress in this issue. Feel free to ask questions or contribute in any other way.
The text was updated successfully, but these errors were encountered: