Skip to content

Commit b11f5d2

Browse files
committed
Get Rustler working again
1 parent 43fb045 commit b11f5d2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/components_guide/rustler/math.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defmodule ComponentsGuide.Rustler.Math do
22
# if false and Mix.env() == :dev do
3-
# use Rustler, otp_app: :components_guide, crate: :componentsguide_rustler_math
3+
use Rustler, otp_app: :components_guide, crate: :componentsguide_rustler_math
44
# # use Rustler, otp_app: :components_guide, crate: :componentsguide_rustler_math, target_dir: System.tmp_dir!()
55
# # use Rustler, otp_app: :components_guide, crate: :componentsguide_rustler_math, cargo: {:rustup, :stable}
66
# end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Various cheatsheets will be added over time. If you have ideas for cheatsheets, please submit them.
22

33
<p>From Elixir: <%= 6 + 1 %></p>
4-
<p>From Rust: <%= ComponentsGuide.Rustler.Math.add(5, 9) %></p>
4+
<p>From Rust: <%= ComponentsGuide.Rustler.Math.add(5, 11) %></p>
55
<p>From Rust: <%= ComponentsGuide.Rustler.Math.reverse_string("hello") %></p>
66
<p>From WebAssembly + Rust: <%= inspect(ComponentsGuide.Rustler.Math.wasm_example(@wasm_constant, "answer")) %></p>

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ defmodule ComponentsGuide.MixProject do
6161
{:earmark, "~> 1.4.15"},
6262
{:paredown, "~> 0.1.0"},
6363
{:ex_image_info, "~> 0.2.4"},
64-
{:rustler, "~> 0.25.0", only: :dev},
64+
{:rustler, "~> 0.25.0"},
6565
{:rustler_precompiled, "~> 0.5.1"},
6666
{:benchee, "~> 1.0", only: :dev},
6767
{:reverse_proxy_plug, "~> 1.3.1", only: :dev}

0 commit comments

Comments
 (0)