
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
npm install -g elchemy
Elchemy lets you write simple, fast and quality type safe code while leveraging both the Elm's safety and Elixir's ecosystem
Since version 0.4 all of the patch notes are included in the description of a release:
Install elchemy globally with
npm install -g elchemy
Then in root of your project do:
elchemy init
And follow the instructions
elchemy will find all *.elm files specified in elchemy_path and compile it into corresponding *.ex files in lib directory.
You can override output directory specifing elixirc_paths.
npm install -g elchemy
Usage
elchemy compile source_dir output_dir
git clone https://github.com/wende/elchemy.git
cd elchemy
make compile
./elchemy compile source_dir output_dir
and
make dev
To launch and test the web demo
If anything doesn't work, try
npm install -g elchemy
elchemy clean
elchemy init
mix test
first
add b c = b + c over defp add(a, b), do: b + cYou can, but nice and dandy compile tools are still on their way
The output files of Elchemy treat the code readability as a first class citizen. The code is meant to be properly indented, the comments aren't omitted, and the code is optimized as hard as it can ( f.i case clauses reduce to function overloads)
When it's done
Definitely. Yes. Please do.
You're a nosy one, aren't you?
Elchemy represents all type constructors as snake cased atoms, and all type applications as tuples.
Which means that MyType 42 "Fourty two" Error in Elchemy equals to {:my_type, 42, "Fourty Two", :error} in Elixir.
As long as they don't use any Native modules, Ports or Elm runtime they can be safely imported and used
Yes. You can do an ffi call to any function in any module. Whether it's Elixir module, Erlang module, or even a macro you can include it in your code. Ffi calls are a treated specially in Elchemy and they get generated test to analyze the types based on @specs, so that you don't compromise type safety for using Elixir code.
In order to increase readbility it's advised no to use ffi calls if not necessary and always document and doctest them.
use Module?Unfortunatelly you can't write any macros with do..end blocks yet. You can write any out of function code using an elixir inline code with:
{- ex
code_here
-}
But it's a last resort solution and shouldn't ever be abused.
So you want to write an Elm-like code, that will manipulate Elixir code, which generates an Elixir code that manipulates Elixir code? How about no?
.elm files with Elchemy?Elchemy uses Elm to typecheck your program. Although it is possible to use it without Elm on your machine it's not advised.
FAQs
Write Elixir code using Elm-inspired syntax (elm-make compatible)
The npm package elchemy receives a total of 82 weekly downloads. As such, elchemy popularity was classified as not popular.
We found that elchemy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.