anchor.diff:          ${ghc.withPackages (_: libraries )}/bin/ghc ${lib.escapeShellArgs ghcArgs} tmp.hs
           mv tmp $out
         '';
  +      inherit strip;
       } name;
   
     # writeHaskellBin takes the same arguments as writeHaskell but outputs a directory (like writeScriptBin)
     writeHaskellBin = name:
       writeHaskell "/bin/${name}";
  +
  +  writeRust = name: {
  +      rustc ? pkgs.rustc,
  +      rustcArgs ? [],
  +      strip ? true
  +  }:
  +    makeBinWriter {
  +      compileScript = ''
  +        cp "$contentPath" tmp.rs
  +        PATH=${makeBinPath [pkgs.gcc]} ${lib.getBin rustc}/bin/rustc ${lib.escapeShellArgs rustcArgs} -o "$out" tmp.rs
  +      '';
  +      inherit strip;
  +    } name;
  +
  +  writeRustBin = name:
  +    writeRust "/bin/${name}";
   
     # writeJS takes a name an attributeset with libraries and some JavaScript sourcecode and
     # returns an executable
  
positive.code:       contentPath = content;
      }) ''
        ${compileScript}
        ${ lib.optionalString strip
           "${pkgs.binutils-unwrapped}/bin/strip --strip-unneeded $out" }
        ${optionalString (types.path.check nameOrPath) ''
          mv $out tmp
          mkdir -p $out/$(dirname "${nameOrPath}")
  
negative.code:   #        return 0;
    #      }
    #    ''
    writeC = name: {
      libraries ? [],
      strip ? true
    }:
      makeBinWriter {
        compileScript = ''
          PATH=${makeBinPath [
  