diff --git a/.vscode/settings.json b/.vscode/settings.json index 70bc39c..3af7e1f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,7 @@ "rust-analyzer.linkedProjects": [ "taptrade-cli-demo/coordinator/Cargo.toml", "taptrade-cli-demo/trader/Cargo.toml", - ] + ], + "nixEnvSelector.suggestion": true, + "nixEnvSelector.nixFile": "${workspaceFolder}/shell.nix" } \ No newline at end of file diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..71024c5 --- /dev/null +++ b/shell.nix @@ -0,0 +1,15 @@ +{ pkgs ? import {} }: + pkgs.mkShell { + nativeBuildInputs = with pkgs.buildPackages; [ + pkg-config + zlib + openssl + cargo + rustc + rustfmt + gcc + ]; + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; +} + +# For VSCode and Rust Analyzer use the Extension "Nix Environment Selector" \ No newline at end of file diff --git a/taptrade-cli-demo/coordinator/src/communication/mod.rs b/taptrade-cli-demo/coordinator/src/communication/mod.rs index f4e907c..7162661 100755 --- a/taptrade-cli-demo/coordinator/src/communication/mod.rs +++ b/taptrade-cli-demo/coordinator/src/communication/mod.rs @@ -4,7 +4,7 @@ fn index() -> &'static str { "Hello, world!" } - +j #[launch] pub fn webserver() -> Rocket { rocket::build().mount("/", routes![index])