aboutsummaryrefslogtreecommitdiff
path: root/nix-rust
AgeCommit message (Collapse)Author
2021-06-01Only link with libdl on LinuxAlyssa Ross
Linux is (as far as I know) the only mainstream operating system that requires linking with libdl for dlopen. On BSD, libdl doesn't exist, so on non-FreeBSD BSDs linking will currently fail. On macOS, it's apparently just a symlink to libSystem (macOS libc), presumably present for compatibility with things that assume Linux. So the right thing to do here is to only add -ldl on Linux, not to add it for everything that isn't FreeBSD.
2020-12-03Remove 'dist' targetEelco Dolstra
We're not producing source tarballs anymore so this has been bitrotting.
2020-10-08rust: small patchesHorki
2020-05-08make check: Run unit testsEelco Dolstra
2020-02-10Remove macro_useLeonhard Markert
As of Rust 2018, macro_use is no longer required in most circumstances. I think it is generally a good idea to remove these when not needed, to stop them from polluting the crate's global namespace. https://doc.rust-lang.org/edition-guide/rust-2018/macros/macro-changes.html#macro_rules-style-macros
2019-12-19Merge branch 'libarchive' of https://github.com/yorickvP/nixEelco Dolstra
2019-12-16StorePath::new(): Check store directoryEelco Dolstra
2019-12-15Fix cargo testEelco Dolstra
2019-12-13Don't leak exceptionsEelco Dolstra
2019-12-13Get rid of CBoxEelco Dolstra
2019-12-13Validate tarball componentsEelco Dolstra
2019-12-10Speed up StorePath::to_string()Eelco Dolstra
1.81% -> 0.56%
2019-12-10Speed up base32::decode()Eelco Dolstra
From 1.03% to 0.19% of the runtime of 'nix-instantiate "<nixpkgs>" -A texlive.combined.scheme-full --dry-run'.
2019-12-10Make the Store API more type-safeEelco Dolstra
Most functions now take a StorePath argument rather than a Path (which is just an alias for std::string). The StorePath constructor ensures that the path is syntactically correct (i.e. it looks like <store-dir>/<base32-hash>-<name>). Similarly, functions like buildPaths() now take a StorePathWithOutputs, rather than abusing Path by adding a '!<outputs>' suffix. Note that the StorePath type is implemented in Rust. This involves some hackery to allow Rust values to be used directly in C++, via a helper type whose destructor calls the Rust type's drop() function. The main issue is the dynamic nature of C++ move semantics: after we have moved a Rust value, we should not call the drop function on the original value. So when we move a value, we set the original value to bitwise zero, and the destructor only calls drop() if the value is not bitwise zero. This should be sufficient for most types. Also lots of minor cleanups to the C++ API to make it more modern (e.g. using std::optional and std::string_view in some places).
2019-12-10Add StorePath testsEelco Dolstra
2019-12-10Shut up warningsEelco Dolstra
2019-12-10Use hyper directly instead of reqwestEelco Dolstra
2019-12-10Update to async/await-enabled tokioEelco Dolstra
2019-12-10Add NAR parserEelco Dolstra
2019-12-10StorePath improvementsEelco Dolstra
2019-12-10Add base32 encoder/decoderEelco Dolstra
2019-12-10Move stuff aroundEelco Dolstra
2019-12-10Drop some dependenciesEelco Dolstra
2019-12-10Use rustlsEelco Dolstra
In particular, this enables HTTP/2 support in reqwest, which is a lot more efficient.
2019-12-10Basic BinaryCacheStore implementation using async RustEelco Dolstra
2019-12-09nix-rust: remove unused tar file codeYorick van Pelt
2019-11-29Make libnixrust a dynamic libraryEelco Dolstra
This is a hack to fix the build on macOS, which was failing because libnixrust.a contains compiler builtins that clash with libclang_rt.osx.a. There's probably a better solution... https://hydra.nixos.org/build/107473280
2019-11-27make clean: Delete nix-rust/targetEelco Dolstra
2019-11-27When OPTIMIZE=0, build rust code in debug modeEelco Dolstra
2019-11-27Fix macOS buildEelco Dolstra
https://hydra.nixos.org/build/107466992
2019-11-26Update Cargo.lockEelco Dolstra
2019-11-26-Z offline -> --offlineEelco Dolstra
2019-11-26Ignore tar header entriesEelco Dolstra
In particular, these are emitted by 'git archive' (in fetchGit).
2019-11-26Move code aroundEelco Dolstra
2019-11-26Shut up some rust warningsEelco Dolstra
2019-11-26More Rust FFI adventuresEelco Dolstra
We can now convert Rust Errors to C++ exceptions. At the Rust->C++ FFI boundary, Result<T, Error> will cause Error to be converted to and thrown as a C++ exception.
2019-11-26Rust cleanupEelco Dolstra
2019-11-26Only pass '-Z offline' to cargo if we have a vendor directoryEelco Dolstra
2019-11-26Include cargo dependencies in the Nix tarballEelco Dolstra
2019-11-26Update Rust dependenciesEelco Dolstra
2019-11-26Make <nix/unpack-channel.nix> a builtin builderEelco Dolstra
This was the last function using a shell script, so this allows us to get rid of tar, coreutils, bash etc.
2019-11-26Enable Rust code to call C++ Source objectsEelco Dolstra
2019-11-26Add some Rust codeEelco Dolstra