#Building A rust App Not Working

1 messages · Page 1 of 1 (latest)

opal sorrel
#

Hi Everyone,
I'm trying out dagger to build a rust app, using the dagger go sdk, i've attached my go code along with my directory structure.
in general when we build a rust app using cargo build, a directory named target gets created at the same level as the src folder which in turn contains the compiled executables, but when running things with dagger, nothing of this sort happens basically no target directory gets created. Where am i going wrong? How can this be fixed.
Thanks

fading stratus
#

I haven't tested it, but I think you have to do something like that:

b = b.Exec(dagger.ContainerExecOpts{
        Args: []string{"cargo", "build"},
    })

to reassign b with the result of the execution

opal sorrel
#

@fading stratus thanks, that was the problem, can you point me in the direction of doing a multi stage build