[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rust build system, building libc crate
From: |
ng0 |
Subject: |
Re: rust build system, building libc crate |
Date: |
Sat, 03 Feb 2018 22:35:20 +0000 |
Now I'm going to sleep on this:
;; Rust doesn't have a stable ABI yet. Because of this
;; Cargo doesn't have a search path for binaries yet.
;; Until this changes we are working around this by
;; distributing crates as source and replacing
;; references in Cargo.toml with store paths.
(copy-recursively "src" (string-append rsrc "/src"))
(touch (string-append rsrc "/.cargo-ok"))
(generate-checksums rsrc src)
(install-file "Cargo.toml" rsrc)
;; When the package includes executables we install
;; it using cargo install. This fails when the crate
;; doesn't contain an executable.
(if (file-exists? "Cargo.lock")
(zero? (system* "cargo" "install" "--root" out))
(begin
(mkdir out)
#t))))
... and look into libc after the 8th again.
Maybe someone of you has an epiphany on the libc crate until
then.
--
ng0 :: https://ea.n0.is
A88C8ADD129828D7EAC02E52E22F9BBFEE348588 :: https://ea.n0.is/keys/