Giter VIP home page Giter VIP logo

Comments (23)

chrisseaton avatar chrisseaton commented on July 29, 2024 20

openssl is now enabled by default on master. We're now merging this into the next GraalVM release.

from truffleruby.

chrisseaton avatar chrisseaton commented on July 29, 2024 14

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.

chrisseaton avatar chrisseaton commented on July 29, 2024 11

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.

fad82d0

from truffleruby.

chrisseaton avatar chrisseaton commented on July 29, 2024 9

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.

chrisseaton avatar chrisseaton commented on July 29, 2024 5

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.

chrisseaton avatar chrisseaton commented on July 29, 2024 3

I'll post things here next time I do some commits so you can see concretely what I'm doing.

from truffleruby.

chrisseaton avatar chrisseaton commented on July 29, 2024 3

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.

#72

from truffleruby.

chrisseaton avatar chrisseaton commented on July 29, 2024 3

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.

DemiMarie avatar DemiMarie commented on July 29, 2024 2

@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.

ylluminate avatar ylluminate commented on July 29, 2024 1

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.

eregon avatar eregon commented on July 29, 2024 1

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.

chrisseaton avatar chrisseaton commented on July 29, 2024

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.

chrisseaton avatar chrisseaton commented on July 29, 2024

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.

ylluminate avatar ylluminate commented on July 29, 2024

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.

chrisseaton avatar chrisseaton commented on July 29, 2024

Trying to implement rb_scan_args as a macro #74.

from truffleruby.

chrisseaton avatar chrisseaton commented on July 29, 2024

Related to C extensions, I'm looking at implementing fiddle in #85.

from truffleruby.

ylluminate avatar ylluminate commented on July 29, 2024

It really looks like you're mowing down https://github.com/graalvm/truffleruby/tree/master/spec/tags/optional/capi rather quickly.

from truffleruby.

ylluminate avatar ylluminate commented on July 29, 2024

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.

chrisseaton avatar chrisseaton commented on July 29, 2024

@DemiMarie yes definitely right for OpenSSL, but I should just also mention that Sulong can actually handle inline assembly as well!

from truffleruby.

DemiMarie avatar DemiMarie commented on July 29, 2024

@chrisseaton Nice! Does it treat it the same way as ex. GCC or Clang?

from truffleruby.

chrisseaton avatar chrisseaton commented on July 29, 2024

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.

ylluminate avatar ylluminate commented on July 29, 2024

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.

chrisseaton avatar chrisseaton commented on July 29, 2024

The next version of GraalVM will include this by default.

from truffleruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.