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

Windows support for forge #216

Closed
ghost opened this issue Dec 12, 2021 · 4 comments
Closed

Windows support for forge #216

ghost opened this issue Dec 12, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 12, 2021

Do you have plan to suport windows for forge? Thanks, this is the error message I got while trying to install forge.

   Compiling svm-rs v0.2.0
error[E0433]: failed to resolve: could not find `unix` in `os`
 --> C:\Users\<user>\.cargo\registry\src\github.com-1ecc6299db9ec823\svm-rs-0.2.0\src/lib.rs:9:9
  |
9 |     os::unix::fs::PermissionsExt,
  |         ^^^^ could not find `unix` in `os`

error[E0599]: no function or associated item named `from_mode` found for struct `Permissions` in the current scope
   --> C:\Users\<user>\.cargo\registry\src\github.com-1ecc6299db9ec823\svm-rs-0.2.0\src/lib.rs:136:40
    |
136 |         f.set_permissions(Permissions::from_mode(0o777))?;
    |                                        ^^^^^^^^^ function or associated item not found in `Permissions`

Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `svm-rs` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `foundry-cli v0.1.0 (https://github.com/gakonst/foundry#36356823)`, intermediate artifacts can be found at `C:\Users\<user>\AppData\Local\Temp\cargo-install4uzvr9`

rust environment info:

installed toolchains
--------------------

stable-x86_64-pc-windows-gnu (default)

installed targets for active toolchain
--------------------------------------

x86_64-pc-windows-gnu

active toolchain
----------------

stable-x86_64-pc-windows-gnu (default)
rustc 1.57.0 (f1edd0429 2021-11-29)
@gakonst
Copy link
Member

gakonst commented Dec 12, 2021

Yes, 100%. We're on it alloy-rs/svm-rs#9

@ghost
Copy link
Author

ghost commented Dec 13, 2021

super, thanks a lot mate :) Cannot wait to work with faster tool.

@gakonst
Copy link
Member

gakonst commented Dec 20, 2021

Hey @rhacker can you give this another try on master? It should be working now. Closing optimistically.

@gakonst gakonst closed this as completed Dec 20, 2021
@ghost
Copy link
Author

ghost commented Dec 21, 2021

@gakonst it works perfectly with windows-msvc toolchain 👍

For windows-gnu, there is a minor problem from ethers-contract-derive package, I think it's more related to the windows OS itself

export ordinal too large: 102125
collect2.exe: error: ld returned 1 exit status
error: could not compile `ethers-contract-derive` due to previous error

This can be fixed by overiding default build in Cargo.toml:

[profile.release.build-override]
opt-level = 3
codegen-units=1

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

1 participant