From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Adding support for the Rust programming language
Date: Tue, 12 Apr 2016 22:22:14 +0200 [thread overview]
Message-ID: <570D58F6.3040909@mind.be> (raw)
In-Reply-To: <20160411210358.7e7a8b4c@itchy>
On 04/11/16 21:03, Eric Le Bihan wrote:
> On Sun, 10 Apr 2016 17:57:45 +0200,
> Arnout Vandecappelle <arnout@mind.be> wrote :
>
>>> 1. Would it be acceptable to provide a script to generate these
>>> files from the Buildroot configuration file?
>>
>> Obviously yes, we already do that kind of thing for some packages
>> (e.g. cmake).
>
> So, assuming the script is to be named `rust-target-gen`, it should be
> stored in support/scripts, right?
It's only going to be used by the rust package itself, right? Not by any other
package that happens to be written in rust? In that case, I'd put the script in
the package/rust directory.
>
>>> 2. Would Python be a suitable language for this script? It is better
>>> suited for playing with complex structures and JSON than pure
>>> shell.
>>
>> We try to avoid requiring python for a normal build, and use it
>> only for specific scripts at the moment (like graph-depends). So I
>> think the answer is no here. Anyway, as far as I can see from [3],
>> you don't really need a full json generator, it should be enough to
>> do some sed magic on a template file.
>
> Correct. The target specification file is not a complex JSON file.
> So I'll go for a Bash shell script (compatible with Bash 3.2, i.e. no
> use of associative arrays).
>
> Anyway, there will be a need for building host-python, in order to
> build Cargo, the official Rust package manager, as stated in [1].
In that case, by all means use a python script that relies on host-python.
Just make sure it runs on python3 as well.
>
>> When you submit patches, it's probably a good idea to start with a
>> minimal patch that e.g. gives rust a hard dependency on little-endian
>> ARM v6, and add more features in subsequent patches. I expect it will
>> be something difficult to review.
>
> This looks sensible. I intend to provide the following patches:
>
> - one to add the package "host-rust" (compiler)
> - one to add the package "host-cargo" (package manager)
> - one to add "package/pkg-cargo.mk" (Rust package infrastructure)
Don't add the package infrastructure unless you have at least one package that
uses it, so we understand how it works.
Also, I repeat: if supporting all possible arches/endianness/fp/...
combinations makes it complicated, start out with a limited set of supported
arch/... combinations and add others in later patches.
Regards,
Arnout
>
> Thanks for your suggestions.
>
> [1] http://www.elebihan.com/posts/using-cargo-with-buildroot-full-build.html
>
> --
> ELB
>
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
prev parent reply other threads:[~2016-04-12 20:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 20:45 [Buildroot] Adding support for the Rust programming language Eric Le Bihan
2016-04-10 15:57 ` Arnout Vandecappelle
2016-04-11 8:32 ` Thomas Petazzoni
2016-04-11 9:12 ` Arnout Vandecappelle
2016-04-11 9:13 ` Arnout Vandecappelle
2016-04-11 9:31 ` Thomas Petazzoni
2016-04-11 9:15 ` Baruch Siach
2016-04-11 9:29 ` Arnout Vandecappelle
2016-04-11 11:42 ` Thomas De Schampheleire
2016-04-11 19:03 ` Eric Le Bihan
2016-04-12 20:22 ` Arnout Vandecappelle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=570D58F6.3040909@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox