Skip to content

Commit 6c5ef35

Browse files
committed
Support wasm memory and variadic results
1 parent 84a1c22 commit 6c5ef35

File tree

6 files changed

+408
-117
lines changed

6 files changed

+408
-117
lines changed

lib/components_guide/rustler/math.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ defmodule ComponentsGuide.Rustler.Math do
2222
def wasm_example_0(_, _), do: error()
2323
def wasm_example_1_i32(_, _, _), do: error()
2424
def wasm_example_2_i32(_, _, _, _), do: error()
25-
25+
def wasm_buffer_2_i32(_, _, _, _), do: error()
26+
2627
def wasm_example(source, f), do: wasm_example_0(source, f)
2728
def wasm_example(source, f, a), do: wasm_example_1_i32(source, f, a)
2829
def wasm_example(source, f, a, b), do: wasm_example_2_i32(source, f, a, b)
2930

31+
def wasm_buffer(source, f, a, b), do: wasm_buffer_2_i32(source, f, a, b)
32+
3033
defp error, do: :erlang.nif_error(:nif_not_loaded)
3134
end

lib/components_guide_web/router.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ defmodule ComponentsGuideWeb.Router do
1717
scope "/", ComponentsGuideWeb do
1818
pipe_through(:browser)
1919

20-
get("/elements/:element_id", ElementsController, :index)
2120
get("/~/content-length", ContentLengthController, :index)
2221

2322
get("/", LandingController, :index)

0 commit comments

Comments
 (0)