kanishka
Brainstorming ways to share code between elm and elixir
I have been brainstorming ways to share code between elm and elixir, might use it at work. Think some simple calculations like calculating price based on float input and some constants. Some options:
- Rust, wasm, rustler
- Gleam
- Elixir / Erlang compile to js (haven’t found an active project)
- Implement small DSL that serializes to json and interpret in each language
- Use python (an existing language used in our stack elsewhere), ffi to python from elixir; brython or other python to js compiler
- Don’t use shared language, just use a data driven test set in both languages to guarantee equivalent functionality
Other ideas? Most viable?
I am guessing rust is most viable.
Most Liked
hst337
D4no0
I mean why you would use a native interface if elm is used for frontend anyway, once you go over the network there is no reason to use anything beside https.
marcin
I am trying an approach to use Gleam compiled to JS for FE and re-use it in a Phoenix app on the backend.
see: Regretting/Questioning my current stack Flutter + Elixir as solo dev for mobile app - #21 by marcin
Last Post!
kanishka
We ended up duplicating the code between elixir and elm and generating an elm test suite based on the elixir test suite to get assurance about equivalence. Will pursue phoenix channel next time
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









