Elixir app that depends on Rust

I’m trying to deploy an Elixir app.
When dependency “tds_enconding” was compiling ( that depends on rust ) an error occurred.

Do I need to install Rust? How?

Jan 4 06:02:13 PM  ==> tds_encoding
Jan 4 06:02:13 PM  Compiling 1 file (.ex)
Jan 4 06:02:14 PM  error: failed to get `encoding` as a dependency of package `tds_encoding v0.2.0 (/opt/render/project/src/deps/tds_encoding/native/tds_encoding)`
Jan 4 06:02:14 PM  Caused by:
Jan 4 06:02:14 PM    failed to create directory `/usr/local/cargo/registry/index/github.com-1ecc6299db9ec823`
Jan 4 06:02:14 PM  Caused by:
Jan 4 06:02:14 PM    Read-only file system (os error 30)
Jan 4 06:02:14 PM  == Compilation error in file lib/tds_encoding.ex ==
Jan 4 06:02:14 PM  ** (ArgumentError) errors were found at the given arguments:
Jan 4 06:02:14 PM    * 1st argument: not an iodata term
Jan 4 06:02:14 PM      :erlang.iolist_to_binary(:ok)
Jan 4 06:02:14 PM      (jason 1.3.0) lib/jason.ex:69: Jason.decode/2
Jan 4 06:02:14 PM      (jason 1.3.0) lib/jason.ex:90: Jason.decode!/2
Jan 4 06:02:14 PM      (rustler 0.22.2) lib/rustler/compiler/config.ex:89: Rustler.Compiler.Config.external_resources/2
Jan 4 06:02:14 PM      (rustler 0.22.2) lib/rustler/compiler/config.ex:69: Rustler.Compiler.Config.build/1
Jan 4 06:02:14 PM      (rustler 0.22.2) lib/rustler/compiler.ex:9: Rustler.Compiler.compile_crate/2
Jan 4 06:02:14 PM      lib/tds_encoding.ex:37: (module)
Jan 4 06:02:14 PM  ** (exit) exited in: GenServer.call(Mix.State, {:update, {Map, :put, [:env, :prod]}}, :infinity)
Jan 4 06:02:14 PM      ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
Jan 4 06:02:14 PM      (elixir 1.13.1) lib/gen_server.ex:1019: GenServer.call/3
Jan 4 06:02:14 PM      (mix 1.13.1) lib/mix/dep.ex:270: Mix.Dep.in_dependency/3
Jan 4 06:02:14 PM      (mix 1.13.1) lib/mix/tasks/deps.compile.ex:89: anonymous fn/4 in Mix.Tasks.Deps.Compile.compile/2
Jan 4 06:02:14 PM      (elixir 1.13.1) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
Jan 4 06:02:14 PM      (elixir 1.13.1) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
Jan 4 06:02:14 PM      (mix 1.13.1) lib/mix/tasks/deps.compile.ex:79: Mix.Tasks.Deps.Compile.compile/2
Jan 4 06:02:14 PM      (mix 1.13.1) lib/mix/tasks/deps.loadpaths.ex:75: Mix.Tasks.Deps.Loadpaths.deps_check/2
Jan 4 06:02:14 PM      (mix 1.13.1) lib/mix/tasks/deps.loadpaths.ex:34: Mix.Tasks.Deps.Loadpaths.run/1
Jan 4 06:02:19 PM  ==> Build failed 😞

Hey Alex,
So as it is right now, as you’ve found Rust isn’t available in our Elixir native environment. This leaves moving to a Docker deployment as your best option to include the dependencies you need. But I would suggest that you add a request at feedback.render.com to request Rust is added to the Elixir env - and we can gauge the popularity of this.

Regards,

John B

1 Like

Rust used to be in the default Elixir “image” Render uses, when did it get removed? Is there documentation around what is included in the default installs for supported languages?

1 Like