Giter Site home page Giter Site logo

Mirage support about pgx HOT 11 CLOSED

arenadotio avatar arenadotio commented on June 27, 2024
Mirage support

from pgx.

Comments (11)

paurkedal avatar paurkedal commented on June 27, 2024 2

I should mention that the pgx master branch works with MirageOS. I am wondering if, after improving the API, you would be open to a PR adding a pgx-mirage subpackage containing the adapter and a simple test, which at least does a non-unix build?

from pgx.

brendanlong avatar brendanlong commented on June 27, 2024 1

I asked about this on the OCaml Discuss forum: https://discuss.ocaml.org/t/easiest-way-to-ensure-a-package-is-usable-in-mirage-in-ci/5607

from pgx.

anuragsoni avatar anuragsoni commented on June 27, 2024

@paurkedal I was also working to add a pgx-mirage subpackage, but if you already have an implementation working, we'd be very interested in merging support for mirage!

from pgx.

paurkedal avatar paurkedal commented on June 27, 2024

@anuragsoni Depends how far you got. If you look at the discuss thread, you'll see I'm missing functoria support, but it's otherwise working (well, at least a simple query). I posted by version in a gist, so you can compare.

from pgx.

anuragsoni avatar anuragsoni commented on June 27, 2024

@paurkedal I just looked at your gist, that's pretty much what i had as well (modulo some differences about at what point the channel was flushed. I also was leaning towards failing for let getlogin () = Lwt.return "unikernel" (* TODO: Other default or fail? *)

I missed the update on the discuss thread yesterday, and functoria indeed looks like the way to go here. I'm still pretty early in my mirage journey so I didn't think about functoria as for some reason I assumed that's more for use by the unikernel application vs a library that's usable via a unikernel.
I should look at the project layout for some existing mirage libraries like conduit as that should help me learn how a library should be structured to make it easy to consume via the regular mirage workflow.

from pgx.

paurkedal avatar paurkedal commented on June 27, 2024

Good, I suggest you pull ahead with your implementation then.

I think an option for getlogin, and maybe even all of host, port, user, password, and database, would be to make them configurable via the MirageOS config.ml. But otherwise I agree, since just having a user without other settings will hardly be useful for remote connections, which always requires at least a at host, but which should also be authenticated.

from pgx.

anuragsoni avatar anuragsoni commented on June 27, 2024

@paurkedal Sounds good. I'll add an initial implementation soon just to get the ball rolling, while i learn a little more about how to improve the library via functoria.

There are a couple of points in my implementation (around opening the connection) that i'd like to adapt based on your gist. I was curious about what's the LICENSE for the gist?

from pgx.

paurkedal avatar paurkedal commented on June 27, 2024

Maybe it's simplest if I make it public domain, just checking what's the right way to do it.

from pgx.

paurkedal avatar paurkedal commented on June 27, 2024

I updated the draft with an LGPL 2-or-later license header, as it wasn't clear to me how to make the public domains statement, but I can assign over copyright or make it public domain if you know the procedure.

from pgx.

anuragsoni avatar anuragsoni commented on June 27, 2024

I updated the draft with an LGPL 2-or-later license header, as it wasn't clear to me how to make the public domains statement, but I can assign over copyright or make it public domain if you know the procedure.

Would this need to be LGPL 2 with the OCaml linking exception? That's the current license for pgx. I'm guessing this exception is present because of OCaml statically linking by default? I'd appreciate any guidance here since I've mostly dealt with MIT/BSD license before.

from pgx.

paurkedal avatar paurkedal commented on June 27, 2024

Fixed. @brendanlong I copied the header from pgx/src/pgx.mli, so there may be a slight licensing issue of the original PG'OCaml code, just so you know.

from pgx.

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.