rust/src/tools
Alex Crichton f836ae48e6 Rollup merge of #48883 - alexcrichton:wasm-custom-sections, r=nikomatsakis
rustc: Add a `#[wasm_custom_section]` attribute

This commit is an implementation of adding custom sections to wasm artifacts in
rustc. The intention here is to expose the ability of the wasm binary format to
contain custom sections with arbitrary user-defined data. Currently neither our
version of LLVM nor LLD supports this so the implementation is currently custom
to rustc itself.

The implementation here is to attach a `#[wasm_custom_section = "foo"]`
attribute to any `const` which has a type like `[u8; N]`. Other types of
constants aren't supported yet but may be added one day! This should hopefully
be enough to get off the ground with *some* custom section support.

The current semantics are that any constant tagged with `#[wasm_custom_section]`
section will be *appended* to the corresponding section in the final output wasm
artifact (and this affects dependencies linked in as well, not just the final
crate). This means that whatever is interpreting the contents must be able to
interpret binary-concatenated sections (or each constant needs to be in its own
custom section).

To test this change the existing `run-make` test suite was moved to a
`run-make-fulldeps` folder and a new `run-make` test suite was added which
applies to all targets by default. This test suite currently only has one test
which only runs for the wasm target (using a node.js script to use `WebAssembly`
in JS to parse the wasm output).
2018-03-23 10:16:07 -07:00
..
build-manifest build-manifest: Add powerpc-unknown-linux-gnuspe target 2018-02-26 02:07:24 +01:00
cargo@d10ec661b0 Update Cargo to fix regression 2018-03-20 15:59:28 +03:00
cargotest Update miri to rustc changes 2017-12-06 09:25:29 +01:00
clippy@4edd140e57 Update clippy 2018-03-18 13:29:57 +01:00
compiletest rustc: Add a #[wasm_custom_section] attribute 2018-03-22 13:16:38 -07:00
error_index_generator Remove syntax and syntax_pos thread locals 2018-03-14 11:56:01 +01:00
linkchecker Update env_logger to 0.5.4 2018-03-06 12:37:28 -08:00
lld@b87873eace rust: Import LLD for linking wasm objects 2018-03-03 20:21:35 -08:00
miri@d4712ca375 Automatically enable the clippy feature of rls if clippy builds 2018-03-16 18:24:08 +01:00
remote-test-client Add a disabled builder for aarch64 emulated tests 2017-07-24 16:24:52 -07:00
remote-test-server Add remote device testing support 2017-05-04 12:43:22 +02:00
rls@974c515493 Update RLS and Rustfmt 2018-03-23 10:34:47 +13:00
rust-installer@118e078c5b Reupdate rust-installer 2018-03-02 16:49:01 +01:00
rustbook update mdbook to 0.1.2 2018-02-04 15:47:35 -05:00
rustdoc Cargotest needs only one rustdoc.exe to exist on Windows 2017-08-13 05:15:44 +05:00
rustdoc-js Fix for older JS versions 2018-01-16 15:38:08 +01:00
rustdoc-themes Convert python script to rust 2018-02-08 10:53:09 +01:00
rustfmt@374dba833e Update RLS and Rustfmt 2018-03-23 10:34:47 +13:00
tidy Remove syntax and syntax_pos thread locals 2018-03-14 11:56:01 +01:00
unstable-book-gen Enforce dashes in the unstable book file names 2018-01-13 15:44:44 +01:00
publish_toolstate.py Run the external doc tests in tools job. 2018-02-24 00:54:13 +08:00