Commit Graph

37 Commits

Author SHA1 Message Date
Dario Gonzalez
f2466cd166 Added ignore-sgx for appropriate tests 2019-05-16 14:29:12 -07:00
Marcel Hellwig
cc314b066a Remove bitrig support from rust 2019-05-13 11:09:06 +02:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Ed Schouten
3f880912e9 Add 'ignore-cloudabi' to tests that don't and won't build on CloudABI.
It looks like many of these tests are already disabled on emscripten,
which also doesn't seem to support environment variables and subprocess
spawning. Just add a similar tag for CloudABI. While there, sort some of
the lists of operating systems alphabetically.
2018-01-02 14:11:41 +01:00
Alex Crichton
80ff0f74b0 std: Add a new wasm32-unknown-unknown target
This commit adds a new target to the compiler: wasm32-unknown-unknown. This
target is a reimagining of what it looks like to generate WebAssembly code from
Rust. Instead of using Emscripten which can bring with it a weighty runtime this
instead is a target which uses only the LLVM backend for WebAssembly and a
"custom linker" for now which will hopefully one day be direct calls to lld.

Notable features of this target include:

* There is zero runtime footprint. The target assumes nothing exists other than
  the wasm32 instruction set.
* There is zero toolchain footprint beyond adding the target. No custom linker
  is needed, rustc contains everything.
* Very small wasm modules can be generated directly from Rust code using this
  target.
* Most of the standard library is stubbed out to return an error, but anything
  related to allocation works (aka `HashMap`, `Vec`, etc).
* Naturally, any `#[no_std]` crate should be 100% compatible with this new
  target.

This target is currently somewhat janky due to how linking works. The "linking"
is currently unconditional whole program LTO (aka LLVM is being used as a
linker). Naturally that means compiling programs is pretty slow! Eventually
though this target should have a linker.

This target is also intended to be quite experimental. I'm hoping that this can
act as a catalyst for further experimentation in Rust with WebAssembly. Breaking
changes are very likely to land to this target, so it's not recommended to rely
on it in any critical capacity yet. We'll let you know when it's "production
ready".

---

Currently testing-wise this target is looking pretty good but isn't complete.
I've got almost the entire `run-pass` test suite working with this target (lots
of tests ignored, but many passing as well). The `core` test suite is still
getting LLVM bugs fixed to get that working and will take some time. Relatively
simple programs all seem to work though!

---

It's worth nothing that you may not immediately see the "smallest possible wasm
module" for the input you feed to rustc. For various reasons it's very difficult
to get rid of the final "bloat" in vanilla rustc (again, a real linker should
fix all this). For now what you'll have to do is:

    cargo install --git https://github.com/alexcrichton/wasm-gc
    wasm-gc foo.wasm bar.wasm

And then `bar.wasm` should be the smallest we can get it!

---

In any case for now I'd love feedback on this, particularly on the various
integration points if you've got better ideas of how to approach them!
2017-11-19 21:07:41 -08:00
Pierre Krieger
657f1cf0e0 Fix x86stdcall test with emscripten 2016-02-10 10:37:02 +01:00
Nikita Baksalyar
e5da5d59f8
Rename sunos to solaris 2016-01-31 19:01:30 +03:00
Nikita Baksalyar
f189d7a693
Add Illumos support 2016-01-31 18:57:26 +03:00
Alex Newman
0b7c4f57f6 Add netbsd amd64 support 2015-07-01 19:09:14 -07:00
Alex Crichton
43bfaa4a33 Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
2015-03-26 12:10:22 -07:00
Eduard Burtescu
e64670888a Remove integer suffixes where the types in compiled code are identical. 2015-03-05 12:38:33 +05:30
bors
2b01a37ec3 Auto merge of #21959 - dhuseby:bitrig-support, r=brson
This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
2015-02-21 09:20:48 +00:00
Niko Matsakis
72eb214ee4 Update suffixes en masse in tests using perl -p -i -e 2015-02-18 09:10:10 -05:00
Dave Huseby
cd8f31759f bitrig integration 2015-02-11 14:49:06 -08:00
Sébastien Marie
fcb30a0b67 openbsd support 2015-02-01 14:41:38 +01:00
Steven Fackler
aa3b1261b1 Continue cfg syntax transition
All deprecation warnings have been converted to errors. This includes
the warning for multiple cfgs on one item. We'll leave that as an error
for some period of time to ensure that all uses are updated before the
behavior changes from "or" to "and".
2014-10-12 11:40:19 -07:00
Michael Neumann
284ffc5b82 Fix test suite for DragonFly 2014-07-31 02:23:35 +02:00
Alex Crichton
cc6ec8df95 log: Introduce liblog, the old std::logging
This commit moves all logging out of the standard library into an external
crate. This crate is the new crate which is responsible for all logging macros
and logging implementation. A few reasons for this change are:

* The crate map has always been a bit of a code smell among rust programs. It
  has difficulty being loaded on almost all platforms, and it's used almost
  exclusively for logging and only logging. Removing the crate map is one of the
  end goals of this movement.

* The compiler has a fair bit of special support for logging. It has the
  __log_level() expression as well as generating a global word per module
  specifying the log level. This is unfairly favoring the built-in logging
  system, and is much better done purely in libraries instead of the compiler
  itself.

* Initialization of logging is much easier to do if there is no reliance on a
  magical crate map being available to set module log levels.

* If the logging library can be written outside of the standard library, there's
  no reason that it shouldn't be. It's likely that we're not going to build the
  highest quality logging library of all time, so third-party libraries should
  be able to provide just as high-quality logging systems as the default one
  provided in the rust distribution.

With a migration such as this, the change does not come for free. There are some
subtle changes in the behavior of liblog vs the previous logging macros:

* The core change of this migration is that there is no longer a physical
  log-level per module. This concept is still emulated (it is quite useful), but
  there is now only a global log level, not a local one. This global log level
  is a reflection of the maximum of all log levels specified. The previously
  generated logging code looked like:

    if specified_level <= __module_log_level() {
        println!(...)
    }

  The newly generated code looks like:

    if specified_level <= ::log::LOG_LEVEL {
        if ::log::module_enabled(module_path!()) {
            println!(...)
        }
    }

  Notably, the first layer of checking is still intended to be "super fast" in
  that it's just a load of a global word and a compare. The second layer of
  checking is executed to determine if the current module does indeed have
  logging turned on.

  This means that if any module has a debug log level turned on, all modules
  with debug log levels get a little bit slower (they all do more expensive
  dynamic checks to determine if they're turned on or not).

  Semantically, this migration brings no change in this respect, but
  runtime-wise, this will have a perf impact on some code.

* A `RUST_LOG=::help` directive will no longer print out a list of all modules
  that can be logged. This is because the crate map will no longer specify the
  log levels of all modules, so the list of modules is not known. Additionally,
  warnings can no longer be provided if a malformed logging directive was
  supplied.

The new "hello world" for logging looks like:

    #[phase(syntax, link)]
    extern crate log;

    fn main() {
        debug!("Hello, world!");
    }
2014-03-15 22:26:36 -07:00
Young-il Choi
68024eb4eb android support added to test case 2013-11-19 09:08:47 +09:00
Leah Hanson
69768f7c94 Fix XFailed test x86stdcall
There was a syntax error because the `extern "stdcall"` was outside the module instead of inside it.

* moved `extern` inside module
* change `extern "stdcall"` to `extern "system"`
* change `cfg(target_os="win32")` to `cfg(windows)`
* updated copyright dates
* changed log(error, ...) => info!(....)
* added `pub` keyword to kernel32 functions
2013-11-17 20:55:59 -06:00
Corey Richardson
cc57ca012a Use assert_eq! rather than assert! where possible 2013-05-19 08:16:02 -04:00
Patrick Walton
1e91595520 librustc: Remove fail_unless! 2013-03-29 16:39:08 -07:00
Patrick Walton
d7e74b5e91 librustc: Convert all uses of assert over to fail_unless! 2013-03-07 22:37:57 -08:00
Graydon Hoare
89c8ef792f check-fast fallout from removing export, r=burningtree 2013-02-01 19:43:17 -08:00
Graydon Hoare
d1f771ca34 test: fix x86stdcall test, r=burningtree. 2013-01-25 15:18:45 -08:00
Graydon Hoare
d1affff623 Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
Graydon Hoare
debb7e4641 Switch 'native' to 'extern' (or 'foreign' in some descriptions) 2012-07-03 16:11:00 -07:00
User Jyyou
a59c4b1b47 freebsd support 2012-01-01 20:18:55 -08:00
Graydon Hoare
f0dfbe7b1b Register new snapshots, purge log_err and log_full in favour of log(...). 2011-12-22 17:53:53 -08:00
Graydon Hoare
8b580954fe Register snapshots and switch logging over to use of log_full or #error / #debug. 2011-12-22 14:42:52 -08:00
Brian Anderson
e96342820d Add "stdcall" as synonym for "c-stack-stdcall" 2011-11-09 16:47:44 -08:00
Brian Anderson
4a4d31cf0e Make native "c-stack-stdcall" ABI work
The symbol name is based on the number of arguments, so we have to declare
it correctly.

For some reason GetLastError doesn't work now.
2011-11-09 15:29:53 -08:00
Brian Anderson
518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00
Brian Anderson
c53402846e Remove all xfail-stage0 directives
While it is still technically possible to test stage 0, it is not part of any
of the main testing rules and maintaining xfail-stage0 is a chore. Nobody
should worry about how tests fare in stage0.
2011-08-03 10:55:59 -07:00
Marijn Haverbeke
df7f21db09 Reformat for new syntax 2011-07-27 15:54:33 +02:00
Brian Anderson
ad1c0e6308 Reformulate x86stdcall test so it works with check-fast
Hopefully this puts out the burning win32 tinderbox
2011-07-18 14:59:44 -07:00
Brian Anderson
c40d6265ce Support x86 stdcall convention
This allows rust to call the Win32 API
2011-07-18 13:56:15 -07:00