Skip to content

The build command failed! Customizable build? #566

Description

@jpolstre

The command that generates rinf for building is something like this:

rustup run stable cargo build --manifest-path "...native\hub\Cargo.toml" -p "hub" --target "x86_64-linux-android" --target-dir "...appTest\build\rinf/build"

But this one fails!

I need a customizable build command. In my particular case, this command works:

cargo ndk --bindgen -t x86_64-linux-android -o "...appTest\build\rinf/build" build

Could I add configuration options to initializeRust or something similar?

Maybe something like this:

await initializeRust(
    assignRustSignal,
    config: Config(
      //... other settings
      customBuildCommand: //optional, if not found it follows its normal course
          Platform.isAndroid
              ? (
                BuildEnvironment environment,
                Target target,
                Map<String, String> buildEnvironment,
              ) =>
              //expose runCommand
              runCommand('cargo ndk', [
                '--bindgen',
                '-t',
                target.rust,
                '-o',
                environment.targetTempDir,
                'build',
                 if (!environment.configuration.isDebug) '--release',
              ], environment: buildEnvironment)
              : null,
    ),
  );

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions