README.md
# cthulhu
[](https://hex.pm/packages/cthulhu)
[](https://hexdocs.pm/cthulhu/)
**A Terraria player editor written in Gleam.**
```sh
gleam add cthulhu@1
```
```gleam
import cthulhu
import simplifile
pub fn main() -> Nil {
let assert Ok(encrypted_player) = simplifile.read_bits(test_player_path)
let assert Ok(raw_player) = cthulhu.decrypt(encrypted_player)
let assert Ok(player) = cthulhu.decode_player(raw_player)
echo player
}
```
Further documentation can be found at <https://hexdocs.pm/cthulhu>.
## Compilation
Compilation may take a minute or two due to this project being quite large. To speed up compile times at the expense of runtime performance feel free to build with the `ERL_COMPILER_OPTIONS` variable set to one of the below options:
`ERL_COMPILER_OPTIONS="[no_ssa_opt_alias]"` (faster compile, moderate runtime performance impact)
`ERL_COMPILER_OPTIONS="[no_ssa_opt]"` (fastest compile, higher runtime performance impact)
You probably don't want to build your entire project with these flags, just this dependency.
## Development
Testing requires a player file named test.plr in this package's root directory.
```sh
gleam test # Run the tests
```