Skip to content

Reorganize and refactor source tree #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2018

Conversation

alexcrichton
Copy link
Member

With RFC 2325 looking close to being accepted, I took a crack at
reorganizing this repository to being more amenable for inclusion in
libstd/libcore. My current plan is to add stdsimd as a submodule in
rust-lang/rust and then use #[path] to include the modules directly
into libstd/libcore.

Before this commit, however, the source code of coresimd/stdsimd
themselves were not quite ready for this. Imports wouldn't compile for
one reason or another, and the organization was also different than the
RFC itself!

In addition to moving a lot of files around, this commit has the
following major changes:

  • The cfg_feature_enabled! macro is now renamed to
    is_target_feature_detected!
  • The vendor module is now called arch.
  • Under the arch module is a suite of modules like x86, x86_64,
    etc. One per cfg!(target_arch).
  • The is_target_feature_detected! macro was removed from coresimd.
    Unfortunately libcore has no ability to export unstable macros, so for
    now all feature detection is canonicalized in stdsimd.

The coresimd and stdsimd crates have been updated to the planned
organization in RFC 2325 as well. The runtime bits saw the largest
amount of refactoring, seeing a good deal of simplification without the
core/std split.

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 17, 2018

I think we should move all the run-time feature detection to std. Users of core might want to do run-time feature detection in different ways (e.g. if you are writing a kernel). It wouldn't be a bad idea to move run-time feature detection into its own crate, so that users of core could include it if they want to (we would just re-export this crate as is from stdsimd).

@alexcrichton alexcrichton force-pushed the reorganize branch 4 times, most recently from a635382 to 40a25d3 Compare February 18, 2018 00:23
With RFC 2325 looking close to being accepted, I took a crack at
reorganizing this repository to being more amenable for inclusion in
libstd/libcore. My current plan is to add stdsimd as a submodule in
rust-lang/rust and then use `#[path]` to include the modules directly
into libstd/libcore.

Before this commit, however, the source code of coresimd/stdsimd
themselves were not quite ready for this. Imports wouldn't compile for
one reason or another, and the organization was also different than the
RFC itself!

In addition to moving a lot of files around, this commit has the
following major changes:

* The `cfg_feature_enabled!` macro is now renamed to
  `is_target_feature_detected!`
* The `vendor` module is now called `arch`.
* Under the `arch` module is a suite of modules like `x86`, `x86_64`,
  etc. One per `cfg!(target_arch)`.
* The `is_target_feature_detected!` macro was removed from coresimd.
  Unfortunately libcore has no ability to export unstable macros, so for
  now all feature detection is canonicalized in stdsimd.

The `coresimd` and `stdsimd` crates have been updated to the planned
organization in RFC 2325 as well. The runtime bits saw the largest
amount of refactoring, seeing a good deal of simplification without the
core/std split.
@alexcrichton alexcrichton merged commit 80a524d into rust-lang:master Feb 18, 2018
@alexcrichton alexcrichton deleted the reorganize branch February 18, 2018 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants