all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Craven <david@craven.ch>
To: ng0 <ng0@libertad.pw>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: rust: cargo build-system: how to handle libraries
Date: Wed, 28 Dec 2016 01:07:52 +0100	[thread overview]
Message-ID: <CAL1_imkm7WEzfCUdxExjQGxVk-oXpFxqBikLT2Cpw3KBvz=3VA@mail.gmail.com> (raw)
In-Reply-To: <8760m5c4dv.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me>

> We run (or this is the default) cargo with `--bin`, which is
> necessary for everything which needs to be compiled and features
> a Cargo.toml.

All crates have a Cargo.toml file. The interesting crates are the ones with
a Cargo.lock file.

> To "build" libraries, we have to explicitly tell cargo to not
> run/build/whatever with --bin ?

Building libraries is currently not very useful at the moment, since they are
not meant to be libraries in the C sense, but in the sense that it's a
collection
of source code that can be reused in a rust project. One can create a library
in the C sense, but most crates do not do this and are not intended to be abi
compatible with C.

> Or do I have to interprete what I read a while ago "we just need
> to copy the libraries to the store" as literally "if we encounter
> no Cargo.toml, let's copy everything to the store as is"?

If we encounter no Cargo.lock file it generally means the above.

  reply	other threads:[~2016-12-28  0:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-27 23:57 rust: cargo build-system: how to handle libraries ng0
2016-12-28  0:07 ` David Craven [this message]
2016-12-28  9:24   ` ng0
2016-12-28  9:26     ` ng0
2016-12-28  9:59       ` David Craven
2016-12-28 16:42         ` ng0
2016-12-28 16:49           ` ng0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL1_imkm7WEzfCUdxExjQGxVk-oXpFxqBikLT2Cpw3KBvz=3VA@mail.gmail.com' \
    --to=david@craven.ch \
    --cc=guix-devel@gnu.org \
    --cc=ng0@libertad.pw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.