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

Alire crate #5

Closed
reznikmm opened this issue Jun 13, 2024 · 3 comments
Closed

Alire crate #5

reznikmm opened this issue Jun 13, 2024 · 3 comments

Comments

@reznikmm
Copy link
Contributor

What do you think about having ada-enet as a crate (or two crates) in Alire? Does it worth spending time?

I mean we split the code into a target independent part and stm32 dependent driver. I guess we can have a target independent crate rather easily. I can send a PR if you want. It won't break current configure scripts. By having an independent part, people will be able to write drivers for specific hardware.

Wrapping stm32 driver as a crate is harder, because it depends on STM32 packages and no crate provides these packages right now. I did an experiment with next approach:

  • I've made a enet_stm32 crate that depends on "virtual" stm32 crate and has with "stm32.gpr"; clause in the project file.
  • a board (in my case stm32f4xx_m) has provides = ["stm32=1.0"] in alire.toml. It provides stm32.gpr project with a copy of Ada_Drivers_Library for STM32 and STM32_SVD packages.
  • an application crate uses enet, enet_stm32, stm32f4xx_m crates and configures network device as needed.
@stcarrez
Copy link
Owner

It's fine for me, and yes, it would be nice to have a crate instead of the configure stuff which was there to cope with some configuration issues.

It is not clear for me how the Ada_Drivers_Library is still usable in the Alire environment and how.

By the way, I didn't know there was such provides thing in Alire :-)

Ready to spend time with you (in my little spare time) if you want...

@reznikmm
Copy link
Contributor Author

I've pushed PR for enet 1.0.0 to alire index:

alire-project/alire-index#1120

It points to commit 5441088

@reznikmm
Copy link
Contributor Author

The PR was merged!

Also I would like to note that I have got

I think they will be separated crates.

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

No branches or pull requests

2 participants