... because it is. I had previously dismissed the comparatively
trivial unsafety of these functions, assuming the caller is
aware of the purpose of them and reasonably familiar with manual
memory management.
That would have been fine in an unsafe by default language like C++,
which Rust is not.
(cherry picked from commit b43455fdd0468f067741a79a7031ba2fa907f0eb)
Fixes https://github.com/nixops4/nixops4/issues/65,
possible undefined behavior.
This doesn't make the code nice wrt *const/*mut distinction, but
since we're not mutating it, this should be fine.
(cherry picked from commit 75d448aad923a5f835f0562400e223df43103ea4)
Fixes tests hanging. Before this commit:
nix build .#packages.x86_64-linux.nixops4-eval-release
See https://github.com/NixOS/nix/issues/11979
(cherry picked from commit 03af71f92488f2ee683565318f24afd3e3c001df)
A step toward handling the arrival of new data (stdin) with priority
over commands, avoiding roundtrips and re-evaluations.
(cherry picked from commit 8a2a5197886025caf35653001f76a4b209d8c9e4)
This allows cargo metadata to operate on it without adding the
source files to the build. (A choice which will save a few rebuilds
of the manual)
(cherry picked from commit 1779295f3e13cc15f8422d52a3753bb927ac8fa7)
This spreads out transitively to many places and requires that
we use `check_call!` instead of `check_one_call` in a number of
places.
(cherry picked from commit 6bc31dcf206518a7be7f0ac6e773d5dfe25531ea)
The mutation-based methods had some pitfalls, and we don't really
need them.
We could re-add them if we need to.
(cherry picked from commit ca92b8491d87cebf54dd2468599168fc7a16c07f)
This is slightly easier to use than the previous pattern that was
always followed up by the same conversions.
(cherry picked from commit 756c080730cd4fa81d4c0e3a99688cbe8debe57f)
The nix c bindings have now merged into master, with some small changes since these bindings were created.
This commit updates the input, and adjusts it to the new API.
(cherry picked from commit aa02380bfcc6221615f65152de60cf4cca3bbbbe)