Skip to content

Commit

Permalink
Update verbiage in aws-lc-sys/README and User Guide
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Sep 4, 2024
1 parent de485eb commit 473ff7b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
26 changes: 15 additions & 11 deletions aws-lc-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,31 @@ x86_64_unknown_linux_musl

### Use of prebuilt NASM objects

For Windows x86 and x86-64, the AWS-LC assembly code requires NASM to build. On these platforms,
we recommend that you install [the NASM assembler](https://www.nasm.us/). If a NASM assembler is
found during the build process, then it *will* be used to compile the assembly files. However,
if a NASM assembler is not found, then the build may fail except in the following case:
For Windows x86 and x86-64, NASM is required for assembly code compilation. On these platforms,
we recommend that you install [the NASM assembler](https://www.nasm.us/). If NASM is
detected in the build environment *it is used* to compile the assembly files. However,
if a NASM assembler is not available, and the "fips" feature is not enabled, then the build fails unless one of the
following conditions are true:

* You are building for `x86-64` and either:
* The `AWS_LC_SYS_PREBUILT_NASM` environment variable is found and has a value of "1" (or the value is empty); OR
* `AWS_LC_SYS_PREBUILT_NASM` is *not found* in the environment AND the "prebuilt-nasm" feature has been enabled.

If the above cases apply, then our prebuilt NASM objects may be used for the build. To prevent our prebuilt NASM
objects from being used, please install NASM and/or set `AWS_LC_SYS_PREBUILT_NASM=0` in your build environment to
prevent their use.
If the above cases apply, then the crate provided prebuilt NASM objects will be used for the build. To prevent usage of
prebuilt NASM
objects, install NASM in the build environment and/or set the variable `AWS_LC_SYS_PREBUILT_NASM` to `0` in the build
environment to prevent their use.

#### About prebuilt NASM objects

Our prebuilt NASM objects are generated using the same automation that produces our pregenerated bindings. See our
[GitHub workflow configuration](https://github.com/aws/aws-lc-rs/blob/main/.github/workflows/sys-bindings-generator.yml).
The prebuilt NASM objects are checked into our repository
Prebuilt NASM objects are generated using automation similar to the crate provided pregenerated bindings. See the
repositories
[GitHub workflow configuration](https://github.com/aws/aws-lc-rs/blob/main/.github/workflows/sys-bindings-generator.yml)
for more information.
The prebuilt NASM objects are checked into the repository
and are [available for inspection](https://github.com/aws/aws-lc-rs/tree/main/aws-lc-sys/builder/prebuilt-nasm).
For each PR submitted,
[our CI verifies](https://github.com/aws/aws-lc-rs/blob/8fb6869fc7bde92529a5cca40cf79513820984f7/.github/workflows/tests.yml#L209-L241)
[CI verifies](https://github.com/aws/aws-lc-rs/blob/8fb6869fc7bde92529a5cca40cf79513820984f7/.github/workflows/tests.yml#L209-L241)
that the NASM objects newly built from source match the NASM objects currently in the repository.

## Build Prerequisites
Expand Down
26 changes: 15 additions & 11 deletions book/src/requirements/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,31 @@ Use the following instructions to download **Visual Studio Build Tools 2017** or

### Use of prebuilt NASM objects

For Windows x86 and x86-64, the AWS-LC assembly code requires NASM to build. On these platforms,
we recommend that you install [the NASM assembler](https://www.nasm.us/). If a NASM assembler is
found during the build process, then it *will* be used to compile the assembly files. However,
if a NASM assembler is not found, then the (non-"fips") build may fail except in the following case:
For Windows x86 and x86-64, NASM is required for assembly code compilation. On these platforms,
we recommend that you install [the NASM assembler](https://www.nasm.us/). If NASM is
detected in the build environment *it is used* to compile the assembly files. However,
if a NASM assembler is not available, and the "fips" feature is not enabled, then the build fails unless one of the
following conditions are true:

* You are building for `x86-64` and either:
* The `AWS_LC_SYS_PREBUILT_NASM` environment variable is found and has a value of "1" (or the value is empty); OR
* `AWS_LC_SYS_PREBUILT_NASM` is *not found* in the environment AND the "prebuilt-nasm" feature has been enabled.

If the above cases apply, then our prebuilt NASM objects may be used for the build. To prevent our prebuilt NASM
objects from being used, please install NASM and/or set `AWS_LC_SYS_PREBUILT_NASM=0` in your build environment to
prevent their use.
If the above cases apply, then the crate provided prebuilt NASM objects will be used for the build. To prevent usage of
prebuilt NASM
objects, install NASM in the build environment and/or set the variable `AWS_LC_SYS_PREBUILT_NASM` to `0` in the build
environment to prevent their use.

#### About prebuilt NASM objects

Our prebuilt NASM objects are generated using the same automation that produces our pregenerated bindings. See our
[GitHub workflow configuration](https://github.com/aws/aws-lc-rs/blob/main/.github/workflows/sys-bindings-generator.yml).
The prebuilt NASM objects are checked into our repository
Prebuilt NASM objects are generated using automation similar to the crate provided pregenerated bindings. See the
repositories
[GitHub workflow configuration](https://github.com/aws/aws-lc-rs/blob/main/.github/workflows/sys-bindings-generator.yml)
for more information.
The prebuilt NASM objects are checked into the repository
and are [available for inspection](https://github.com/aws/aws-lc-rs/tree/main/aws-lc-sys/builder/prebuilt-nasm).
For each PR submitted,
[our CI verifies](https://github.com/aws/aws-lc-rs/blob/8fb6869fc7bde92529a5cca40cf79513820984f7/.github/workflows/tests.yml#L209-L241)
[CI verifies](https://github.com/aws/aws-lc-rs/blob/8fb6869fc7bde92529a5cca40cf79513820984f7/.github/workflows/tests.yml#L209-L241)
that the NASM objects newly built from source match the NASM objects currently in the repository.

### No-assembly build
Expand Down

0 comments on commit 473ff7b

Please sign in to comment.