Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rustick
rustick (pronounced rustic) is a library that implements precise timers and periodic scheduling for BYOND games written in DM.
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.
Dependencies
The Rust compiler:
-
Use the Rust installer, or another Rust installation method, or run the following:
|You may need to install the Visual Studio C++ Build tools (system linker) when prompted to do so.
-
Add the 32-bit compiler target:
# Linux # Windows
Compiling
The Cargo tool handles compilation, as well as automatically downloading and compiling all Rust dependencies. The default configuration is suitable for use with the goonstation codebase. To compile in release mode (recommended for speed):
Linux:
# output: target/i686-unknown-linux-gnu/release/librustick.so
Windows:
If you are using Visual Studio Code, you may use the CONTROL + SHIFT + B hotkey and run the rust: cargo build (win32) task.
Alternatively:
# output: target/i686-pc-windows-msvc/release/rustick.dll
If you aren't sharing the binary with other people, consider compiling targeting your native cpu for potential performance improvements. You can do this by setting the RUSTFLAGS environment variable to -C target-cpu=native. For example, in Powershell you would use $Env:RUSTFLAGS="-C target-cpu=native".
Features
To get additional features, pass a list to --features, for example --features allow_non_32bit.
allow_non_32bit: Disables the forced compile errors on non-32bit targets. Only use this if you know exactly what you are doing.
Installing
The rustick binary (rustick.dll or librustick.so) should be placed in the root
of your repository next to your .dmb. There are alternative installation
locations, but this one is best supported.
Compiling will also create the file target/rustick.dm which contains the DM API.
To use rustick, copy-paste this file into your project.
Troubleshooting
You must build a 32-bit version of the library for it to be compatible with BYOND. Attempting to build a 64-bit version will fail with an explanatory error.