mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 16:16:16 +02:00
759947bf72
On nix-env -qa -f '<nixpkgs>', this reduces maximum RSS by 20970 KiB and runtime by 0.8%. This is mostly because we're not parsing the hash part as a hash anymore (just validating that it consists of base-32 characters). Also, replace storePathToHash() by StorePath::hashPart().
24 lines
442 B
C++
24 lines
442 B
C++
#if 0
|
|
#include "logging.hh"
|
|
#include "rust-ffi.hh"
|
|
|
|
extern "C" std::exception_ptr * make_error(rust::StringSlice s)
|
|
{
|
|
return new std::exception_ptr(std::make_exception_ptr(nix::Error(std::string(s.ptr, s.size))));
|
|
}
|
|
|
|
extern "C" void destroy_error(std::exception_ptr * ex)
|
|
{
|
|
free(ex);
|
|
}
|
|
|
|
namespace rust {
|
|
|
|
std::ostream & operator << (std::ostream & str, const String & s)
|
|
{
|
|
str << (std::string_view) s;
|
|
return str;
|
|
}
|
|
|
|
}
|
|
#endif
|