Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Rust extras #28

Closed
dten opened this issue Jan 23, 2018 · 23 comments
Closed

Request: Rust extras #28

dten opened this issue Jan 23, 2018 · 23 comments

Comments

@dten
Copy link

dten commented Jan 23, 2018

Via rustup you can normally install extra things like rls or targets such as wasm32-unknown-unknown
What's the chances of having some of those available :)?

@its-pointless
Copy link
Owner

i have no idea ...
But can you get rls via cargo?

@dten
Copy link
Author

dten commented Jan 23, 2018

Sadly I don't think so. It's one of those bits that's tied heavily to a version of the compiler, so they distribute them together.

@its-pointless
Copy link
Owner

you are right, trying to find a command that will make it build ...

@its-pointless
Copy link
Owner

okay added extended = true to config.toml
lets see what happens...

@dten
Copy link
Author

dten commented Jan 24, 2018

Exciting 😊

@its-pointless
Copy link
Owner

Couldn't get it to work unfortunately.

@dten
Copy link
Author

dten commented Jan 25, 2018

Thanks for trying

@its-pointless
Copy link
Owner

I can actually build rls. I just can't get it scripted right...

@dten
Copy link
Author

dten commented Feb 1, 2018

how did you build it... i tried to use the docker images that build everything myself but got stuck on binaryen (to_string is missing in ndk), made some changes to fix that and got stuck on openssl (didn't like -mandroid)

@its-pointless
Copy link
Owner

i will update or actually post a rust enabled branch. Could you test rls and wasm32 are working properly?

@dten
Copy link
Author

dten commented Feb 1, 2018

yea of course

@dten
Copy link
Author

dten commented Feb 5, 2018

i have neovim with an lsp plugin alive. The client seems to chat to the server for a little while but nothing obviously works. I set this in the server log but not sure what to do about that.

~/repos/proj $ cat $TMP/LanguageServer.log 

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 32, message: "Broken pipe" } }', /home/builder/.termux-build/rustc/src/src/libcore/result.rs:906:4
stack backtrace:
   0: rust_metadata_std_97dcb3fe0e0c8e5f7a62808cf0c7ae89
   1: rust_metadata_std_97dcb3fe0e0c8e5f7a62808cf0c7ae89
   2: rust_metadata_std_97dcb3fe0e0c8e5f7a62808cf0c7ae89
   3: rust_metadata_std_97dcb3fe0e0c8e5f7a62808cf0c7ae89
   4: std::panicking::rust_panic_with_hook
   5: rust_metadata_std_97dcb3fe0e0c8e5f7a62808cf0c7ae89
   6: std::panicking::begin_panic_fmt
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: __rust_maybe_catch_panic
  15: std::rt::lang_start
  16: <unknown>
  17: __libc_init
  18: <unknown>

@its-pointless
Copy link
Owner

Which arch are you using?

@dten
Copy link
Author

dten commented Feb 6, 2018

aarch64

@dten
Copy link
Author

dten commented Feb 10, 2018

Any news? Also are you looking at the wasm32 bit :)?

@its-pointless
Copy link
Owner

its-pointless commented Feb 10, 2018

yeah i got llvm compilied with wasm32
don't if it works or not

@dten
Copy link
Author

dten commented Mar 7, 2018

Any luck :)? Wish I knew how to help...

@its-pointless
Copy link
Owner

its-pointless commented Mar 9, 2018

there are 2 ways to get wasm the emscription method and this rust-lang/rust#45905
the later should probably work for all versions of rust i have available. Maybe... i haven't tested it.
rls and rustfmt are available.

@dten
Copy link
Author

dten commented Mar 9, 2018

Well it let me try! Looks like it's not got everything installed it needs.

~/repos $ USER=david cargo new wasm32-test
     Created library `wasm32-test` project
~/repos $ cd wasm32-test/
  …3 ↑ ~/repos/wasm32-test $ cargo build --target wasm32-unknown-unknown
   Compiling wasm32-test v0.1.0 (file:///data/data/com.termux/files/home/repos/wasm32-test)
error[E0463]: can't find crate for `std`
  |
  = note: the `wasm32-unknown-unknown` target may not be installed

error: aborting due to previous error

error: Could not compile `wasm32-test`.

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

Pretty certain there extra std targets should go in this directory according to https://github.com/japaric/rust-cross/blob/master/README.md#installing-the-cross-compiled-standard-crates

…3 ↑ ~/repos/wasm32-test $ tree -d "$(rustc --print sysroot)/lib/rustlib"
/data/data/com.termux/files/usr/lib/rustlib
├── aarch64-linux-android
│   ├── analysis
│   └── lib
└── etc

@its-pointless
Copy link
Owner

This turned up on my todo list today. Std is built error now is
error: Could not create LLVM TargetMachine for triple: wasm32-unknown-unknown-wasm: No available targets are compatible with this triple.
I don't have enough time to deal with this much as its a moving target that takes a while to compile...

@dten
Copy link
Author

dten commented Mar 27, 2018

That doesn't look like a triple, agree it's a moving target though ☹️ thanks for trying

@its-pointless
Copy link
Owner

Wasm working in updated nightlys

@dten
Copy link
Author

dten commented Apr 2, 2018

Got something building! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants