about summary refs log tree commit diff
path: root/src/libextra/flate.rs
AgeCommit message (Collapse)AuthorLines
2014-01-26Move extra::flate to libflateAlex Crichton-129/+0
This is hopefully the beginning of the long-awaited dissolution of libextra. Using the newly created build infrastructure for building libraries, I decided to move the first module out of libextra. While not being a particularly meaty module in and of itself, the flate module is required by rustc and additionally has a native C dependency. I was able to very easily split out the C dependency from rustrt, update librustc, and magically everything gets installed to the right locations and built automatically. This is meant to be a proof-of-concept commit to how easy it is to remove modules from libextra now. I didn't put any effort into modernizing the interface of libflate or updating it other than to remove the one glob import it had.
2014-01-22libc: switch `free` to the proper signatureDaniel Micay-2/+2
This does not attempt to fully propagate the mutability everywhere, but gives new code a hint to avoid the same issues.
2013-12-19std::vec: remove .as_imm_buf, replaced by .as_ptr & .len.Huon Wilson-28/+22
There's no need for the restrictions of a closure with the above methods.
2013-12-08Remove dead codesKiet Tran-3/+0
2013-12-02Declare librustrt a static dependency of libextraAlex Crichton-1/+1
This wasn't uncovered during testing because the librustrt is available locally in the build directory (and it needs to be for all the tests to link against it as well). Closes #10765
2013-11-29Add generation of static libraries to rustcAlex Crichton-1/+1
This commit implements the support necessary for generating both intermediate and result static rust libraries. This is an implementation of my thoughts in https://mail.mozilla.org/pipermail/rust-dev/2013-November/006686.html. When compiling a library, we still retain the "lib" option, although now there are "rlib", "staticlib", and "dylib" as options for crate_type (and these are stackable). The idea of "lib" is to generate the "compiler default" instead of having too choose (although all are interchangeable). For now I have left the "complier default" to be a dynamic library for size reasons. Of the rust libraries, lib{std,extra,rustuv} will bootstrap with an rlib/dylib pair, but lib{rustc,syntax,rustdoc,rustpkg} will only be built as a dynamic object. I chose this for size reasons, but also because you're probably not going to be embedding the rustc compiler anywhere any time soon. Other than the options outlined above, there are a few defaults/preferences that are now opinionated in the compiler: * If both a .dylib and .rlib are found for a rust library, the compiler will prefer the .rlib variant. This is overridable via the -Z prefer-dynamic option * If generating a "lib", the compiler will generate a dynamic library. This is overridable by explicitly saying what flavor you'd like (rlib, staticlib, dylib). * If no options are passed to the command line, and no crate_type is found in the destination crate, then an executable is generated With this change, you can successfully build a rust program with 0 dynamic dependencies on rust libraries. There is still a dynamic dependency on librustrt, but I plan on removing that in a subsequent commit. This change includes no tests just yet. Our current testing infrastructure/harnesses aren't very amenable to doing flavorful things with linking, so I'm planning on adding a new mode of testing which I believe belongs as a separate commit. Closes #552
2013-11-26test: Remove all remaining non-procedure uses of `do`.Patrick Walton-6/+6
2013-11-26librustuv: Remove all non-`proc` uses of `do` from `libextra` andPatrick Walton-4/+4
`librustuv`.
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-4/+0
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-10-23std::rand: add distributions::Range for generating [lo, hi).Huon Wilson-1/+1
This reifies the computations required for uniformity done by (the old) `Rng.gen_integer_range` (now Rng.gen_range), so that they can be amortised over many invocations, if it is called in a loop. Also, it makes it correct, but using a trait + impls for each type, rather than trying to coerce `Int` + `u64` to do the right thing. This also makes it more extensible, e.g. big integers could & should implement SampleRange.
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-2/+2
Who doesn't like a massive renaming?
2013-10-01remove the `float` typeDaniel Micay-1/+1
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30extra: Remove usage of fmt!Alex Crichton-2/+2
2013-09-23std: merge rand::{Rng,RngUtil} with default methods.Huon Wilson-3/+3
Also, documentation & general clean-up: - remove `gen_char_from`: better served by `sample` or `choose`. - `gen_bytes` generalised to `gen_vec`. - `gen_int_range`/`gen_uint_range` merged into `gen_integer_range` and made to be properly uniformly distributed. Fixes #8644. Minor adjustments to other functions.
2013-08-27librustc: Remove `&const` and `*const` from the language.Patrick Walton-2/+2
They are still present as part of the borrow check.
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-0/+4
2013-08-07extra: add `internal` to {de,in}flate_bytes_ naming to address nitdarkf-6/+6
2013-08-07add extra::flate::deflate_bytes_zlib and a testdarkf-2/+19
2013-08-07add inflate_bytes_zlib to exra::flatedarkf-2/+11
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-10/+10
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-3/+3
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01make `in` and `foreach` get treated as keywordsDaniel Micay-7/+7
2013-07-20librustc: Remove `pub extern` and `priv extern` from the language.Patrick Walton-11/+11
Place `pub` or `priv` on individual items instead.
2013-07-17librustc: Remove the `Copy` bound from the language.Patrick Walton-1/+0
2013-07-04Convert vec::{as_imm_buf, as_mut_buf} to methods.Huon Wilson-2/+2
2013-07-01rustc: add a lint to enforce uppercase statics.Huon Wilson-5/+5
2013-06-30auto merge of #7468 : cmr/rust/great_renaming, r=pcwaltonbors-7/+6
2013-06-29Removing a lot of usage of '&const'Alex Crichton-4/+4
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-7/+6
2013-06-09remove unused import warningsHuon Wilson-2/+1
2013-05-30libextra: Require documentation by defaultAlex Crichton-0/+2
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-1/+2
2013-05-23cleanup warnings from libextraErick Tryzelaar-26/+29
2013-05-22libsyntax: Fix more merge fallout.Patrick Walton-0/+2
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-2/+2
to libextra
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+107
This only changes the directory names; it does not change the "real" metadata names.