From 4c69428120c36d181d9b02baf0054ee14ac90b29 Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Thu, 13 Jun 2024 13:54:50 +0800 Subject: [PATCH 1/4] add nix instructions Signed-off-by: Matthias J. Kannwischer --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index f3df441ba..a81c1d62f 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,25 @@ Once we have the first stable version, this notice will be removed. The current code is compatible with the [`standard` branch of the official MLKEM repository](https://github.com/pq-crystals/kyber/tree/standard). + +## Development + +### Environment Setup + +All the develop and build dependencies are specified in [flake.nix](flake.nix). + +- Setup with nix, + - Running `nix develop` will execute a bash shell with the development environment specified in [flake.nix](flake.nix). + - Alternatively, you can enable `direnv` by using `direnv allow`, allowing it to handle the environment setup for you. + + - As flake is still an experimental feature of nix, --experimental-features 'nix-command flakes' is needed for nix command. Alternatively, add the following to your `~/.config/nix/nix.conf` or `/etc/nix/nix.conf`: +``` +experimental-features = nix-command flakes +``` + +- If you are not using nix, please ensure you have installed the same version as specified in [flake.nix](flake.nix). + + ## Call for contributors We are actively seeking contributors who can help us build **mlkem-c-aarch64**. From 5c0be26e0bb6dba4039f0ba0ef9d137147f51807 Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Thu, 13 Jun 2024 14:14:23 +0800 Subject: [PATCH 2/4] add dev setup documentation Signed-off-by: Matthias J. Kannwischer --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a81c1d62f..3f52a0b6a 100644 --- a/README.md +++ b/README.md @@ -46,19 +46,23 @@ The current code is compatible with the [`standard` branch of the official MLKEM ### Environment Setup -All the develop and build dependencies are specified in [flake.nix](flake.nix). +All the development and build dependencies are specified in [flake.nix](flake.nix). We recommend installing them using [nix](https://nixos.org/download/). -- Setup with nix, +- **Setup with nix** - Running `nix develop` will execute a bash shell with the development environment specified in [flake.nix](flake.nix). - Alternatively, you can enable `direnv` by using `direnv allow`, allowing it to handle the environment setup for you. - - As flake is still an experimental feature of nix, --experimental-features 'nix-command flakes' is needed for nix command. Alternatively, add the following to your `~/.config/nix/nix.conf` or `/etc/nix/nix.conf`: + - As flake is still an experimental feature of nix, --experimental-features 'nix-command flakes' is needed when running the nix command. Alternatively, add the following to your `~/.config/nix/nix.conf` or `/etc/nix/nix.conf`: ``` experimental-features = nix-command flakes ``` - If you are not using nix, please ensure you have installed the same version as specified in [flake.nix](flake.nix). +### Development scripts +After running `nix development` you should automatically have a number of support scripts in your PATH: + +- [`format`](scripts/format) formats all files. The format is enforced by our CI, so you should run this script prior to committing. ## Call for contributors From 9dc791a3df5013259b55d12794888355db50013b Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Thu, 13 Jun 2024 14:23:10 +0800 Subject: [PATCH 3/4] fix typo Signed-off-by: Matthias J. Kannwischer --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f52a0b6a..54dd77fb1 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ experimental-features = nix-command flakes - If you are not using nix, please ensure you have installed the same version as specified in [flake.nix](flake.nix). ### Development scripts -After running `nix development` you should automatically have a number of support scripts in your PATH: +After running `nix develop` you should automatically have a number of support scripts in your PATH: - [`format`](scripts/format) formats all files. The format is enforced by our CI, so you should run this script prior to committing. From 0c4610d8303b0fb20184a6e82f142530f40fcf88 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 14 Jun 2024 05:56:44 +0100 Subject: [PATCH 4/4] Minor improvements Signed-off-by: Hanno Becker --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54dd77fb1..c7052b642 100644 --- a/README.md +++ b/README.md @@ -52,12 +52,12 @@ All the development and build dependencies are specified in [flake.nix](flake.ni - Running `nix develop` will execute a bash shell with the development environment specified in [flake.nix](flake.nix). - Alternatively, you can enable `direnv` by using `direnv allow`, allowing it to handle the environment setup for you. - - As flake is still an experimental feature of nix, --experimental-features 'nix-command flakes' is needed when running the nix command. Alternatively, add the following to your `~/.config/nix/nix.conf` or `/etc/nix/nix.conf`: + - As flake is still an experimental feature of nix, `--experimental-features 'nix-command flakes'` is needed when running the nix command. Alternatively, add the following to your `~/.config/nix/nix.conf` or `/etc/nix/nix.conf`: ``` experimental-features = nix-command flakes ``` -- If you are not using nix, please ensure you have installed the same version as specified in [flake.nix](flake.nix). +- If you are not using nix, please ensure you have installed the same versions as specified in [flake.nix](flake.nix). ### Development scripts After running `nix develop` you should automatically have a number of support scripts in your PATH: