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 basic developer environment #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vsoch
Copy link
Member

@vsoch vsoch commented Jun 4, 2023

This will add a basic README.md and developer environment for VSCode, to mirror the same in https://github.com/flux-framework/flux-depend/. I think I'd like to transform this repository into a "How to rust bindings" akin to the others we have:

Which means the examples we can provide next here will be for simple functionality like submit, etc. It's Sunday so I won't ping folks, but I want to ask generally the best way to prototype deeper integrations with Flux. For example, if I want to test a flow of having a user submitting a job and bursting to a cloud, or bursting to a Kubernetes cluster and using Kueue to enforce namespaces, what are approaches for doing that? TLDR I want to be empowered to do experiments with Flux.

@vsoch
Copy link
Member Author

vsoch commented Jun 4, 2023

I might refactor the tests a bit - we should definitely test in flux bases but the hairball of CI scripts and containers I think could be improved to just simply running the tests in a base with Flux. Will test out some stuffs soon.

@trws
Copy link
Member

trws commented Jun 5, 2023

Oh wow, error-chain is a blast from the past... This should probably be swapped to using the std::error trait and maybe anyhow now to get rid of some of that. Dangers of trying things while the ecosystem is still developing I suppose.

@vsoch
Copy link
Member Author

vsoch commented Jun 5, 2023

Dangers of trying things while the ecosystem is still developing I suppose.

austin-danger-powers

@vsoch
Copy link
Member Author

vsoch commented Jun 5, 2023

I'm going to do some rust learning this week so (hopefully) I can come back here and contribute meaningfully. Apologies for the delay, but thank you for the opportunity to work on this (I've been dying to find an excuse to dig into Rust!).

@trws
Copy link
Member

trws commented Jun 5, 2023

Sounds like a good plan. In case you're looking for resources, I'm particularly fond of:

  • learning rust with entirely too many linked lists, learning the borrow checker by making the least statically checkable datastructure imaginable, a doubly linked list. Also, this one cracks me up all over the place, for example "No, DList, it can't be! I thought you died in that tragic garbage collection incident! The one which was definitely an accident and not intentional at all!" - unsafe doubly linked list section
  • This article on error handling in rust that uses the descendants of error-chain along with std::Error to get around some of the old problems.
  • Of course the rust book is good, but since this deals with bindings pretty heavily, the Rustonomicon is a pretty good source of info on the various dark arts required to interact with the unsafe.

@vsoch
Copy link
Member Author

vsoch commented Jun 5, 2023

Thank you!

@trws
Copy link
Member

trws commented Jun 7, 2023

This all looks good, any idea what's up with CI? I glanced at it and it's like it can't connect to crates.io for some reason.

@trws
Copy link
Member

trws commented Jun 7, 2023

Oh, also, any chance you'd add this over at the flux-sys-rs repo as well? There's likely to be a lot less dev over there, but that's where the actual binding generation is meant to happen.

@vsoch
Copy link
Member Author

vsoch commented Jun 7, 2023

Should I start over there if that's a dependency here? To be frank I just didn't know it existed. 😆

@trws
Copy link
Member

trws commented Jun 8, 2023

It's a very minimal repo, just there for the classic rust style <crate>/<crate>-sys split where the former is the rustic wrappers and higher-level API and the -sys crate is the low-level bindgen setup and so-forth. It might be easier to start there since there are less deps, but it has very little in it.

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.

2 participants