actonlang / acton

The Acton Programming Language
https://www.acton-lang.org/
BSD 3-Clause "New" or "Revised" License
79 stars 7 forks source link

Replace Acton.toml with build.act #1841

Open plajjan opened 2 months ago

plajjan commented 2 months ago

We should do the zig trick and have a build.act. It should be an Acton source file that is compiled and then in turn gets to build the project. We should have a standard function in our stdlib to build a vanilla Acton project.

so build.act itself marks the root of an Acton project. We can start with this step, ie. build.act can be empty and everying will work like today (where we have an empty Acton.toml).

The second step is to actually compile the build.act file and thus allow customizations.

Longer term, I'm not sure if an empty build.act should be a shorthand for letting acton build do a standard vanilla project build or if we should require some basic skeleton in build.act even for the most basic of builds.

import build

def build(env):
    build.build()

Although just after writing this.. once more I'm inclined to walk in the steps of zig. Maybe this should be a pure function, pureish at least and just return a build graph that is later executed?or something like that

plajjan commented 2 months ago

Hmm, or maybe we should do the zig trick with a build.act instead?