Commit Graph

11 Commits

Author SHA1 Message Date
Benedikt Peetz df07c3fc24
build(flake): Replace self-packaged cranelift with rustup's
Motivation
==========
The self-packed one sort-of worked, but was rather flaky, while the one
from rustup obviously works, as it's an officially distributed part.

Running it
==========
Instead of the `cargo clif [build, etc.]` you now need to run (on nightly):
```
RUSTFLAGS="-Zcodegen-backend=cranelift" cargo build
```

Performance
===========
On my system I noticed, that a debug build takes around 20 sec *more*
with cranelift, compared to the default LLVM backend.

One possible hypothesis, for that could be, that cranelift does
not link via `mold` but instead still uses GNU's `gold`.

On the other hand, the performance decrease could also be caused
by the fact, that it's an early preview and some optimizations are
still lacking.
2023-10-31 18:47:01 +01:00
Benedikt Peetz d7b93178e8
build(treewide): Move back to rust stable 2023-10-14 12:42:36 +02:00
Benedikt Peetz eb63cb6247
build(flake): Wrap mold so that it works with the nix supplied libraries 2023-09-03 22:11:41 +02:00
Benedikt Peetz 3d417d7e15
Build(flake): Remove dead code from cranelift build process 2023-07-26 21:53:44 +02:00
Benedikt Peetz a3a26df65f
Build(flake): Add rustc cranelift codegen to development shell
This is executed by running `cargo clif` instead of `cargo`.
It _should_ result in decreased compile times (around 30%).
2023-07-26 21:42:16 +02:00
Benedikt Peetz b4d9bea75a
Build(Cargo): Add mold as default linker in both profiles
I measured the linking times by running `cargo rustc --bin trinitrix --
-Z time-passes`, which resulted in following data:

`ld`:
37.794s to link
`mold`:
21.389s to link

The downside for now is, that this requires to have mold installed to
build trinitrix (The nix flake based direnv already has it) and that
mold only works on linux.
2023-07-26 21:38:38 +02:00
Benedikt Peetz 27e3ff228c
Build(flake): Make it easier to switch to nightly 2023-07-20 21:39:38 +02:00
Benedikt Peetz c3a2b2d566
Fix(lua): Switch to mlua library, as it's better than rlua 2023-07-17 07:27:51 +02:00
Benedikt Peetz 327450c64b
Feat(command_interface): Add basic lua support 2023-07-12 21:48:51 +02:00
Benedikt Peetz 74be1c2506
Build(flake): Also add the openssl dependencies to the devShell 2023-07-09 07:53:15 +02:00
Benedikt Peetz f768d214da
Build(flake): Initialize the flake
A nix flake is a reproducible way to describe the building process
to [nix](1).
See [the nix download page](1), on how to install nix. Afterwards
running `nix build` in the repository will result in a successful build.

Flakes and nix-commands are still experimental so they must be enabled
as described in [the corresponding wiki entry](2)

[1]: https://nixos.org/download.html#nix
[2]: https://nixos.wiki/wiki/Flakes#Enable_flakes.
2023-07-09 07:28:19 +02:00