Skip to content

Commit

Permalink
Merge pull request #2791 from Skgland/patch-1
Browse files Browse the repository at this point in the history
Expand the build/install section of the readme
  • Loading branch information
mthom authored Feb 13, 2025
2 parents c77ea48 + 7a5a5bb commit d262159
Showing 1 changed file with 34 additions and 6 deletions.
40 changes: 34 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,21 @@ at:
### Native Compilation

First, install the latest stable version of
[Rust](https://www.rust-lang.org/en-US/install.html) using your
[Rust](https://www.rust-lang.org/tools/install) using your
preferred method. Scryer tends to use features from newer Rust
releases, whereas Rust packages in Linux distributions, Macports,
etc. tend to lag behind. [rustup](http://rustup.rs) will keep your
Rust updated to the latest stable release; any existing Rust
distribution should be uninstalled from your system before rustup is
used.

Currently the only way to install the latest version of Scryer is to
clone directly from this git repository, and compile the system. This
can be done as follows:

> [!NOTE]
> The minimum rust toolchain version required can be found in the [Cargo.toml](https://github.com/mthom/scryer-prolog/blob/master/Cargo.toml#L13)
under the `package.rust-version` key.
> The accuracy of this value is validated in CI
### From a local git checkout

```
$> git clone https://github.com/mthom/scryer-prolog
Expand All @@ -141,6 +145,32 @@ faster executable.
After compilation, the executable `scryer-prolog` is available in the
directory `target/release` and can be invoked to run the system.

### Via `cargo install`

#### From git

```
cargo install --locked --git https://github.com/mthom/scryer-prolog.git
```

Afterwards the `scryer-prolog` binary will be in the `$HOME/.cargo/bin` directory which is usually added to your PATH
during the installation of the rust toolchain.

#### From Crates.io [![Crates.io Version](https://img.shields.io/crates/v/scryer-prolog)](https://crates.io/crates/scryer-prolog) ![Crates.io MSRV](https://img.shields.io/crates/msrv/scryer-prolog)

> [!NOTE]
> The lates crates.io release can be significantly behind the version available in the git repository
> The crates.io badge in this sections title is a link to the crates.io page.
> The msrv badge in the section title referece to the minimum rust toolchain version required to compile the latest crates.io release
`scryer-prolog` is also release on crates.io and can be installed with

```
cargo install --locked scryer-prolog
```

### Caveats for Windows

On Windows, Scryer Prolog is easier to build inside a [MSYS2](https://www.msys2.org/)
environment as some crates may require native C compilation. However,
the resulting binary does not need MSYS2 to run. When executing Scryer in a shell, it is recommended to use a more advanced shell than mintty (the default MSYS2 shell). The [Windows Terminal](https://github.com/microsoft/terminal) works correctly.
Expand All @@ -152,8 +182,6 @@ light.exe scryer-prolog.wixobj
```
It will generate a very basic MSI file which installs the main executable and a shortcut in the Start Menu. It can be installed with a double-click. To uninstall, go to the Control Panel and uninstall as usual.

Scryer Prolog must be built with **Rust 1.70 and up**.

### Building WebAssembly

Scryer Prolog has basic WebAssembly support. You can follow `wasm-pack`'s [official instructions](https://rustwasm.github.io/docs/wasm-pack/quickstart.html) to install `wasm-pack` and build it in any way you like.
Expand Down

0 comments on commit d262159

Please sign in to comment.