๐ Error compiling simple rust project: multiple input filenames provided
See original GitHub issue๐ bug report
๐ Configuration (.babelrc, package.json, cli command)
package.json
{
"name": "rust-wasm",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "MIT",
"dependencies": {
"parcel-bundler": "^1.5.1"
}
}
Run parcel index.js
๐ค Expected Behavior
Should compile
๐ฏ Current Behavior
Console output:
Server running at http://localhost:1234
๐จ /Users/rob/Development/testing/web/rust-wasm/ops.rs: Command failed: rustc +nightly --target wasm32-unknown-unknown -O --crate-type=cdylib /Users/rob/Development/testing/web/rust-wasm/ops.rs -o /Users/rob/Development/testing/web/rust-wasm/.cache/933d122f8546a30c5660c45821247fad.wasm
error: multiple input filenames provided
error: multiple input filenames provided
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:554:12)
๐ฆ Context
Just a simple test of Rust support
๐ป Code Sample
index.js
import { add } from './ops.rs'
console.log(add(4, 6))
ops.rs
#[no_mangle]
pub fn add(a: i32, b: i32) -> i32 {
return a + b
}
๐ Your Environment
Software | Version(s) |
---|---|
Parcel | 1.5.1 |
Node | v8.9.3 |
npm/Yarn | npm 5.5.1 |
Operating System | macOS 10.13.4 beta (17E139j) |
Rust | nightly-x86_64-apple-darwin unchanged - rustc 1.25.0-nightly (90eb44a58 2018-01-29) |
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Clippy: "error: multiple input filenames provided" - help
I'm trying to use Clippy for the first time in order to improve my code. I am using the latest nightly build nightly-x86_64-unknown-linux-gnu...
Read more >Rust: Structuring and handling errors in 2020 - Nick Groenen
In this example the file name is an input argument for the program itself. This makes it easy to correlate the error to...
Read more >mail-client/thunderbird-68.2.1 - src_configure(): rustup which ...
Unable to compile thunderbird due to absent 'rustup'. There is no ebuild available to install rustup in main portage tree and looks likeย ......
Read more >Clang linking error MacOS Big Sur | Apple Developer Forums
Below a verbose screenshot of my build error message. ... -discard-value-names -main-file-name helloworld.cpp -mrelocation-model pic -pic-level 2 ...
Read more >Writing R Extensions - The Comprehensive R Archive Network
8.1.1 Compiling against the R library; 8.1.2 Setting R callbacks ... If the intention is to give an error if the suggested package...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay, so it turns out that rustc installed via homebrew doesnโt respect the
+nightly
modifier. That coupled with rustup being used to install toolchains and such results in the case where the toolchains are installed to the~/.cargo
installation but parcel tries to use (rightly) the first occurence ofrustc
in the PATH; which in this case was the homebrew version.TL;DR: uninstalled homebrew version. it works now.
ooh right, so but you could try, setting nightly as default and without the flag