-
-
Notifications
You must be signed in to change notification settings - Fork 4
Build-Time Keywords (arch, os) and Platform-Specific Branching in Wave #211
Copy link
Copy link
Open
Labels
buildIssues related to building the project or compiling errors.Issues related to building the project or compiling errors.enhancementA request for a new feature or improvement.A request for a new feature or improvement.feature requestA request for a new feature or functionality.A request for a new feature or functionality.os patchA patch required to support or improve compatibility with an operating system.A patch required to support or improve compatibility with an operating system.
Metadata
Metadata
Assignees
Labels
buildIssues related to building the project or compiling errors.Issues related to building the project or compiling errors.enhancementA request for a new feature or improvement.A request for a new feature or improvement.feature requestA request for a new feature or functionality.A request for a new feature or functionality.os patchA patch required to support or improve compatibility with an operating system.A patch required to support or improve compatibility with an operating system.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Backlog
Background
#ifdef→ macro hell, poor readability#[cfg(...)]→ verbose and cluttered syntaxGoals
Final Decision
archandosas build-time reserved keywordsarchorosas regular variable namesvex build --arch amd64 --os linux)Final Syntax
✅ Looks like a normal
ifstatement✅ Zero runtime overhead
✅ Parser instantly recognizes keywords → fast compile-time
✅ Will remain compatible with Whale toolchain
Build Flow
vex build --arch amd64 --os linuxarch="amd64",os="linux"as compile-time constantsFuture Keyword Extensions
arch,osendian,cpuWhy this decision?
arch/osas variable namesRelation to Whale
Conclusion:
Wave will use
archandosas build-time reserved keywords for platform-specific branching.This approach ensures simplicity, performance, and intuitiveness, while remaining compatible with the future Whale toolchain.