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

Add Rust language support #4536

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add Rust language support #4536

wants to merge 1 commit into from

Conversation

heaths
Copy link
Member

@heaths heaths commented Nov 10, 2024

Resolves #423

@heaths
Copy link
Member Author

heaths commented Nov 10, 2024

This initial draft adds only language detection support but I wanted to push a "safety commit". We have some partners working on Rust projects so first-class support in azd would be nice.

@weikanglim
Copy link
Contributor

weikanglim commented Nov 15, 2024

@heaths Really appreciate the PR here! I'm really happy with the direction here, so we'll continue to move forwards in this direction.

My Rust knowledge is circa 2022, and admittedly I didn't explore the build system, mostly language, so just some basic questions of the toolchain right now:

  1. Does cargo.toml have a workspace correspondence?
  2. For multiple binary crates, would each crate have a cargo.toml?

I'd also like take this opportunity to solicit any immediate feedback/concerns you may have around the current appdetect library in terms of Rust support -- just happy to hear any perspectives you have here.

@heaths
Copy link
Member Author

heaths commented Nov 20, 2024

Rust is case-sensitive, so Cargo.toml and, yes, you can have a workspace declare in one. See https://github.comAzure/azure-sdk-for-rust's root Cargo.toml for an example. You can also declare a crate and a workspace in a single one. See https://github.com/heaths/recorded-tests for an example.

Yes, each crate will have a Cargo.toml. As far as packaging goes, cargo - Rust's de facto toolchain - is akin to Node's npm. But as far as build and test go, dotnet is a better comparison. Thus, I'm sort of cribbing off JS's and .NET's code in azd as a blueprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scenario "Rust dev": As a Rust dev, I want to dev Rust apps with azd
2 participants