Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion docs/reference/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,19 @@ This will:

## Building the CLI Tool

> **Note for Windows users:** Before starting the build process, set `ESAXX_DYNAMIC_LINK=1` to
enable the dynamic linking of the `esaxx-rs` library. Since this library forces static linking,
Mozilla.ai's fork is used instead. This fork only modifies the build process.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean? Is there a Mozilla.ai library fork?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The original https://github.com/Narsil/esaxx-rs library forces static linking, so we created a fork to allow dynamic linking: https://github.com/mozilla-ai/esaxx-rs-dyn-msvc/
Maybe we could try and push the changes to the main repository. Right now this was the only approach we could take.


First, build the encoderfile CLI tool:

```bash
cargo build --bin encoderfile --release
```

The CLI binary will be created at `./target/release/encoderfile`.
The CLI binary will be created at `./target/release/encoderfile`. This step also
creates the base executable that powers each encoderfile at
`target/release/encoderfile-runtime`.

Optionally, install it to your system:

Expand Down Expand Up @@ -203,6 +209,11 @@ encoderfile:
tokenizer_path: ./models/tokenizer.json
```

> **Note for Windows users:** Since precompiled binaries are not available

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link to documentation on building from source

for Windows yet, make sure you use the `base_binary_path: target/release/encoderfile-runtime.exe`
property in the configuration file. This file is generated when
[bulding from source](#building-the-cli-tool).

### Step 3: Build the Encoderfile

Build your encoderfile binary:
Expand Down
Loading