8000 GitHub - alenards/elm-bare: An Elm implementation of the BARE Message Encoding - https://baremessages.org/
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

alenards/elm-bare

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-bare

The goal of this package is to implement the BARE Message Encoding format in Elm, using a "Codec 6C0C " API.

Basic usage

Round-tripping is done through the use of encoders (a -> Encoder) and decoders (Decoder a) for a sequence of bytes, collectively called a Codec a.

import Codec.Bare as Codec exposing (Bytes, Codec, Encoder)

codec : Codec (List Int)
codec =
    Codec.list Codec.int

encode : List Int -> Bytes
encode list =
    Codec.encodeToValue codec list

decode : Bytes -> Maybe (List Int)
decode s =
    Codec.decodeValue codec s

Generator

The generator can be found at https://github.com/nilshelmig/elm-bare-generator

Learning Resources

Ask for help on the Elm Slack.

You can also have a look at the FAQ.md file.

Credits

This project is a fork of MartinSStewart/elm-codec-bytes (which is itself inspired by miniBill/elm-codec), specialized for being compatible with the BARE Message Encoding.

About

An Elm implementation of the BARE Message Encoding - https://baremessages.org/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elm 100.0%
0