Skip to content

Commit

Permalink
Goonstation Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeWaka committed Jun 1, 2024
1 parent 759ab29 commit 012cd61
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# rust-g

### This is a fork of the /tg/station rust-g version, found at https://github.com/tgstation/rust-g

rust-g (pronounced rusty-g) is a library which offloads certain expensive or
difficult tasks from BYOND.

This library is currently used in the [/tg/station] codebase, and is required for
This library is currently used in the [goonstation] codebase, and is required for
it to run. A pre-compiled DLL version can be found in the repo root of codebases that use it,
but you can build your own from this repo (and you should if you're running a server).

Builds can also be found on the [releases page] **but should only be used for Windows**,
as Linux has compatibility issues across distributions.

[releases page]: https://github.com/tgstation/rust-g/releases
[releases page]: https://github.com/goonstation/rust-g/releases

## Dependencies

Expand All @@ -19,7 +21,7 @@ The [Rust] compiler:
1. Install the Rust compiler's dependencies (primarily the system linker):

* Ubuntu: `sudo apt-get install gcc-multilib`
* Windows (MSVC): [Build Tools for Visual Studio 2017][msvc]
* Windows (MSVC): [Build Tools for Visual Studio 2017+][msvc]
* Windows (GNU): No action required

1. Use [the Rust installer](https://rustup.rs/), or another Rust installation method,
Expand All @@ -35,7 +37,7 @@ The [Rust] compiler:

```sh
# Clone the `rust-g` repository to a directory of your choice
git clone https://github.com/tgstation/rust-g.git
git clone https://github.com/goonstation/rust-g.git
# in the `rust-g` directory...
cd rust-g
# Linux
Expand Down Expand Up @@ -65,7 +67,7 @@ If you want to use the `pc-windows-gnu` or similar other target ABI, do the foll

The [Cargo] tool handles compilation, as well as automatically downloading and
compiling all Rust dependencies. The default configuration is suitable for
use with the [/tg/station] codebase. To compile in release mode (recommended for
use with the [goonstation] codebase. To compile in release mode (recommended for
speed):

Linux:
Expand Down Expand Up @@ -158,14 +160,14 @@ it is included in the `LD_LIBRARY_PATH` environment variable, or tweak the searc
logic in `rust_g.dm`:

```sh
$ export LD_LIBRARY_PATH=/path/to/tgstation
$ export LD_LIBRARY_PATH=/path/to/goonstation
```

To examine what locations BYOND is searching for the shared library, use
`strace`:

```sh
$ strace DreamDaemon tgstation.dmb 45000 -trusted -logself 2>&1 | grep 'rust_g'
$ strace DreamDaemon goonstation.dmb 45000 -trusted -logself 2>&1 | grep 'rust_g'
# Early in output, the file will be listed when BYOND examines every file it can see:
open("rust_g", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = -1 ENOTDIR (Not a directory)
# BYOND will then search some common directories...
Expand All @@ -186,7 +188,7 @@ open("rust_g", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = -1 ENOTD
If you're still having problems, ask in the [Coderbus Discord]'s
`#tooling-questions` channel.

[/tg/station]: https://github.com/tgstation/tgstation
[/tg/station]: https://github.com/goonstation/goonstation
[Rust]: https://rust-lang.org
[Cargo]: https://doc.rust-lang.org/cargo/
[rustup]: https://rustup.rs/
Expand All @@ -195,6 +197,8 @@ If you're still having problems, ask in the [Coderbus Discord]'s

## License

The license for RUST-G itself can be found on tg's repo. Code for the Goonstation modifications falls under the same license.
This project is licensed under the [MIT license](https://en.wikipedia.org/wiki/MIT_License).
See [LICENSE](./LICENSE) for more details.

0 comments on commit 012cd61

Please sign in to comment.