[RustWebApp] Find binary name from Cargo.toml #105

Open
opened 2025-08-12 00:00:45 +00:00 by letian · 0 comments
Owner

Current behavior

When generating the Dockerfile to build & run a Rust web app, the application name (e.g. rust-webapp) configured by the user is the one used to copy the built binary. Which forces the users to reuse the same app name as the binary name.

Expected behavior

The app name shouldn't be used to find the binary. Instead, an option is to use the Cargo.toml file to extract the project name and use it to find the built binary.

Ref.

"FIXME Should not be using score name here, instead should use name from Cargo.toml"

## Current behavior When generating the Dockerfile to build & run a Rust web app, the application name (e.g. `rust-webapp`) configured by the user is the one used to copy the built binary. Which forces the users to reuse the same app name as the binary name. ## Expected behavior The app name shouldn't be used to find the binary. Instead, an option is to use the `Cargo.toml` file to extract the project name and use it to find the built binary. Ref. https://git.nationtech.io/NationTech/harmony/src/commit/bd214f8fb8b68f8d9730875affe06ead13765113/harmony/src/modules/application/rust.rs#L292
letian added the
Good first issue
label 2025-08-15 20:44:58 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: NationTech/harmony#105
No description provided.