@@ -65,6 +65,38 @@ defmodule RustlerPrecompiled do
65
65
In case "force build" is used, all options except `:base_url`, `:version`,
66
66
`:force_build`, `:nif_versions`, and `:targets` are going to be passed down to `Rustler`.
67
67
So if you need to configure the build, check the `Rustler` options.
68
+
69
+ ## Environment variables
70
+
71
+ This project reads some system environment variables. They are all optional, but they
72
+ can change the behaviour of this library at **compile time** of your project.
73
+
74
+ They are:
75
+
76
+ * `HTTP_PROXY` or `http_proxy` - Sets the HTTP proxy configuration.
77
+
78
+ * `HTTPS_PROXY` or `https_proxy` - Sets the HTTPS proxy configuration.
79
+
80
+ * `MIX_XDG` - If present, sets the OS as `:linux` for the `:filename.basedir/3` when getting
81
+ an user cache dir.
82
+
83
+ * `TARGET_ARCH` - The CPU target architecture. This is useful for when building your Nerves
84
+ project, where your host CPU is different from your target CPU.
85
+
86
+ Note that Nerves sets this value automatically when building your project.
87
+
88
+ Examples: `arm`, `aarch64`, `x86_64`, `riscv64`.
89
+
90
+ * `TARGET_ABI` - The target ABI (e.g., `gnueabihf`, `musl`). This is set by Nerves as well.
91
+
92
+ * `TARGET_VENDOR` - The target vendor (e.g., `unknown`, `apple`, `pc`). This is **not** set by Nerves.
93
+ If any of the `TARGET_` env vars is set, but `TARGET_VENDOR` is empty, then we change the
94
+ target vendor to `unknown` that is the default value for Linux systems.
95
+
96
+ * `TARGET_OS` - The target operational system. This is always `linux` for Nerves.
97
+
98
+ For more details about Nerves env vars, see https://hexdocs.pm/nerves/environment-variables.html
99
+
68
100
"""
69
101
defmacro __using__ ( opts ) do
70
102
force =
0 commit comments