Subject: Re: bazel-zig-cc v1.0.0-rc4: call for testers

From: Daníel Purkhús <[email-masked]>
Date: Mon, 9 Jan 2023 10:59:14 +0000

I tested this with our repository but it fails to compile Rust code
due to the following error:

```
error: /home/danielp/.cache/bazel/_bazel_danielp/f060a56172a8e8c557483bbe1399c8d9/execroot/monorepo/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/cargo__pin-project-internal-1.0.12/libpin_project_internal-932791180.so:
cannot allocate memory in static TLS block
  --> external/cargo__axum-0.5.9/src/routing/method_routing.rs:20:5
   |
20 | use tower_http::map_response_body::MapResponseBodyLayer;
   |     ^^^^^^^^^^

```

I tested this using the HEAD of the Zig toolchain and the default Zig
version using the latest release of rules_rust.
I'm not sure if this is an issue with Zig, Rust, rules_rust or the Zig
toolchain and don't have the capacity to do
a deep dive at the moment.

---

From: Motiejus Jakštys <[email-masked]>
Date: Mon, 9 Jan 2023 14:10:20 +0200

> 20 | use tower_http::map_response_body::MapResponseBodyLayer;

Hi Daníel,

Having spent a few minutes searching for a similar issue,
https://github.com/rust-cross/cargo-zigbuild/issues/27#issuecomment-1094177369
may be a good start. I am not planning to work on adding Rust-specific
support to bazel-zig-cc, but will accept patches that make support
*better* for Rust.

Motiejus