Skip to content

mach: sort out CLI arguments / program options #595

@emidoots

Description

@emidoots
  • If one follows the getting started guide, it's not possible to easily modify the build.zig to pass arguments from zig build run -- foobar to your program.
    • i.e. you can't call .addArgs because getInstallStep returns a Step not a RunStep.
    • We cannot return a RunStep, since for WASM targets the step runs wasmserve so you can open in your browser.
    • We may need to expose a separate function like runNative (squirl's suggestion), or come up with a different solution.
    • WASM (browser) targets, and likely also other targets (mobile, VR, etc.) do not really have a concept of CLI flags. We may need to come up with some other form of simple "options" one can pass to their program that works in all these situations nicely.
  • Whatever we come up with, it should have a documentation section on the new machengine.org website: "adding CLI arguments" or similar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions