Skip to content

Commit 1670609

Browse files
committed
Add a section on interoperability
1 parent f6c7838 commit 1670609

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Diff for: Interoperability.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Gleam's Interoperability with the BEAM
2+
3+
## Effortlesly download dependencies from Erlang or Elixir
4+
5+
We can take advantage of a whole ecosystem of libraries.
6+
7+
```toml
8+
cubdb = ">= 2.0.0 and < 3.0.0"
9+
ecto = ">= 3.0.0 < 4.0.0"
10+
phoenix = ">= 1.7.0 and < 2.0.0"
11+
```
12+
13+
## Compile both erlang or elixir from the Gleam tool
14+
15+
Gleam wil compile both your erlang or elixir files.
16+
17+
```sh
18+
gleam build
19+
```
20+
21+
## Simple FFI to reach any function on the BEAM
22+
23+
```gleam
24+
@external(erlang, "observer", "start")
25+
fn observer() -> x
26+
```

0 commit comments

Comments
 (0)