Git Product home page Git Product logo

Comments (10)

pacak avatar pacak commented on June 2, 2024 1

I pushed a rustc branch that does the right thing for Linux. can you check if it does the right thing for Windows?

from cargo-show-asm.

pacak avatar pacak commented on June 2, 2024

What platform are you on, what are the versions of rustc/cargo-show-asm? Do you have a small example?

from cargo-show-asm.

Jarcho avatar Jarcho commented on June 2, 2024

Rustc sources being under /lib/rustlib/rustc-src has been the case since the rustc-dev package has included them (at least 2021).

Checked on both linux and windows with cargo-show-asm 0.2.26

Anything that references rustc sources will cause the problem.

extern crate rustc_span;

pub fn f(x: rustc_span::Span) -> rustc_span::SyntaxContext {
    x.ctxt()
}

from cargo-show-asm.

pacak avatar pacak commented on June 2, 2024

I see, I don't think I'm doing anything yet to support rustc sources themselves. Can you make a minimal crate/command for me to run? My attempts at just adding what you posted into lib.rs are not successful.

from cargo-show-asm.

Jarcho avatar Jarcho commented on June 2, 2024

Sorry, forgot to add #![feature(rustc_private)] to the top. Needs a nightly compiler.

from cargo-show-asm.

pacak avatar pacak commented on June 2, 2024

I'm still having this error when I run cargo +nightly asm --manifest-path sample/Cargo.toml --rust even after rustup component add rust-src rustc-dev llvm-tools-preview

error[E0463]: can't find crate for `rustc_span`
 --> src/lib.rs:3:1
  |
3 | extern crate rustc_span;
  | ^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
  |
  = help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview`

from cargo-show-asm.

Jarcho avatar Jarcho commented on June 2, 2024

You should just need rustc-dev installed to compile. Did you install it to the nightly toolchain? rustup component add only affects the default toolchain.

from cargo-show-asm.

Jarcho avatar Jarcho commented on June 2, 2024

Seems to work on both 2021-01-01 and 2024-01-11.

Tried on 2020-01-01 where the directory structure is different, but it looks like something that old just isn't supported at all. Prints Cargo failed with exit code: 0 with just cargo +nightly-2020-01-01 asm.

from cargo-show-asm.

pacak avatar pacak commented on June 2, 2024

Awesome. I don't think 2020 nightly is worth supporting. Will make a release soon-ish.

from cargo-show-asm.

Jarcho avatar Jarcho commented on June 2, 2024

I don't think 2020 nightly is worth supporting.

Probably not.

Thanks for being quick.

from cargo-show-asm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.