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

build.rs doesn't work #1159

Open
kvinwang opened this issue Jun 13, 2023 · 1 comment
Open

build.rs doesn't work #1159

kvinwang opened this issue Jun 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@kvinwang
Copy link
Contributor

kvinwang commented Jun 13, 2023

When I simply put a build.rs along side the Cargo.toml, the cargo contract build didn't run it before compiling the source.

It get invoked when I add build = "build.rs" into the Cargo.toml but with an error:

error: failed to run custom build command for `lego v0.1.0 (/tmp/cargo-contract_xs9Qmm)`

Caused by:
  process didn't exit successfully: `[...]/lego-7c2aff32be609fea/build-script-build` (exit status: 101)
  --- stderr
  sh: 1: cd: can't cd to /tmp/cargo-contract_xs9Qmm/js

Click here for the complete build.rs.

Finally, I got it work with this workaround.

@ascjones ascjones added the bug Something isn't working label Jun 13, 2023
@ascjones
Copy link
Collaborator

See #1077 for why it works with an explicit build.rs file in the manifest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants