Introducing the Meson Wrap webservice for dependencies

810 views
Skip to first unread message

Jussi Pakkanen

unread,
May 29, 2015, 4:05:47 PM5/29/15
to meson...@googlegroups.com
Hello all

One of the most annoying aspects of modern C and C++ development is dependency management. It works nicely on platforms with a native package manager but becomes very difficult on platforms without one or if you need to use a different version of a dependency than what your distribution provides.

The Meson Build System has for a long time shipped with the Wrap dependency system that allows you to embed other Meson projects in your source tree while still using system dependencies when they are available. Writing these build definitions does require a fair bit of effort, though. We now introduce the Wrap database web service to make creating and sharing build definitions extremely easy. Its power and simplicity are best demonstrated with an example.

Suppose you have a project that depends on the zlib compression library. First you go to http://wrapdb.mesonbuild.com and find the list of provided projects. After a few clicks you'll get to the actual build definition, which can be found here:


Then you just add the contents of that page to the subprojects directory called zlib.wrap. The second step is to declare in your main build definition that you wish to use the subproject. That is all you need to do.

Meson will automatically download both the original source code and all necessary modifications and build the subproject as if it was a native part of your own project.

Wrap files are all based on source code and thus will work on all platforms supported by Meson (and the project being provided, of course). There is no need to provide different binaries for Debian, Fedora, Ubuntu, OSX, Android, Windows debug, Windows Release and so on.

We feel that this is a great step in reducing dependency problems that plaque native code development. We hope you do too. Enjoy!

Common questions about Wrap:

Isn't this just Go get or Rust cargo but for C and C++?

Yes. But our aim is to provide this experience for projects that do not support it natively.

How can I contribute?

The simplest thing is to just use the service and give us your feedback. If you want to do more, we recommend creating your own wraps and submitting them to the database. The process is extremely simple and fully documented here:


Isn't it unsafe to download and execute random source packages?

Wrap definition files are plain text so they are easy to audit. All downloaded files are checksum verified so you know that you are not man-in-the-middled.

How is this different from existing dependency systems (biicode etc)?

To our knowledge this is the first system of its kind that combines the following features:

- based on source code rather than prebuilt binaries
- build system having a native concept of subproject embedding
- multiplatform
- fully open source and community-driven, no CLAs

What about subprojects that themselves use subprojects?

This is fully supported of course. If you have two subprojects that use a common subsubproject, Meson will automatically detect this and do the right thing.

What if I'm too lazy to search projects through the web ui?

We are working on a client that allows you to search and add subprojects directly from the command line.

Can I run an internal version of the server for mirroring and keeping my internal projects?

Sure, the code is available. You might not even need the server, though, because hosting wrap files only requires putting a few files on an intranet server. Wrap also supports using Git checkouts as subprojects.

Igor Gnatenko

unread,
May 30, 2015, 1:18:54 PM5/30/15
to Jussi Pakkanen, meson...@googlegroups.com
I've also wrote this announce at my blog:
https://blogs.gnome.org/ignatenko/2015/05/30/meson-and-3rd-party-dependencies-wrap-db-is-here/

Today I made webUI much nicer:
* Added favicon
* Added bootstrap theme

From low-level things today I added:
* Config where you set up secret key
* Now you can start it also via uwsgi (wrapdb.mesonbuild.com uses it)
* Static files served by nginx at wrapdb.mesonbuild.com

Also Jussi didn't write that we already have 4 projects now in DB:
* enet
* lua
* sqlite
* zlib
> --
> You received this message because you are subscribed to the Google Groups
> "The Meson Build System" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mesonbuild+...@googlegroups.com.
> To post to this group, send email to meson...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/mesonbuild/CAAjYPQ%3Du02yOpk1%2B6sBw%3D%2B4gNBcZ0a4d_fzWt76LbYt-k5B04A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
-Igor Gnatenko
Reply all
Reply to author
Forward
0 new messages