Skip to content

build: Add Rust#84

Closed
cgwalters wants to merge 1 commit into
coreos:masterfrom
cgwalters:add-rust
Closed

build: Add Rust#84
cgwalters wants to merge 1 commit into
coreos:masterfrom
cgwalters:add-rust

Conversation

@cgwalters
Copy link
Copy Markdown
Member

So far we have lots of shell script, some Python, Go from mantle...
clearly, we need to add Rust!

More seriously so...I like the language, I am not excited about
writing more dynamically typed and slow shell script/Python.

There's a definite argument for Go, since we could share code
with Mantle. I personally like Rust a lot though...but
this is an RFE to see how people feel.

My vision for this was that we could start implementing some of
the VM installation work in it, along with defining Serde
structs for the metadata, etc.

So far we have lots of shell script, some Python, Go from mantle...
clearly, we need to add Rust!

More seriously so...I like the language, I am not excited about
writing more dynamically typed and slow shell script/Python.

There's a definite argument for Go, since we could share code
with Mantle.  I personally like Rust a lot though...but
this is an RFE to see how people feel.

My vision for this was that we could start implementing some of
the VM installation work in it, along with defining Serde
structs for the metadata, etc.
@dustymabe
Copy link
Copy Markdown
Member

I honestly don't know. but it seems like we are going to make things real soupy real fast unless we strategize together on what we want to do with this thing.

My personal preference is being able to hack on it dynamically which makes python a good choice. I'm not worried about the "slowness" of python since I don't think it really makes a difference for this application.

@jlebon
Copy link
Copy Markdown
Member

jlebon commented Sep 14, 2018

I'm a bit conflicted. Rust is awesome, but I'm more worried about potentially making it harder for others to contribute than making the build scripts faster (we're blocked on I/O from whatever we're spawning 99% of the time anyway). I agree we should move away from shell scripts though. So I guess I'm leaning more towards Python or Go?

@cgwalters
Copy link
Copy Markdown
Member Author

cgwalters commented Sep 14, 2018

OK, will leave it open a bit for any other votes. In the end it doesn't have to be exclusive.

One reason I had in mind to choose Rust or Go in particular is that the statically linked binary approach is easier to copy over into VMs we generate.

@cgwalters
Copy link
Copy Markdown
Member Author

The intersection of the comments so far leans towards Python. I guess if no one else has any comments by e.g. tomorrow we'll go that way and close this PR.

@jlebon
Copy link
Copy Markdown
Member

jlebon commented Sep 17, 2018

It's not exactly the same, though I'd be interested to hear from folks familiar with cork/plume re. writing this type of "glue code" in Python vs Go.

@cgwalters
Copy link
Copy Markdown
Member Author

The main thing I dislike about Go for this is that for 99% of "build system code" like this, one simply wants to immediately exit on error. Throwing an exception is fine. The Go error handling is very verbosely annoying for this - notably worse than Python's exceptions or Rust's ? operator.

@dustymabe
Copy link
Copy Markdown
Member

cc @ajeddeloh @dm0- @bgilbert - any input?

@dm0-
Copy link
Copy Markdown
Contributor

dm0- commented Sep 17, 2018

I'd like to see Rust work here, but if the priority is making it accessible to more contributors and easier for casual hacking, Python is probably the best choice.

@bgilbert
Copy link
Copy Markdown
Contributor

Yeah, for accessibility I'd prefer to see Python or Go.

@cgwalters cgwalters closed this Sep 18, 2018
@lucab
Copy link
Copy Markdown
Contributor

lucab commented Sep 19, 2018

I was away, thus I totally missed this and asked the exact same question today.

As @glevand highlighted, once we reach the size of coreos/scripts (~5k LoC of sh, quickly counted) refactoring and ongoing maintenance is a concern. I'd prefer something with static typing for that. If Rust is an entry-barrier, then I'd stick with Go.

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.

6 participants