summaryrefslogtreecommitdiff
path: root/community/gsoc/project_ideas/rust.mdwn
blob: 868a7afd3639f004d76f402d5073977a86e3de43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[[!meta copyright="Copyright © 2023 Free Software Foundation, Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

[[!meta title="Porting Rust"]]

The goal of this project is to make the [Rust
language](https://www.rust-lang.org/) available on GNU/Hurd.

Presumably less work will be needed on the language's frontend itself, but
rather on the supporting libraries.


The Rust language is being used more and more widely, and notably in
rather fundamental libraries such as librsvg or python-cryptography. It
is thus more and more pressing for GNU/Hurd to have a compiler for Rust.

The Rust compiler itself is quite portable, but its runtime library, libstd,
needs to be ported to the GNU/Hurd system. This essentially consists in telling
Rust how the standard C library functions can be called.

An example of the main part of such port can be seen for the [VxWorks
port](https://github.com/rust-lang/libc/blob/master/src/vxworks/mod.rs)

The bulk of such a file can be mostly generated from the libc C
headers thanks to the bindgen tool, it then needs to be cleaned up and
integrated into the Rust build infrastructure, some preliminary work had
already been investigated in that part.

A good level of C programming will be welcome to understand the
questions of ABI and the libc C functions being bound.

Knowing the Rust language is not required: it can be learnt along the
way, this can be a good occasion.

Possible mentors: [[Samuel Thibault (youpi)|samuelthibault]]

Exercise: Building the Debian rustc package on Debian GNU/Linux.
Building some Debian package (not rustc) on Debian GNU/Hurd.

[Rust language](https://www.rust-lang.org/)

[How to build and run Rust](https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html)

---

[[Open Issue page|open_issues/gccgo]].  [Entry in the GCC
wiki](http://gcc.gnu.org/wiki/SummerOfCode#gccgo_hurd).