Commit graph

37 commits

Author SHA1 Message Date
Nathan Ross
36503a77c7 impl: use coreopts for brevity and consistent UX 2016-08-20 10:07:24 -04:00
Michael Gehring
a2944e06db Fix clippy warnings 2016-01-06 09:36:20 +01:00
Joseph Crail
b90d253584 Refactor and simplify build for utilities.
For coreutils, there are two build artifacts:

  1. multicall executable (each utility is a separate static library)
  2. individual utilities (still separate library with main wrapper)

To avoid namespace collision, each utility crate is defined as
"uu_{CMD}". The end user only sees the original utility name. This
simplifies build.rs.

Also, the thin wrapper for the main() function is no longer contained in
the crate. It has been separated into a dedicated file. This was
necessary to work around Cargo's need for the crate name attribute to
match the name in the respective Cargo.toml.
2015-12-07 21:56:45 -05:00
Michael Gehring
ca16e66a55 switch to cargo version numbers 2015-11-25 10:58:49 +01:00
Joseph Crail
ca1074201f Split utility files into separate library.
Everything in src/common has been moved to src/uucore. This is defined
as a Cargo library, instead of directly included. This gives us
flexibility to make the library an external crate in the future.

Fixes #717.
2015-11-24 22:20:27 -05:00
Nathan Ross
502957dc3e use cargo idioms to manage dependency resolution and compilation 2015-11-23 02:04:15 -05:00
Joseph Crail
4121d1e25d Remove unnecessary parentheses. 2015-10-31 02:32:55 -04:00
Carlos Liam
87d14978e9 Clean whitespace
Remove leading newlines and replace lines containing only whitespace
with empty lines
2015-10-06 12:04:46 -04:00
Michael Gehring
9d8abbcb06 Basic Cargo build
Builds the uutils multicall binary containing all utils (except stdbuf)
by default. To only build a subset
    `cargo --no-default-features --features <utils>`
can be used.

Whats missing is building the standalone binaries and a mechanism to
automatically disable the build of unix only utils on windows.
2015-08-28 21:12:30 +02:00
Gustavo Hexsel
f8df842dfb Moved code officially to run on nightly since it's a dependency 2015-08-26 12:50:07 -04:00
Joseph Crail
480019f5b3 Add comments for deprecated connect().
We are using connect() instead of join() until Rust 1.3 is stable.
Currently, connect() is just a thin wrapper over join(). Keeping the
deprecated method allows us to build on all releases.
2015-08-09 23:12:23 -04:00
Joseph Crail
43d3834880 Backport and/or replace unstable features.
I removed the unstable slice_patterns and str_char features. I also used
the deprecated connect() method, instead of join().
2015-08-08 03:53:21 -04:00
Joseph Crail
157c20c7d3 Replace deprecated methods. 2015-07-27 00:35:34 -04:00
Joseph Crail
d558e37288 Add macro to manually flush a writer.
I built upon the pipe_* macros, adding pipe_flush!() to flush an
optional writer (default to stdout if no writer is given).
2015-05-23 03:31:42 -04:00
Joseph Crail
07d57ac109 Fix failure to print stdout for echo.
Upon program termination, pending stdout writes were not automatically
flushed. When newlines are disabled, I force a flush to stdout.
2015-05-22 21:49:33 -04:00
Joseph Crail
b4b08de42c Switch to external getopts cargo (part 1).
I switched over to the getopts crate on crates.io, instead of Rust's
private implementation. This will allow coreutils to build for Rust 1.0.

I'm splitting the updates into several commits for better reviewing.
2015-05-20 22:47:30 -04:00
kwantam
05520e69cb clean up #![features]
For the most part, this commit removes the `collections` feature.
In some places I've removed other features where the effort to do
so was pretty low.
2015-04-27 15:27:15 -04:00
Joseph Crail
7c0eb246a0 Upgrade echo to use recent Rust nightly build.
I removed unused features, switched to the new range syntax, and other
minor updates.
2015-04-24 22:31:47 -04:00
Michael Gehring
26568d2021 Update to the new integer suffixes 2015-02-22 13:59:57 +01:00
Michael Gehring
9ae9a48387 feature io -> old_io, path -> old_path 2015-02-22 13:59:12 +01:00
Michael Gehring
e7b647171f os::set_exit_status(isize) -> env::set_exit_status(i32) 2015-02-22 13:59:12 +01:00
Michael Gehring
80f9ef08d2 various integer type changes 2015-02-22 10:27:16 +01:00
Michael Gehring
d3ff46d0c7 Drop deprecated 'libc' feature flag 2015-02-06 14:10:07 +01:00
Michael Gehring
3eb5a814a3 Fix most unstable feature warnings 2015-02-03 23:54:37 +01:00
Michael Gehring
d187dc574b std::io -> std::old_io 2015-01-29 08:45:37 +01:00
Michael Gehring
4d6cbfa393 Disable unstable warnings for now 2015-01-10 20:44:56 +01:00
Michael Gehring
782fad4667 int/uint -> isize/usize 2015-01-10 20:40:37 +01:00
Michael Gehring
f2d49f4bb6 Make uumain return isize everywhere 2015-01-10 14:07:39 +01:00
Michael Gehring
074a58eafd deriving is now called derive 2015-01-08 14:50:03 +01:00
Michael Gehring
1b381f49fa Use new macro feature flags/attributes 2015-01-08 14:50:02 +01:00
Haitao Li
b9e0ce0b1c Fix build with rustc master
* core::slice::Items renamd to core::slice::Iter
* from_utf8 returns Result instead of Option
* Unique type per fn item. Rust Issue #19891
2014-12-24 20:55:32 +11:00
Michael Gehring
cb4b5bce29 Remove now invalid format specifiers 2014-11-22 07:30:18 +01:00
Michael Gehring
09f223fdb1 Update for new coercion rules 2014-11-19 21:58:16 +01:00
Michael Gehring
47d4b69c8a std::num::parse_bytes has been removed 2014-11-05 12:18:43 +01:00
Michael Gehring
3244416b19 fail! -> panic! 2014-10-30 10:06:47 +01:00
Michael Gehring
2ef74e2783 Update for rust RFC 52 changes 2014-09-17 17:16:21 +02:00
Arcterus
b7f4bd01bc Move all of the utils into src 2014-07-20 20:20:55 -07:00