inda19plusplus / logik

Logisim clone
MIT License
2 stars 5 forks source link

Rust toolchain #28

Closed default-username-852 closed 4 years ago

default-username-852 commented 4 years ago

Project can't be built using x86_64-pc-windows-gnu as the toolchain for rust.

NogginBops commented 4 years ago

This is probably because msbuild is not correctly setup to copy the correct rust dll to the c# executable folder. What happens when you try to build?

default-username-852 commented 4 years ago

I think this is the relevant part of the output log.

Cargo:
         cargo  build --target x86_64-pc-windows-msvc
            Compiling logik_simulation v0.1.0 (D:\Users\Eskil\Rust\logik\native\logik_simulation)
         error[E0463]: can't find crate for `std`
           |
           = note: the `x86_64-pc-windows-msvc` target may not be installed

     1>EXEC : error : aborting due to previous error

         For more information about this error, try `rustc --explain E0463`.
     1>EXEC : error : could not compile `logik_simulation`.

         To learn more, run the command again with --verbose.
     1>D:\Users\Eskil\Rust\logik\src\Native.targets(81,9): error MSB3073: The command "cargo  build --target x86_64-pc-windows-msvc" exited with code 101.
     1>Done Building Project "D:\Users\Eskil\Rust\logik\src\LogikUI\LogikUI.csproj" (build target(s)) -- FAILED.

When I change the target atribute to x86_64-pc-windows-gnu it builds just fine though. Is the --target really needed in this case?

NogginBops commented 4 years ago

I see what's happening, the reason we need the --target flag is so that linux and macos builds work correctly. For correct c interop I think we should just stick to one toolchain (msvc), and also because that is the default toolchain for rust on windows (and recommended by rust).