Home

Awesome

ic-elm

A template for using Elm to develop frontend user interface for the Internet Computer.

Overview

Elm --> JSON --> JS Candid Encoder --> IC canister --> JS Candid Decoder --> JSON --> Elm

Currently Candid methods is untyped to Elm. The error only happens on the JS side in the runtime. Eventually, we want to generate method bindings in Elm via the Candid compiler.

Design choices

There are several options for the port function type in Elm:

Overall, it seems the easiest approach is to use JSON for Elm-JS interop.

Usage

cd ic-elm
npm install
dfx canister create --all
dfx build
dfx canister install --all

To learn more before you start working with elm, see the following documentation available online: