Skip to content
This repository was archived by the owner on May 27, 2019. It is now read-only.
This repository was archived by the owner on May 27, 2019. It is now read-only.

Making a standalone binary #21

Open

Description

@lucaspiller

I want to make a standalone binary so it is easier to use in other projects. I used rebar escriptize in c5f15ec, which worked to generate a standalone binary, except that isn't enough.

The parse transform we have in include/espec.hrl also needs to be shared in the other projects, as spec files include it at the top.

We need to find a way to either not require this to be included and have the espec command do the work, or for the espec command to add this to the lib path before running specs (I guess it could write a temporary directory, then add that to the lib path).

Activity

  1. lucaspiller commented on Apr 27, 2013

    @lucaspiller
    OwnerAuthor

    Ok, after lots of brain frying I think we can use epp:parse_file/3. It returns a list of tokens, that you can pass to compile:forms, which returns the binary code. It also takes a parameter of user defined macros (thats the only stuff we need in espec.hrl, the rest can be passed as compile time options).

    However, I have no idea what format these take 😄 The docs aren't particularly helpful on this:

    http://www.erlang.org/doc/man/epp.html#type-macros

  2. added a commit that references this issue on Apr 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions