Skip to content

Commit 0101e01

Browse files
committed
Merge remote-tracking branch 'Amanieu/project-asm'
2 parents 3cdeb57 + eaaead5 commit 0101e01

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

text/0000-project-asm.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
- Feature Name: `project-inline-asm`
2+
- Start Date: 2019-12-07
3+
- RFC PR: [rust-lang/rfcs#0000](https://github.com/rust-lang/rfcs/pull/0000)
4+
- Rust Issue: [rust-lang/rust#0000](https://github.com/rust-lang/rust/issues/0000)
5+
6+
# Summary
7+
[summary]: #summary
8+
9+
To create a [project group] with the purpose of designing subsequent RFCs to extend the language to support inline assembly in Rust code.
10+
11+
# Motivation
12+
[motivation]: #motivation
13+
14+
In systems programming some tasks require dropping down to the assembly level. The primary reasons are for performance, precise timing, and low level hardware access. Using inline assembly for this is sometimes convenient, and sometimes necessary to avoid function call overhead.
15+
16+
The inline assembler syntax currently available in nightly Rust is very ad-hoc. It provides a thin wrapper over the inline assembly syntax available in LLVM IR. For stabilization a more user-friendly syntax that lends itself to implementation across various backends is preferable.
17+
18+
# Project group details
19+
20+
[Repository][asm project]
21+
22+
[Zulip stream][zulip]
23+
24+
Initial shepherds:
25+
26+
* [Amanieu (Amanieu d'Antras)](https://github.com/Amanieu)
27+
28+
Lang team liaisons:
29+
30+
* [joshtriplett (Josh Triplett)](https://github.com/joshtriplett)
31+
32+
# Charter
33+
[charter]: #charter
34+
35+
The main goal of the asm project group is to design and implement an `asm!` macro using a syntax that we feel we can maintain, easily write, and stabilize.
36+
37+
The project group has the following additional goals:
38+
* to provide a transition path for existing users of the unstable `asm!` macro.
39+
* to ensure that the chosen `asm!` syntax is portable to different compiler backends such as LLVM, GCC, etc.
40+
* to provide a fallback implementation on compiler backends that do not support inline assembly natively (e.g. [Cranelift][cranelift]).
41+
* to initially support most major architectures (x86, ARM, RISC-V) with the intention of extending to other architectures in the future.
42+
43+
With a lower priority, the project group also intends to tackle the following secondary, future goals:
44+
* support for module-level assembly (`global_asm!`).
45+
* support for naked functions (`#[naked]`).
46+
47+
[asm project]: https://github.com/rust-lang/project-inline-asm
48+
[zulip]: https://rust-lang.zulipchat.com/#narrow/stream/216763-project-inline-asm
49+
[cranelift]: https://github.com/CraneStation/cranelift/issues/444
50+
[project group]: https://github.com/rust-lang/wg-governance/blob/master/draft-rfcs/working-group-terminology.md

0 commit comments

Comments
 (0)