@@ -132,27 +132,22 @@ The build does not depend on any particular version manager. You need:
132132 (currently ` 6.3.2 ` ), used to build ` swift-syntax ` ` 603.0.2 ` . Install it any way
133133 you like — [ swift.org] ( https://www.swift.org/install/ ) or
134134 [ swiftly] ( https://www.swift.org/swiftly/ ) (which reads ` .swift-version ` ), or a
135- system package. Just make sure ` swift ` is on your ` PATH ` (or point ` build.rs `
136- at it with the ` SWIFT ` environment variable).
135+ system package. Just make sure ` swift ` (and ` swiftc ` ) are on your ` PATH ` —
136+ ` build.rs ` invokes them directly and does not read any environment variable
137+ to locate them.
137138
138139On Debian/Ubuntu the Swift runtime also needs ` libncurses6 ` (and related libs)
139140available on the system.
140141
141142## Building & testing
142143
143- With ` cargo ` and ` swift ` on ` PATH ` :
144+ With ` cargo ` and ` swift ` / ` swiftc ` on ` PATH ` :
144145
145146``` sh
146147cargo build
147148cargo test
148149```
149150
150- If your ` swift ` /` swiftc ` are not on ` PATH ` , point the build at them explicitly:
151-
152- ``` sh
153- SWIFT=/path/to/swift SWIFTC=/path/to/swiftc cargo build
154- ```
155-
156151The first build compiles ` swift-syntax ` and can take several minutes.
157152
158153## Building with Bazel (CI)
@@ -170,6 +165,10 @@ bazel test //unified/swift-syntax-rs:swift_syntax_rs_test
170165bazel run //unified/swift-syntax-rs:swift-syntax-parse < some.swift
171166```
172167
168+ The ` swift-syntax-parse ` binary is a debugging aid for looking at the raw
169+ swift-syntax JSON for some input; it is not shipped as part of the extractor
170+ pack, which links ` swift-syntax-rs ` directly instead.
171+
173172Requirements:
174173
175174- ** ` clang ` ** must be installed on the runner. ` rules_swift ` requires the Bazel
@@ -221,9 +220,9 @@ echo 'let x = 1' | cargo run --bin swift-syntax-parse
221220The JSON tree is consumed by the CodeQL extractor, which converts it into a
222221[ ` yeast::Ast ` ] ( ../../shared/yeast ) — the in-memory format its rewrite rules
223222operate on. That adapter is a pure-Rust module living in the extractor
224- (` unified/extractor/src/languages/swift/adapter.rs ` ), so the extractor never
225- needs the Swift toolchain: it consumes the JSON produced out-of -process by this
226- crate's ` parse_to_json ` / the ` swift-syntax-parse ` binary .
223+ (` unified/extractor/src/languages/swift/adapter.rs ` ). The extractor links
224+ ` swift-syntax-rs ` directly and consumes the JSON produced in -process by this
225+ crate's ` parse_to_json ` .
227226
228227## Layout
229228
0 commit comments