Miguel de Benito Delgado 67d99366d9 ♻️ Command specific parsing
AI-assisted-by: gpt-6.1-sol, deepseek-flash
2026-11-02 18:46:05 +01:00

34 lines
1.2 KiB
Clojure

;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns benches.render-wasm.node.cli.build
"Options for preparing a benchmark build."
(:require
[benches.render-wasm.node.cli.shared :as shared]
[benches.render-wasm.node.options :as options]))
(def schema:options
[:map {:closed true}
[:default-features {:default true} :boolean]
[:features {:default []} [:vector shared/schema:feature]]
[:build-timeout-ms {:default options/default-build-timeout-ms} shared/schema:timeout-ms]])
(def ^:const usage "runner build [options]")
(def ^:const description "Prepare a renderer build with the selected Cargo features.")
(def cli-options
[[nil "--[no-]default-features" "Enable Cargo defaults"]
[nil "--features FEATURES" "Comma-separated functional Cargo features"
:parse-fn options/parse-feature-list]
(shared/build-timeout-option "Complete preparation deadline")])
(defn resolve-options
"Resolves build arguments and supplied flags."
[options arguments]
(shared/check-arguments arguments 0)
options)