Skip to content

Commit cb89f1e

Browse files
committed
Revert "Amend rust-lang#403: Change *-sys to *_sys"
This reverts commit 2baf8d3.
1 parent 3b194da commit cb89f1e

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

text/0403-cargo-build-command.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ around build commands to facilitate linking native code to Cargo packages.
99

1010
1. Instead of having the `build` command be some form of script, it will be a
1111
Rust command instead
12-
2. Establish a namespace of `foo_sys` packages which represent the native
12+
2. Establish a namespace of `foo-sys` packages which represent the native
1313
library `foo`. These packages will have Cargo-based dependencies between
14-
`*_sys` packages to express dependencies among C packages themselves.
14+
`*-sys` packages to express dependencies among C packages themselves.
1515
3. Establish a set of standard environment variables for build commands which
16-
will instruct how `foo_sys` packages should be built in terms of dynamic or
16+
will instruct how `foo-sys` packages should be built in terms of dynamic or
1717
static linkage, as well as providing the ability to override where a package
1818
comes from via environment variables.
1919

@@ -101,7 +101,7 @@ Summary:
101101
* Add platform-specific dependencies to Cargo manifests
102102
* Allow pre-built libraries in the same manner as Cargo overrides
103103
* Use Rust for build scripts
104-
* Develop a convention of `*_sys` packages
104+
* Develop a convention of `*-sys` packages
105105

106106
## Modifications to `rustc`
107107

@@ -358,38 +358,38 @@ useful to interdependencies among native packages themselves. For example
358358
libssh2 depends on OpenSSL on linux, which means it needs to find the
359359
corresponding libraries and header files. The metadata keys serve as a vector
360360
through which this information can be transmitted. The maintainer of the
361-
`openssl_sys` package (described below) would have a build script responsible
361+
`openssl-sys` package (described below) would have a build script responsible
362362
for generating this sort of metadata so consumer packages can use it to build C
363363
libraries themselves.
364364

365-
## A set of `*_sys` packages
365+
## A set of `*-sys` packages
366366

367367
This section will discuss a *convention* by which Cargo packages providing
368368
native dependencies will be named, it is not proposed to have Cargo enforce this
369369
convention via any means. These conventions are proposed to address constraints
370370
5 and 6 above.
371371

372-
Common C dependencies will be refactored into a package named `foo_sys` where
373-
`foo` is the name of the C library that `foo_sys` will provide and link to.
372+
Common C dependencies will be refactored into a package named `foo-sys` where
373+
`foo` is the name of the C library that `foo-sys` will provide and link to.
374374
There are two key motivations behind this convention:
375375

376-
* Each `foo_sys` package will declare its own dependencies on other `foo_sys`
376+
* Each `foo-sys` package will declare its own dependencies on other `foo-sys`
377377
based packages
378378
* Dependencies on native libraries expressed through Cargo will be subject to
379379
version management, version locking, and deduplication as usual.
380380

381-
Each `foo_sys` package is responsible for providing the following:
381+
Each `foo-sys` package is responsible for providing the following:
382382

383-
* Declarations of all symbols in a library. Essentially each `foo_sys` library
383+
* Declarations of all symbols in a library. Essentially each `foo-sys` library
384384
is *only* a header file in terms of Rust-related code.
385-
* Ensuring that the native library `foo` is linked to the `foo_sys` crate. This
385+
* Ensuring that the native library `foo` is linked to the `foo-sys` crate. This
386386
guarantees that all exposed symbols are indeed linked into the crate.
387387

388-
Dependencies making use of `*_sys` packages will not expose `extern` blocks
389-
themselves, but rather use the symbols exposed in the `foo_sys` package
390-
directly. Additionally, packages using `*_sys` packages should not declare a
388+
Dependencies making use of `*-sys` packages will not expose `extern` blocks
389+
themselves, but rather use the symbols exposed in the `foo-sys` package
390+
directly. Additionally, packages using `*-sys` packages should not declare a
391391
`#[link]` directive to link to the native library as it's already linked to the
392-
`*_sys` package.
392+
`*-sys` package.
393393

394394
## Phasing strategy
395395

@@ -517,7 +517,7 @@ perform this configuration (be it environment or in files).
517517
* Features themselves will also likely need to be platform-specific, but this
518518
runs into a number of tricky situations and needs to be fleshed out.
519519

520-
[verbose]: https://github.com/alexcrichton/complicated-linkage-example/blob/master/curl_sys/Cargo.toml#L9-L17
520+
[verbose]: https://github.com/alexcrichton/complicated-linkage-example/blob/master/curl-sys/Cargo.toml#L9-L17
521521

522522
# Alternatives
523523

0 commit comments

Comments
 (0)