3 ms·
Most Gleam code is backend agnostic, but code that does something BEAM specific like OTP or Erlang FFI is only available when targeting the BEAM and JS ffi is o
by Hasnep 2y ago
Most Gleam code is backend agnostic, but code that does something BEAM specific like OTP or Erlang FFI is only available when targeting the BEAM and JS ffi is only available when targeting JS. You can also provide two implementations of a function, one for each backend if you want to target both.
- nesarkvechnep 2y agoErlang FFI? Doesn’t the Erlang Virtual Machine run the Gleam code? How is calling Erlang functions FFI?
- Hasnep 2y agoI just mean FFI in the general sense, that you're interfacing with a non-Gleam language. What's the word for that? Bindings? I guess if you've transpiled Gleam to JS then is calling a JS function even FFI anymore?