vlang / rfcs

RFCs for changes to V

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extend build system with `build.v`.

EchoPouet opened this issue · comments

Describe the feature

Extend build system with a build.v in the project to improve it and add steps to build project. It's inspiring from Zig lang (https://ziglang.org/documentation/master/#Zig-Build-System).

This file is optional.

Use Case

The principals use cases for me are following:

  • Download and build binding library in wrapper project
  • Custom build according to OS or architecture
  • Run some action pre or post build
  • many other things ...

Proposed Solution

The build.v file must have access to all V Standard Library but only this. No external modules.
It must have access to the .mod file to retrieve external dependencies to download these.

I see 3 functions, pre, build and post. No need to describe these ;)

Create a new module named build to expose functions to simplify compilation steps.

Add new V command v init --build to create build.v later.