-
Notifications
You must be signed in to change notification settings - Fork 514
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
xtask/Add rustwasm task #1008
xtask/Add rustwasm task #1008
Conversation
I need your help because I think I'm doing something wrong. I get the following error running
Is it related to |
Burn is setup as a workspace, and you're using |
I've used |
env::set_var("RUSTFLAGS", rustflags); | ||
|
||
// Build wasm-pack command | ||
let mut command = Command::new("wasm-pack"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let mut command = Command::new("wasm-pack"); | |
let mut command = Command::new("wasm-pack"); | |
command.current_dir("./examples/image-classification-web"); |
I think adding current_dir
is important, since that in turn sets which Cargo.toml
to use. If you add
let exit = build_command
.spawn()
.unwrap()
.wait()
.unwrap();
log::info!("build's spawn's exit: {}", exit);
to dist
below you'll observe that it runs successfully with exit code 0. Unfortunately, this doesn't solve the larger issue with arg.base.build_command(build_command)
. If you don't set current_dir
, you'll observe that build_command.spawn()
exits with the same error output as arg.base.build_command(build_command)
. This makes me think that arg.base.build_command(build_command)
isn't respecting command.current_dir
.
Grepping xtask-wasm
for current_dir
yields only one hit, so I think it's an upstream problem.
I've reviewed the work in progress and believe it will require additional time to be properly fixed. I'm not sure if you have considered integrating |
My initial idea was to create a script which could be used for all our examples, but more generally, for |
I'll close it for now since the approach will be different a little bit. I'll try to reuse code from it. |
Yes, sorry for giving up this PR, busy times. You can reuse my code without any problem! |
Pull Request Template
Checklist
run-checks all
script has been executed.Related Issues/PRs
Provide links to relevant issues and dependent PRs.
Changes
This PR fixes #851
Testing
Describe how these changes have been tested.