Configuration syntax #2

Open
opened 2025-12-09 16:20:58 +01:00 by mai-lapyst · 1 comment
Owner

Switch to kdl??

package {
    name test-meta
    version '0.0.1'
    description """
        A dlang package.
    """

    // Metadata for an index.
    // Categories are pre-defined and can vary based on index.
    category "parsing"
    category "text-processing"

    // Keywords are "free-form" metadata.
    keywords "lexer"
    keywords "lexical"
    keywords workspace=#true // Import from workspace...

    // Forward to workspace
    author workspace=#true
    license workspace=#true
    repository workspace=#true
}

// Enable dub-compability mode
// This exposes versions like `Have_xxx` to the compilation
// so it knows what dependency it has.
compat dub=#true

// Creates a "binary" with a name
bin name="aaa" {

}

// Library information
lib {

}

versions {
    // Custom version, that is activates an dependency,
    //  and is chooseable as a feature by an user.
    "enums" dep="ninox-std-enum" feature=#true

    // ????
    // "plat_windows" platform="windows"
    // "plat_linux" platform="unix" {
    //     not platform="redox" arch="wasm" 
    // }
}

// Dependencies; optional with an an arch+platform combination
//  To make "complex" configurations, use custom versions ???
dependencies arch="" platform="" {
    // Can forward to workspace
    "mai/lib1:sub1" workspace=#true
}

// Workspace configuration
workspace {
    members {
        "./lib1"
        "./test1"
    }

    // Generic package information to be referred from individual packages
    package {
        author "Mai Lapyst" homepage="https://info.lapyst.dev" bluesky="xxx" email=""
        repository "https://codearq.net/bithero-dlang/test-meta"
        license "AGPL-3.0-only"
    }

    // Dependencyies that can be referred from individual packages
    dependencies {
        // Path-based
        "mai/lib1:sub1" path="./lib1"

        // Git based; + optional
        "other1" optional=#true git="https://codearq.net/bithero-dlang/some1" version="1.0.0"
    }
}
Switch to kdl?? ```kdl package { name test-meta version '0.0.1' description """ A dlang package. """ // Metadata for an index. // Categories are pre-defined and can vary based on index. category "parsing" category "text-processing" // Keywords are "free-form" metadata. keywords "lexer" keywords "lexical" keywords workspace=#true // Import from workspace... // Forward to workspace author workspace=#true license workspace=#true repository workspace=#true } // Enable dub-compability mode // This exposes versions like `Have_xxx` to the compilation // so it knows what dependency it has. compat dub=#true // Creates a "binary" with a name bin name="aaa" { } // Library information lib { } versions { // Custom version, that is activates an dependency, // and is chooseable as a feature by an user. "enums" dep="ninox-std-enum" feature=#true // ???? // "plat_windows" platform="windows" // "plat_linux" platform="unix" { // not platform="redox" arch="wasm" // } } // Dependencies; optional with an an arch+platform combination // To make "complex" configurations, use custom versions ??? dependencies arch="" platform="" { // Can forward to workspace "mai/lib1:sub1" workspace=#true } // Workspace configuration workspace { members { "./lib1" "./test1" } // Generic package information to be referred from individual packages package { author "Mai Lapyst" homepage="https://info.lapyst.dev" bluesky="xxx" email="" repository "https://codearq.net/bithero-dlang/test-meta" license "AGPL-3.0-only" } // Dependencyies that can be referred from individual packages dependencies { // Path-based "mai/lib1:sub1" path="./lib1" // Git based; + optional "other1" optional=#true git="https://codearq.net/bithero-dlang/some1" version="1.0.0" } } ```
Author
Owner
- https://codearq.net/bithero-rust/gamelib/src/branch/master/Cargo.toml - https://doc.rust-lang.org/reference/conditional-compilation.html - https://kdl.dev/ https://github.com/kdl-org/kdljs https://github.com/pedromsilvapt/gallant-config https://github.com/kdl-org/kdl/pull/486 https://kdl.dev/play/ - https://doc.rust-lang.org/cargo/reference/manifest.html - https://doc.rust-lang.org/cargo/reference/cargo-targets.html#binaries
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mdc/dab#2
No description provided.