diff options
author | Troy Figiel <troy@troyfigiel.com> | 2024-01-22 23:54:46 +0100 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2024-02-20 13:58:27 +0200 |
commit | 292b46e619d9d8fc0dc6e1a16aee16f9234ae729 (patch) | |
tree | b430333c01b2b610273f6d11eded7b2fdfccd25e | |
parent | 8887b5d3ce89832efc2a8aa2eb4223fb61c4ff7d (diff) | |
download | guix-292b46e619d9d8fc0dc6e1a16aee16f9234ae729.tar.gz |
gnu: Add rust-inline-c-0.1.
* gnu/packages/crates-io.scm (rust-inline-c-0.1): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
-rw-r--r-- | gnu/packages/crates-io.scm | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index f67e7ac519..ccd82c2b0a 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -29398,6 +29398,41 @@ deordinalize, demodulize, foreign key, and pluralize/singularize are supported as both traits and pure functions acting on String types.") (license license:bsd-2))) +(define-public rust-inline-c-0.1 + (package + (name "rust-inline-c") + (version "0.1.7") + (source + (origin + (method url-fetch) + (uri (crate-uri "inline-c" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "1mcd7jcfwhkplgz1xb4iqrpc6m29v2k28w4q42yika9g23bd639l")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-assert-cmd" ,rust-assert-cmd-1) + ("rust-cc" ,rust-cc-1) + ("rust-inline-c-macro" ,rust-inline-c-macro-0.1) + ("rust-lazy-static" ,rust-lazy-static-1) + ("rust-predicates" ,rust-predicates-2) + ("rust-regex" ,rust-regex-1) + ("rust-rustc-version" ,rust-rustc-version-0.3) + ("rust-target-lexicon" ,rust-target-lexicon-0.11) + ("rust-tempfile" ,rust-tempfile-3)))) + (home-page "https://github.com/Hywan/inline-c-rs") + (synopsis "Write and execute C code inside Rust") + (description + "@code{inline-c} is a small crate that allows a user to write +C (including C++) code inside Rust. Both environments are strictly sandboxed. +The C code is transformed into a string which is written to a temporary file. +This file is then compiled into an object file, that is finally executed. + +The primary goal of @code{inline-c} is to ease the testing of a C API of a +Rust program (generated with @code{cbindgen} for example).") + (license license:bsd-3))) + (define-public rust-inline-c-macro-0.1 (package (name "rust-inline-c-macro") |