profile
viewpoint

atroche/rust-headless-chrome 593

A high-level API to control headless Chrome or Chromium over the DevTools Protocol. It is the Rust equivalent of Puppeteer, a Node library maintained by the Chrome DevTools team.

lukaslueg/macro_railroad 368

A library to generate syntax diagrams for Rust macros.

lukaslueg/built 75

Provides a crate with information from the time it was built.

lukaslueg/railroad 75

A library to produce syntax diagrams as Scalable Vector Graphics

lukaslueg/macro_railroad_ext 69

Display syntax-diagrams for Rust-macros on docs.rs and doc.rust-lang.org

lukaslueg/volkswagen 52

volkswagen detects when your tests are executed in a CI-environment and makes them pass

lukaslueg/wirepy 23

A foreign function interface to use Wireshark within Python

lukaslueg/dumpcap 16

Provides an interface to Wireshark's "dumpcap" for the go programming language

lukaslueg/railroad_dsl 10

A small DSL to generate syntax diagrams

lukaslueg/macro_railroad_wasm 4

A wasm-compiled demo for the macro_railroad library

issue commentlukaslueg/restruct

Use of undeclared crate or module `restruct`

I've bumped the version on crates.io to 0.1.1, it should build with recent nightly.

JulianWgs

comment created time in 5 minutes

created taglukaslueg/restruct

tag0.1.1

Simple parsers for binary data in Rust

created time in 20 minutes

push eventlukaslueg/restruct

Lukas Lueg

commit sha d67470e4265675786becf630dddcf118dd153ee0

Bump to 0.1.1

view details

push time in 20 minutes

issue closedlukaslueg/restruct

Remove nightly features

Hello,

very cool project!

Does this project need the nightly features? I would be humbled if you could find a way to disable the use of nightly features. Otherwise it is not possible to use the project on the stable channel.

I can also help :)

Best greetings Julian

closed time in an hour

JulianWgs

issue commentlukaslueg/restruct

Remove nightly features

Yes, this needs the nightly features and probably will do so for the foreseeable future, as const-related features will only slowly make it into the stable channel.

JulianWgs

comment created time in an hour

issue closedlukaslueg/restruct

Use of undeclared crate or module `restruct`

Hello,

the example code fails with the error message:

$ cargo +nightly run                            
   Compiling test_restruct v0.1.0 (XXX)
error[E0433]: failed to resolve: use of undeclared crate or module `restruct`
 --> src/main.rs:8:14
  |
8 |     #[derive(restruct_derive::Struct)]
  |              ^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `restruct`
  |
  = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused import: `restruct_derive::Struct`
 --> src/main.rs:1:5
  |
1 | use restruct_derive::Struct;
  |     ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0433`.
error: could not compile `test_restruct`

To learn more, run the command again with --verbose.

use restruct_derive::Struct;

fn main() {
    #![feature(const_fn)]
    #![feature(const_transmute)]

    // Generate a parser in little-endian for two 32bit integers, a float and a bool.
    #[derive(restruct_derive::Struct)]
    #[fmt="<2if?"]
    struct FooParser;

    // Pack a tuple of two integers, a float an a bool into a [u8; _]-buffer.
    let packed = FooParser::pack((1, 2, 3.0, false));
    assert_eq!(packed.len(), FooParser::SIZE);

    // Packing and unpacking can't fail at runtime.
    let unpacked = FooParser::unpack(packed);
    assert_eq!(unpacked, (1, 2, 3.0, false));
}

I'm sorry if this just a user error :/

closed time in an hour

JulianWgs

issue commentlukaslueg/restruct

Use of undeclared crate or module `restruct`

This is because const_transmute is now const_fn_transmute and the proc-macro fails to build with the current 0.1. I've updated this in 2c6b38d73e16515f8ec5342f2ba5ed1bf97b286d and may bump to 0.1.1.

JulianWgs

comment created time in an hour

push eventlukaslueg/restruct

Lukas Lueg

commit sha 2c6b38d73e16515f8ec5342f2ba5ed1bf97b286d

Rename const_transmute to const_fn_transmute

view details

Lukas Lueg

commit sha 6984d46ff15f475758143b2cd0b3db64aaa8e6cb

Update dependencies

view details

push time in 2 hours

push eventlukaslueg/rust

ecstatic-morse

commit sha fe97990e2395d46aceb9472fd04704c623c8eb0e

Add comment to `Abort` match arm Co-authored-by: Ralf Jung <post@ralfj.de>

view details

ecstatic-morse

commit sha 6ae1da3198bd2d110652900082800e01a8e37149

But whatever

view details

LeSeulArtichaut

commit sha 17d3c0a1788c5fc53947109a902869a51d8caa38

Use more intra-doc-links in `core::fmt`

view details

bors

commit sha beb5ae474d2835962ebdf7416bd1c9ad864fe101

Auto merge of #77023 - HeroicKatora:len-missed-optimization, r=Mark-Simulacrum Hint the maximum length permitted by invariant of slices One of the safety invariants of references, and in particular of references to slices, is that they may not cover more than `isize::MAX` bytes. The unsafe `from_raw_parts` constructors of slices explicitly requires the caller to guarantee this fact. Violating it would also be UB with regards to the semantics of generated llvm code. This effectively bounds the length of a (non-ZST) slice from above by a compile time constant. But when the length is loaded from a function argument it appears llvm is not aware of this requirement. The additional value range assertions allow some further elision of code branches, including overflow checks, especially in the presence of artithmetic on the indices. This may have a performance impact, adding more code to a common method but allowing more optimization. I'm not quite sure, is the Rust side of const-prop strong enough to elide the irrelevant match branches? Fixes: #67186

view details

Bastian Kauschke

commit sha 536674fb69ea161f50f68f3fdb65950feffd92a4

cleanup WithOptConstParam queries

view details

Robin Schoonover

commit sha 5ab19676ed25ce52769b06a2fc7319b93d6c64dd

Remove extra indirection in LitKind::ByteStr

view details

Robin Schoonover

commit sha 62f7712a1fd500604f76442f627ea35ce7217177

Change clippy's Constant back to refcount clone byte strings

view details

Robin Schoonover

commit sha f34f4a732714c397c30055feddb2b520b6acd38e

Change clippy's Constant back to refcount clone byte strings

view details

Dylan MacKenzie

commit sha e72e43c730a205237cacb8e9a7928ca0a0746252

Replace `(Body, DefId)` with `Body` where possible A `Body` now contains its `MirSource`, which in turn contains the `DefId` of the item associated with the `Body`.

view details

Dylan MacKenzie

commit sha 52484c59e5f97dddcacbed119f64ea6ec7eccac7

clippy: `(Body, DefId)` -> `Body`

view details

Dylan MacKenzie

commit sha 29d43f63bd41e794162a8118b422eff66b5f47eb

clippy: `(Body, DefId)` -> `Body`

view details

Mingye Wang

commit sha a35a93f09cc111a53d00efc567ad678583dd5ac7

Pass tune-cpu to LLVM I think this is how it should work...

view details

Camelid

commit sha b205436ff66db720cb4b0c503d14ff0a571b14c7

Allow anyone to set regression labels

view details

Dylan MacKenzie

commit sha 2e35cf973bea64f2d5afbe1f321e2b7a15967ab6

Replace `(Body, WithOptConstParam)` with `Body` where possible

view details

Dylan MacKenzie

commit sha fff3b7596af4e8c40dd54be2fb0648327244f097

nll: solve

view details

Dylan MacKenzie

commit sha 04a94abcb9f8029bc16cee974bfe37f0001f17e3

Remove `DefId` from `MirBorrowckCtxt`

view details

Dylan DPC

commit sha 6c9e85726c46254f0bb1b23d781c4c1b8a11e797

Rollup merge of #75853 - LeSeulArtichaut:core-intra-docs-3, r=jyn514 Use more intra-doc-links in `core::fmt` This is a follow-up to #75819, which encountered some broken links due to #75176, so this PR contains the links that are blocked on #75176. r? @jyn514

view details

Dylan DPC

commit sha 5fa978fa1b8377786b3f6bd1ff4eb4b92639fc8c

Rollup merge of #75928 - JulianKnodt:non_utf8, r=estebank Remove trait_selection error message in specific case In the case that a trait is not implemented for an ADT with type errors, cancel the error. Fixes #75627

view details

Dylan DPC

commit sha e6e7ccc28d3a574f87824af0532440d28b17311d

Rollup merge of #76329 - GuillaumeGomez:doc-alias-crate-level, r=matthewjasper Add check for doc alias attribute at crate level Fixes #76298, #64734, #69365. r? @ollie27

view details

Dylan DPC

commit sha 583269d8c5df4456da75ef888913c8760645f046

Rollup merge of #77219 - mightyiam:issue_77100, r=jyn514 core::global_allocator docs link to std::alloc::GlobalAlloc Closes #77100

view details

push time in 3 days

issue openedrust-lang/rust

Add std::iter::Peekable::peek_mut

A "peekable" iterator has a peek()-method which provides an immutable reference to the next item. We currently do not have a method to modify that item, which we could easily add via a peek_mut(). A draft-implementation to add a new peek_mut-method is in #77491

A peek_mut would allow one to peek into the very next item the iterator will return and change it if so desired (essentially a single-shot .map()):

let xs = vec![1, 2, 3];
let mut it = xs.into_iter().peekable();
if let Some(ref mut p) = it.peek_mut() {
    if **p == 1 {
        **p = 5;
    }
}
assert_eq!(it.collect::<Vec<_>>(), vec![5, 2, 3]);

created time in 3 days

pull request commentrust-lang/rust

Proposal to add Peekable::peek_mut

I've a iterator of ´BufReadwhere I peek into the buffer viafill_buf`, which requires mutable access to fill the buffer.

lukaslueg

comment created time in 23 days

create barnchlukaslueg/rust

branch : peek_mut

created branch time in 23 days

PR opened rust-lang/rust

Proposal to add Peekable::peek_mut

A "peekable" iterator has a peek()-method which provides an immutable reference to the next item. We currently do not have a method to modify that item, which we could easily add via a peek_mut(). See the test for a use-case (alike to my original use case), where a "pristine" iterator is passed on after modifying its state via peek_mut().

If there is interest in this, I can expand on the tests and docs.

+21 -0

0 comment

3 changed files

pr created time in 23 days

issue commentrust-lang/rust

Tracking issue for const `Result`

#76136 has been merged, this can be closed?

lukaslueg

comment created time in a month

issue commentrust-lang/rust

The default overflow behavior of u128 arithmetic operation is not panic for wasm32 target.

Unsigned integers are documented to silently overflow when code compiled in release mode.

laizy

comment created time in a month

push eventlukaslueg/cargo

Luca Barbato

commit sha d5eeab84c71e598f19b9b002cdd72ded8c76ca3b

Have a mean to override the root package in a workspace

view details

bors

commit sha ae08099ce1f45852852b355eec92743abc9fb980

Auto merge of #7791 - ehuss:rename-kind, r=alexcrichton Rename `Kind` Rename `dependency::Kind` → `dependency::DepKind` Rename `source_id::Kind` → `source_id::SourceKind` I struggle when there are multiple types with the same name in the same code base. I think this makes it a little clearer what the type is. I was tempted to also rename `registry::Kind`, but I could not think of a good name. That file is particularly hard for me to understand (locked vs normal sources, abstract trait, etc.), so I don't feel comfortable changing it. It's also localized in one file, so not as important.

view details

bors

commit sha 56a5503268c0f0d5328b8b901db97007c3e737f4

Auto merge of #7755 - lu-zero:rustc-crate-type, r=alexcrichton Make cargo-rustc crate-type-aware This fixes #7339 and makes the usage of `cargo rustc` less surprising overall.

view details

Eric Huss

commit sha 77ee608de3404810d437fa83340de8887685ebbc

Add named config profiles.

view details

Eric Huss

commit sha dafacbb76b60991b9d6b98fc7197429fc69bdf72

Update tests for formatting changes due to `anyhow` changes.

view details

bors

commit sha ad3dbe10e1e654fb1f032a5dd9481d7cbaa00d65

Auto merge of #7750 - ehuss:named-config-profiles, r=alexcrichton Add named config profiles. This adds support for named config profiles. Previously, only `dev` and `release` were allowed in config files, it now supports all profile names. I think it would be strange to have arbitrarily named profiles in `Cargo.toml`, but not allow them in config. This is a deviation from the RFC, but RFC 2282 was written before named profiles which I think changes the landscape. This diff is a little large due to some refactoring to make it work well. Overview of the changes: - Removed `ProfileKind` and only use an `InternedString` to track the name of the profile. I didn't feel like the enum carried its cognitive weight, and it seems to simplify some things. - `Profiles` is no longer stored in the manifest. There was no need to do a bunch of processing for each manifest. `Manifest` now only retains the low-level `TomlProfiles`. A single `Profiles` now lives in `BuildContext`. - The profile name requested by the user is no longer passed around. It is given to `Profiles::new` and retained inside `Profiles`. - `Profiles::get_profile` no longer follows the priority stack and inheritance each time a profile is requested. Instead, the profile is computed once (in `Profile::new`) and merged into a single profile. This simplifies getting a profile, and makes it easier to deal with getting the config values in one place. - I switched profile names to be `InternedString` instead of `String`. There's not a strong reason to do this, other than it seemed a little strange to be creating lots of `String`s. - I also added `PartialEq<str>` for `InternedString`. It has come up a few times in the past, and it seems useful. I'm not sure if it was excluded intentionally? - The validation that the profile exists is now done in one place (`Profiles::new`). - I removed the back-compatibility for the `overrides` key (which was renamed to `package` back in October). Notes: - Some of the error messages aren't as good as before, because they don't tell you where the error is located (`Cargo.toml` or `.cargo/config`). This is because the location data is lost by the time validation is done. Hopefully it will be obvious from the profile name and error message. I tried to improve error messages wherever I could. - There are more calls to `clone()` than I would like, but they are kinda hard to avoid. Should be fewer than before. - I noticed a bug with `-Zpanic-abort-tests` not supporting named profiles. I'll fix that separately. - I think this fixes some bugs where package overrides in config weren't merging properly with package overrides defined in `Cargo.toml`.

view details

Takayuki Nakata

commit sha 8076f578a3108683b600312a9a8bba1276be0f6e

Refactoring of creating files in tests Use `mkdir_p` and `fs::write`.

view details

Takayuki Nakata

commit sha 438d005b2cc49836d41c223ee01f2dbe739224ac

Refactoring to use `Vacant`/`Occupied` instead of remove/insert

view details

Johannes Brechtmann

commit sha f917e169abcc69b8ed7e5c7aa95ad035db08356c

Fix wrong directories in host_libdir. This fixes a regression from #7475 where the sysroot_target_libdir leaks into the host libdir. This can cause problems when the dynamic linker does not ignore the target libraries but tries to load them instead. This happens for example when building on x86_64-musl for aarch64-musl.

view details

bors

commit sha 0a4ec2917698ee067b257b580698d7ffb8ccbe2f

Auto merge of #7774 - giraffate:update_credentials, r=ehuss Load credentials only when needed Credentials are always loaded, even if these are not used. If access to confidential files such as credentials is not given, `cargo build` fails despite not using credentials. Fixes #7624.

view details

Eric Huss

commit sha 90887061b974fdb99641962520c86d75816ac602

Consistently use em-dash in environment documentation page.

view details

Eric Huss

commit sha c622bea91b1f9015d3447b3c1de6d2d0607aebaf

Add and update some doc comments. Just some random things that I felt could use clarification.

view details

bors

commit sha cb9de44655ea325b7607b4044cbaebdb44854702

Auto merge of #7799 - ehuss:consistent-dash, r=alexcrichton Consistently use em-dash in environment documentation page.

view details

Alex Crichton

commit sha 4c665c0ecde88c155c6b69d9ce3f5a59364fefc6

Don't assume iowait always increases on Linux According to [documentation] looks like this value is documented as it can decrease, so let's handle that without overflowing. [documentation]: http://man7.org/linux/man-pages/man5/proc.5.html

view details

bors

commit sha c22380da3215bd45e3ca08dbd7af4f0090d972b0

Auto merge of #7800 - ehuss:random-doc-comments, r=Eh2406 Add and update some doc comments. Just some random things that I felt could use clarification.

view details

bors

commit sha 4e0d2f1a160f1845d0be1a8a69e4e5d122f4eb67

Auto merge of #7803 - alexcrichton:less-overflow, r=Eh2406 Don't assume iowait always increases on Linux According to [documentation] looks like this value is documented as it can decrease, so let's handle that without overflowing. [documentation]: http://man7.org/linux/man-pages/man5/proc.5.html

view details

Matthias Krüger

commit sha a6a395c6909d8417a1b48d4fd3a23e073108da62

fix some clippy warnings

view details

Takayuki Nakata

commit sha 4a1ba1c8e5e37cdbeaa6b02a0fdfa8a168d6ffe2

Support out-dir in build section of Cargo configuration file Fixed #7555.

view details

Eric Huss

commit sha a4dccf9da323fe3a15f0094714783a3e703b5bc4

Fix some erroneous em-dashes in man pages.

view details

bors

commit sha 426fae51f39ebf6c545a2c12f78bc09fbfdb7aa9

Auto merge of #7808 - matthiaskrgr:clippy_v10, r=ehuss fix some clippy warnings

view details

push time in a month

push eventlukaslueg/macro_railroad_wasm

Lukas Lueg

commit sha 1aaa7f5ff38758a645847bbc6afaaeee86edf20b

Fix wasm-opt and bump deps

view details

push time in a month

issue commentrustwasm/wasm-pack

wasm-opt: Exported global cannot be mutable

@surma https://github.com/rust-lang/rust/issues/76404

Urhengulas

comment created time in a month

issue closedLukasKalbertodt/bunt

Just a question

Not an issue, just a question: What's the reason for using this match construct instead of a simple if elseif else. There are no new bindings and the compiler can't help with the patterns...

https://github.com/LukasKalbertodt/bunt/blob/91a65fbb33f7c79d5b63f901c4b2f0106e68393d/macros/src/parse/fmt.rs#L61-L81

closed time in a month

lukaslueg

issue commentLukasKalbertodt/bunt

Just a question

Thanks

lukaslueg

comment created time in a month

issue openedLukasKalbertodt/bunt

Just a question

Not an issue, just a question: What's the reason for using this match construct instead of a simple if elseif else. There are no new bindings and the compiler can't help with the patterns...

https://github.com/LukasKalbertodt/bunt/blob/91a65fbb33f7c79d5b63f901c4b2f0106e68393d/macros/src/parse/fmt.rs#L61-L81

created time in a month

startedlucis-fluxum/bolt-rs

started time in a month

PR closed lukaslueg/built

Expose more names

This combines https://github.com/lukaslueg/built/pull/29 with additional changes requested in the PR; see https://github.com/lukaslueg/built/pull/29#issuecomment-691515897 for why it is separate.

If accepted, #29 becomes obsolete. If #29 is accepted, this should shrink to two commits.

+29 -1

1 comment

2 changed files

chrysn

pr closed time in a month

pull request commentlukaslueg/built

Expose more names

Closing this due to #29, thanks!

chrysn

comment created time in a month

push eventlukaslueg/built

chrysn

commit sha 912d10fe832fb5c729b4d06a788c38c3b4f2e8b3

Expose repository and license from Cargo.toml

view details

chrysn

commit sha 1f54a4e7e765f49dfa3172793755553a766193be

Rustfmt

view details

chrysn

commit sha 5cbcb6c830aff8df6789b9a70137f24777e3e431

Tests for repository and license

view details

chrysn

commit sha e22ce640de675eaeae67094093a1d93369dab931

Enhance error output ... when failing for unexpectedly missing environment variables

view details

lukaslueg

commit sha 4a8b7f656b024607681093b257893a26b6f9fa5a

Merge pull request #29 from chrysn-pull-requests/expose-repository-and-license Expose repository and license from Cargo.toml

view details

push time in a month

PR merged lukaslueg/built

Expose repository and license from Cargo.toml

This is useful for creating lines like "Created by {}, licensed under the terms of {}. Get the source at {}". (For the license terms it might be helpful to get more structured information there and parse the SPDX expression, but that's not enforced so might not be valid, and can just as well be done at runtime.)

+18 -1

6 comments

2 changed files

chrysn

pr closed time in a month

pull request commentlukaslueg/built

Expose repository and license from Cargo.toml

Yes, that's probably right. I'll check Cargo's code regarding when those envvars are actually available. CI is unrelated.

Thanks for the PR

chrysn

comment created time in a month

pull request commentlukaslueg/built

Expose repository and license from Cargo.toml

Instead of envmap.get().expect() you can envmap.get.unwrap_or_default(), which will give an emtpy &'static str in case the environment variable is not defined. This should be fine for our usecase.

chrysn

comment created time in a month

pull request commentlukaslueg/built

Expose repository and license from Cargo.toml

Thanks for the PR! While we are at it, could you add CARGO_CRATE_NAME and CARGO_BIN_NAME? Also, it'd be nice if there was a test, where the manifest is set here and tested here

chrysn

comment created time in a month

issue closedrustwasm/wasm-pack

Bundled wasm-opt fails

wasm-pack 0.9.1 fails to run wasm-opt when building https://github.com/lukaslueg/macro_railroad_wasm

[wasm-validator error in module] unexpected true: Exported global cannot be mutable, on 
global$0
Fatal: error in validating input
Error: failed to execute `wasm-opt`: exited with exit code: 1

wasm-pack was able to run wasm-opt before, I guess the problem was introduced with recent updates of Rust, although I didn't run a regression.

To reproduce, clone the repo and run wasm-pack build --target web

wasm-pack version: 0.9.1 rustc version: 1.46

closed time in 2 months

lukaslueg

issue commentrustwasm/wasm-pack

Bundled wasm-opt fails

aaaaannd it's closed again :-) Thanks for the heads-up

lukaslueg

comment created time in 2 months

created taglukaslueg/macro_railroad

tag0.1.3

A library to generate syntax diagrams for Rust macros.

created time in 2 months

IssuesEvent

issue commentrustwasm/wasm-pack

Bundled wasm-opt fails

Turns out the behavior was introduced with wasm-bindgen >= 0.26.26, which generates the aforementioned mutable global, which causes wasm-opt to puke. According to this comment, mutable globals are now stable and the bundled wasm-opt 90 (and 96) is not up to par.

I reopen this again, as wasm-opt will need to get updated or everybody using wasm-opt as part of wasm-pack who runs into this behavior will have their build broken.

lukaslueg

comment created time in 2 months

push eventlukaslueg/macro_railroad_wasm_demo

Lukas Lueg

commit sha b65be1603eddbb758fdb08540a02a65c4e482b3d

Bump

view details

push time in 2 months

issue commentrust-lang/rust

WASM-blob built by rustc fails in binaryen's validator

Closing this here due to @CryZe comment, which sounds reasonable.

lukaslueg

comment created time in 2 months

issue closedrust-lang/rust

WASM-blob built by rustc fails in binaryen's validator

Building this repo used to work flawlessly using wasm-pack and rustc 1.44.1. The most recent toolchains (rustc 1.46.0, wasm-pack 0.9.1, wasm-opt 96 from binaryen) fail to build as wasm-opt fails to validate the wasm-blob produced by rustc:

[wasm-validator error in module] unexpected true: Exported global cannot be mutable, on 
global$0
Fatal: error in validating input
Error: failed to execute `wasm-opt`: exited with exit code: 1

I've tried wasm-opt version 90 (bundled with wasm-pack) and the more recent version 96, which both fail to validate the wasm-blob. I suspect this is rather a problem with rustc (which went undetected by wasm-opt until recently) than wasm-opt or wasm-pack.

To reproduce: cargo install wasm-pack, clone the repo, execute make or wasm-pack build --target web. The toolchain will build a wasm-blob using wasm-pack, which calls wasm-opt, which fails to validate the wasm-blob.

closed time in 2 months

lukaslueg

push eventlukaslueg/macro_railroad_wasm

Lukas Lueg

commit sha 11f63aef06efd256747c9fa2ff366b6672e96fb2

Fix broken build due to wasm-opt puking

view details

push time in 2 months

issue commentrust-lang/rust

WASM-blob built by rustc fails in binaryen's validator

This behavior appeared in commit 65170f4, which bumped some dependencies in the lockfile; commit 39b4520 builds just fine. The lockfile bump introduces wasi 0.10.0 and bumps wasm-bindgen from 0.2.63 to 0.2.67.

I'm unsure where to report this issue. The regression seem to point towards wasm-bindgen or wasi. However, rustc should never generate a wasm-blob which fails validation (if validation is correct in the first place).

lukaslueg

comment created time in 2 months

issue openedrust-lang/rust

WASM-blob built by rustc fails in binaryen's validator

Building this repo used to work flawlessly using wasm-pack and rustc 1.44.1. The most recent toolchains (rustc 1.46.0, wasm-pack 0.9.1, wasm-opt 96 from binaryen) fail to build as wasm-opt fails to validate the wasm-blob produced by rustc:

[wasm-validator error in module] unexpected true: Exported global cannot be mutable, on 
global$0
Fatal: error in validating input
Error: failed to execute `wasm-opt`: exited with exit code: 1

I've tried wasm-opt version 90 (bundled with wasm-pack) and the more recent version 96, which both fail to validate the wasm-blob. I suspect this is rather a problem with rustc (which went undetected by wasm-opt until recently) than wasm-opt or wasm-pack.

To reproduce: cargo install wasm-pack, clone the repo, execute make or wasm-pack build --target web. The toolchain will build a wasm-blob using wasm-pack, which calls wasm-opt, which fails to validate the wasm-blob.

created time in 2 months

issue closedrustwasm/wasm-pack

Bundled wasm-opt fails

wasm-pack 0.9.1 fails to run wasm-opt when building https://github.com/lukaslueg/macro_railroad_wasm

[wasm-validator error in module] unexpected true: Exported global cannot be mutable, on 
global$0
Fatal: error in validating input
Error: failed to execute `wasm-opt`: exited with exit code: 1

wasm-pack was able to run wasm-opt before, I guess the problem was introduced with recent updates of Rust, although I didn't run a regression.

To reproduce, clone the repo and run wasm-pack build --target web

wasm-pack version: 0.9.1 rustc version: 1.46

closed time in 2 months

lukaslueg

issue commentrustwasm/wasm-pack

Bundled wasm-opt fails

I'm closing this here, as after some more testing I suspect something fishy in rustc itself, which used to not get picked up by the wasm-opt verifier.

lukaslueg

comment created time in 2 months

issue openedrustwasm/wasm-pack

Bundled wasm-opt fails

wasm-pack 0.9.1 fails to run wasm-opt when building https://github.com/lukaslueg/macro_railroad_wasm

[wasm-validator error in module] unexpected true: Exported global cannot be mutable, on 
global$0
Fatal: error in validating input
Error: failed to execute `wasm-opt`: exited with exit code: 1

wasm-pack was able to run wasm-opt before, I guess the problem was introduced with recent updates of Rust, although I didn't run a regression.

To reproduce, clone the repo and run wasm-pack build --target web

wasm-pack version: 0.9.1 rustc version: 1.46

created time in 2 months

push eventlukaslueg/macro_railroad_wasm

lukaslueg

commit sha 52f8db63d41703056568d8dfc2015a9814409b29

Update README.md

view details

push time in 2 months

push eventlukaslueg/macro_railroad_wasm

Lukas Lueg

commit sha 39b4520fd75e3ef7a92fb89cf252083414043ab8

Use python3

view details

Lukas Lueg

commit sha 65170f4d32a1778f26fb640afe25af5dbb23c48a

Bump lockfile

view details

push time in 2 months

push eventlukaslueg/macro_railroad

Lukas Lueg

commit sha b732c8f3157df7ebed0fa0a13d99b9e7342900be

Improve folding of certain elements Namely `std::dbg` would fold poorly

view details

Lukas Lueg

commit sha b5297626b6044decd9039a2dd628b4623152d4c5

Rebuild example-pages

view details

push time in 2 months

pull request commentrust-lang/rust

diagnostics: shorten paths of unique symbols

@da-x Op here, thanks for this :-)

da-x

comment created time in 2 months

created taglukaslueg/built

tag0.4.3

Provides a crate with information from the time it was built.

created time in 2 months

push eventlukaslueg/built

Lukas Lueg

commit sha d34439bff229a2a54dc3cd5ccf3322c82d821740

Bump to 0.4.3

view details

push time in 2 months

pull request commentlukaslueg/built

Emit raw strings for values from the environment

Bumped

tari

comment created time in 2 months

push eventlukaslueg/built

lukaslueg

commit sha 1d579984afd110175a0851b921622d7bdd0d7cc2

Update README.md

view details

push time in 2 months

pull request commentlukaslueg/built

Emit raw strings for values from the environment

Thanks for the PR. Notice I had to force-push over it because I forgot a commit in May......

tari

comment created time in 2 months

push eventlukaslueg/built

Lukas Lueg

commit sha edaa1dbcbc9138863b94cbe8e9132ce76fa936c5

Bump to 0.4.2

view details

Lukas Lueg

commit sha a1e6217f2dc7f3eadd818177cea57ca953c59796

Emit raw strings to fix unescaped strings

view details

push time in 2 months

issue commentlukaslueg/built

Add target-cpu value?

This depends on https://github.com/rust-lang/rust/issues/44036

novacrazy

comment created time in 2 months

PR closed lukaslueg/built

Changes for issue #19

I ended up adding another feature which is the ability to add a suffix to the git version if the directory has any changes.

Please squash all the commits on merge.

+126 -23

12 comments

3 changed files

tylerhawkes

pr closed time in 2 months

pull request commentlukaslueg/built

Changes for issue #19

This is now implemented AFAICS

tylerhawkes

comment created time in 2 months

push eventlukaslueg/built

Peter Marheine

commit sha 3f682dff492557562f1687cc094314ea2b7b351c

Emit raw strings for values from the environment These may contain backslashes, which should not be interpreted as escape sequences.

view details

lukaslueg

commit sha 1f79786a30bbae3badfbdcc914a861d519eb4d1d

Merge pull request #28 from tari/raw-strings Emit raw strings for values from the environment, fixes #27

view details

push time in 2 months

issue closedlukaslueg/built

Paths containing backslashes can cause build failures

For instance on Windows (where this is almost certain to happen):

error: unknown character escape: P
  --> C:\...\out/built.rs:31:29
   |
31 | pub const RUSTC: &str = "C:\ProgramData\chocolatey\bin\rustc.exe";
   |                             ^ unknown character escape

This should be easily fixable by emitting raw strings so backslashes don't get interpreted in the strings that get written out.

closed time in 2 months

tari

PR merged lukaslueg/built

Emit raw strings for values from the environment

Simple fix for #27, though there may be more values that should be emitted raw; this is sufficient to fix the issue I had, however.

+1 -1

1 comment

1 changed file

tari

pr closed time in 2 months

pull request commentlukaslueg/built

Emit raw strings for values from the environment

I think this fix is correct. The reason this has not been reported yet is that RUSTC is simply rustc almost everywhere and resolved via $PATH. Is there an easy way we can test this?

tari

comment created time in 2 months

issue commentlukaslueg/built

Paths containing backslashes can cause build failures

Hmm, I wonder why this is not picked up on AppVeyor, where RUSTC is in "C:\Users\appveyor.cargo\bin"

tari

comment created time in 2 months

more