Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into only-new-async
Browse files Browse the repository at this point in the history
  • Loading branch information
Phosphorus-M committed Dec 31, 2024
2 parents a452434 + fd05005 commit 1d2b51c
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 1 deletion.
92 changes: 92 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
description = "RustBookEs flake";

inputs = {
crane.url = "github:ipetkov/crane";
fenix.url = "github:nix-community/fenix";
};

outputs = { nixpkgs, fenix, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
crane = inputs.crane.mkLib pkgs;

toolchain = fenix.packages.${system}.fromToolchainFile {
file = ./rust-toolchain;
sha256 = "sha256-opUgs6ckUQCyDxcB9Wy51pqhd0MPGHUVbwRKKPGiwZU=";
};

craneLib = crane.overrideToolchain toolchain;

commonArgs = {
doCheck = false;
src = lib.cleanSourceWith {
src = craneLib.path ./..;
};
};


book = craneLib.buildPackage (commonArgs // {
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
});
in
{
devShells.${system}.default = craneLib.devShell {
packages = with pkgs; [ toolchain mdbook ];
};
};
}
2 changes: 1 addition & 1 deletion src/ch01-03-hello-cargo.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fn main() {
```

¡Cargo ha generado un programa “Hello, world!”/“¡Hola, mundo!” para ti,
¡igual que el que escribimos enl Listado 1-1! Hasta ahora, las diferencias
¡igual que el que escribimos en el Listado 1-1! Hasta ahora, las diferencias
entre nuestro proyecto y el proyecto generado por Cargo son que Cargo
colocó el código en el directorio *src* y tenemos un archivo de
configuración *Cargo.toml* en el directorio superior.
Expand Down

0 comments on commit 1d2b51c

Please sign in to comment.