OLD | NEW |
---|---|
(Empty) | |
1 .. _ideas: | |
2 | |
3 ================= | |
4 Contributor Ideas | |
5 ================= | |
Sam Clegg
2015/02/12 18:18:50
The convention seems to be to use ##### for the ma
JF
2015/02/12 19:38:25
Done.
| |
6 | |
7 .. contents:: | |
8 :local: | |
9 :backlinks: none | |
10 :depth: 3 | |
11 | |
12 Contributing? Me‽ | |
13 ================= | |
14 | |
15 NaCl and PNaCl are very big projects: they expose an entire operating system to | |
16 developers, interact with all of the Web platform, and deal with compilers | |
17 extensively to allow code written in essentially any programming language to | |
18 execute on a variety of CPU architectures. This can be daunting when trying to | |
19 figure out how to contribute to the open-source project! This page tries to make | |
20 contributing easier by listing project ideas by broad area of interest, and | |
21 detailing the required experience and expectations for each idea. | |
22 | |
23 This isn't meant to constrain contributions! If you have ideas that aren't on | |
24 this page please contact the native-client-discuss_ mailing list. | |
25 | |
26 If you like an idea on this page and would like to get started, contact the | |
27 native-client-discuss_ mailing list so that we can help you find a mentor. | |
28 | |
29 .. _native-client-discuss: https://groups.google.com/group/native-client-discuss | |
30 | |
31 Ideas | |
32 ===== | |
33 | |
34 We've separated contributor ideas into broad areas of interest: | |
35 | |
36 * **Ports** encompass all the code that *uses* the PNaCl platform. Put simply, | |
37 the point of ports is to make existing open-source code work. | |
38 * **Programming languages** sometimes involves compiler work, and sometimes | |
39 requires getting an interpreter and its APIs to work well within the Web | |
40 platform. | |
41 * **LLVM and PNaCl** requires compiler work: PNaCl is based on the LLVM | |
42 toolchain, and most of the work in this area would occur in the upstream LLVM | |
43 repository. | |
44 * **NaCl** mostly deals with low-level systems work and security. | |
45 | |
46 | |
47 .. | |
48 Adding a proposal to this document should follow this format: | |
49 Project: *project title* | |
50 Brief explanation: *brief description* | |
51 Expected results: *how do we evaluate the project's success?* | |
52 Knowledge Prerequisite: *programming languages, CS topics, ...* | |
53 Mentor: *one or multiple, their roles in this project* | |
54 The above list is inspired by the Google Summer of Code guidelines, and the | |
55 KDE project list. | |
56 | |
57 Ports | |
58 ----- | |
59 | |
60 New Filesystems | |
61 ^^^^^^^^^^^^^^^ | |
62 | |
63 * **Project:** Expose new filesystems to :doc:`nacl_io | |
64 <devguide/coding/nacl_io>`. | |
65 * **Brief explanation:** nacl_io exposes filesystems like html5fs and RAM disk, | |
66 which can be mounted and then accessed through regular POSIX APIs. New types | |
67 of filesystems could be exposed in a similar way, allowing developers to build | |
68 apps that "just work" on the Web platform while using Web APIs. A few ideas | |
69 include connecting to: Google Drive, Github, Dropbox. | |
70 * **Expected results:** A new filesystem is mountable using nacl_io, is well | |
71 tested, and used in a demo application. | |
72 * **Knowledge Prerequisite:** C++. | |
73 * **Mentor:** Sam Clegg. | |
74 | |
75 Open Source Porting | |
76 ^^^^^^^^^^^^^^^^^^^ | |
77 | |
78 * **Project:** Port substantial open source projects to work in naclports. | |
79 * **Brief explanation:** naclports contains a large collection of open source | |
80 projects that properly compile and run on the PNaCl platform. This project | |
81 involves adding new useful projects to naclports, and upstreaming any patches | |
82 to the original project: running on PNaCl effective involves porting to a new | |
83 architecture and operating system. Project ideas include: Gimp, Inkscape, Gtk. | |
84 * **Expected results:** New open source projects are usable from naclports. | |
85 * **Knowledge Prerequisite:** C/C++. | |
86 * **Mentor:** Brad Nelson. | |
Sam Clegg
2015/02/12 18:18:50
I'm happy to mentor this one too if Brad is overlo
bradn
2015/02/12 19:38:03
That would fine.
JF
2015/02/12 19:38:25
Fine which way? You or Sam?
| |
87 | |
88 | |
89 Languages | |
90 --------- | |
91 | |
92 PNaCl already has support for C and C++, and virtual machines such as | |
93 JavaScript, Lua, Python and Ruby. We'd like to support more languages, either by | |
94 having these languages target LLVM bitcode or by making sure that the language | |
95 virtual machine's APIs work well on the Web platform. | |
96 | |
97 Rust | |
98 ^^^^ | |
99 | |
100 * **Project:** Support the Rust programming languages. | |
101 * **Brief explanation:** The Rust_ programming language uses LLVM. The aim of | |
102 this project is to allow it to deliver PNaCl ``.pexe`` files. | |
103 * **Expected results:** The Rust test suite passes within the browser. How to | |
104 use Rust to target PNaCl is well documented and easy to do. | |
105 * **Knowledge Prerequisite:** Compilers, LLVM. | |
106 * **Mentor:** Ben Smith. | |
107 | |
108 .. _Rust: http://www.rust-lang.org | |
109 | |
110 Haskell | |
111 ^^^^^^^ | |
112 | |
113 * **Project:** Support the Haskell programming language. | |
114 * **Brief explanation:** GHC_ targets LLVM. The aim of this project is to allow | |
115 it to deliver PNaCl ``.pexe`` files. One interesting difficulty will be to | |
116 ensure that tail call optimization occurs properly in all targets. | |
117 * **Expected results:** The Haskell test suite passes within the browser. How to | |
118 use Haskell to target PNaCl is well documented and easy to do. | |
119 * **Knowledge Prerequisite:** Compilers, LLVM. | |
120 * **Mentor:** Ben Smith. | |
121 | |
122 .. _GHC: | |
123 http://www.haskell.org/ghc/docs/latest/html/users_guide/code-generators.html | |
124 | |
125 Julia | |
126 ^^^^^ | |
127 | |
128 * **Project:** Support the Julia programming language. | |
129 * **Brief explanation:** Julia_ targets LLVM, but it does so through LLVM's | |
130 Just-in-Time compiler which PNaCl doens't support. The aim of this project is | |
131 to allow it to deliver PNaCl ``.pexe`` files. | |
132 * **Expected results:** The Julia test suite passes within the browser. How to | |
133 use Julia to target PNaCl is well documented and easy to do. | |
134 * **Knowledge Prerequisite:** Compilers, LLVM. | |
135 * **Mentor:** Ben Smith. | |
136 | |
137 .. _Julia: http://julialang.org | |
138 | |
139 Scala | |
140 ^^^^^ | |
141 | |
142 * **Project:** Support the Scala programming language. | |
143 * **Brief explanation:** The aim of this project is to allow Scala_ to deliver | |
144 PNaCl ``.pexe`` files. | |
145 * **Expected results:** The Scala test suite passes within the browser. How to | |
146 use Scala to target PNaCl is well documented and easy to do. | |
147 * **Knowledge Prerequisite:** Compilers. | |
148 * **Mentor:** Ben Smith. | |
149 | |
150 .. _Scala: http://www.scala-lang.org | |
151 | |
152 Elm | |
153 ^^^ | |
154 | |
155 * **Project:** Support the Elm programming language. | |
156 * **Brief explanation:** The aim of this project is to allow Elm_ to deliver | |
157 PNaCl ``.pexe`` files. | |
158 * **Expected results:** The Elm test suite passes within the browser. How to use | |
159 Elm to target PNaCl is well documented and easy to do. | |
160 * **Knowledge Prerequisite:** Compilers. | |
161 * **Mentor:** Jan Voung. | |
162 | |
163 .. _Elm: http://elm-lang.org | |
164 | |
165 Mono | |
166 ^^^^ | |
167 | |
168 * **Project:** Support C# running inside Mono. | |
169 * **Brief explanation:** C# is traditionally a Just-in-Time compiled language, | |
170 the aim of this project is to be able to run C# code withing Mono_ while | |
171 compiling ahead-of-time. | |
172 * **Expected results:** The Mono test suite passes within the browser. How to | |
173 use Mono to target PNaCl is well documented and easy to do. | |
174 * **Knowledge Prerequisite:** Compilers. | |
175 * **Mentor:** Derek Schuff. | |
176 | |
177 .. _Mono: http://www.mono-project.com | |
178 | |
179 Perl | |
180 ^^^^ | |
181 | |
182 * **Project:** Support Perl. | |
183 * **Brief explanation:** Port the Perl programming language and its packages to | |
184 the PNaCl platform. | |
185 * **Expected results:** The Perl test suite passes within the browser. How to | |
186 use Perl to target PNaCl is well documented and easy to do. | |
187 * **Knowledge Prerequisite:** C. | |
188 * **Mentor:** Brad Nelson. | |
bradn
2015/02/12 19:38:03
Joy :-)
| |
189 | |
bradn
2015/02/12 19:38:03
TCC
----
* **Project: Port Fabrice Ballard's TCC t
JF
2015/02/12 19:42:38
Done.
| |
190 | |
191 LLVM and PNaCl | |
192 -------------- | |
193 | |
194 PNaCl relies heavily on LLVM in two key areas: | |
195 | |
196 * On the developer's machine, LLVM is used as a regular toolchain to parse code, | |
197 optimize it, and create a portable executable. | |
198 * On user devices, LLVM is installed as part of Chrome to translate a portable | |
199 executable into a machine-specific sandboxed executable. | |
200 | |
201 Most of the contribution ideas around LLVM would occur in the upstream LLVM | |
202 repository, and would improve LLVM for more than just PNaCl's sake (though PNaCl | |
203 is of course benefiting from these improvements!). Some of these ideas would | |
204 also apply to Subzero_, a small and fast translator from portable executable to | |
205 machine-specific code. | |
206 | |
207 .. _Subzero: https://chromium.googlesource.com/native_client/pnacl-subzero/+/mas ter/README.rst | |
208 | |
209 Sandboxing Optimizations | |
210 ^^^^^^^^^^^^^^^^^^^^^^^^ | |
211 | |
212 * **Project:** Improved sandboxed code generation. | |
213 * **Brief explanation:** PNaCl generates code that targets the NaCl sandbox, but | |
214 this code generation isn't always optimal and sometimes results in a | |
215 performance lost of 10% to 25% compared to unsandboxed code. This project | |
216 would require looking at the x86-32, x86-64, ARM and MIPS code being generated | |
217 by LLVM or Subzero and figuring out how it can be improved to execute | |
218 faster. As an example, one could write a compiler pass to figure out when | |
219 doing a zero-extending ``lea`` on NaCl x86-64 would be useful (increment and | |
220 sandbox), or see if ``%rbp`` can be used more for loads/stores unrelated to | |
221 the call frame. | |
222 * **Expected results:** Sandboxed code runs measurably faster, and gets much | |
223 closer to unsandboxed code performance. PNaCl has a fairly extensive | |
224 performance test suite to measure these improvements. | |
225 * **Knowledge Prerequisite:** Compilers, assembly. | |
226 * **Mentor:** Jan Voung. | |
227 | |
228 Binary Size Reduction | |
229 ^^^^^^^^^^^^^^^^^^^^^ | |
230 | |
231 * **Project:** Reduce the size of binaries generated by LLVM. | |
232 * **Brief explanation:** This is generally useful for the LLVM project, but is | |
233 especially important for PNaCl and Emscripten because we deliver code on the | |
234 Web (transfer size and compile time matter!). This stands to drastically | |
235 improve transfer time, and load time. Reduces the size of the PNaCl translator | |
236 as well as user code, makes the generated portable executables smaller and | |
237 translation size faster. Improve LLVM’s ``mergefuncs`` pass to reduce | |
238 redundancy of code. Detect functions and data that aren’t used. Improve | |
239 partial evaluation: can e.g. LLVM’s command-line parsing be mostly removed | |
240 from the PNaCl translator? Potentially add a pass where a developer manually | |
241 marks functions as unused, and have LLVM replace them with ``abort`` (this | |
242 should propagate and mark other code as dead). This list could be created by | |
243 using code coverage information. | |
244 * **Expected results:** Portable executables in the PNaCl repository are | |
245 measurably smaller and translate faster. | |
246 * **Knowledge Prerequisite:** LLVM bitcode. | |
247 * **Mentor:** JF Bastien. | |
248 | |
249 Vector Support | |
250 ^^^^^^^^^^^^^^ | |
251 | |
252 * **Project:** Improve PNaCl SIMD support. | |
253 * **Brief explanation:** PNaCl offers speed on the Web, and generating good SIMD | |
254 code allows developers to use the full capabilities of the device (better user | |
255 experience, longer battery life). The goal of this project is to allow | |
256 developers to use more hardware features in a portable manner by exposing | |
257 portable SIMD primitives and using auto-vectorization. This could also mean | |
258 making the architecture-specific intrinsics “just work” within PNaCl (lower | |
259 them to equivalent architecture-independent intrinsics). | |
260 * **Expected results:** Sample code and existing applications run measurably | |
261 faster by using portable SIMD and/or by auto-vectorizing. | |
262 * **Knowledge Prerequisite:** Compilers, high-performance code tuning. | |
263 * **Mentor:** JF Bastien. | |
264 | |
265 Atomics | |
266 ^^^^^^^ | |
267 | |
268 * **Project:** Improve the performance of C++11 atomics. | |
269 * **Brief explanation:** C++11 atomics allow programmers to shed inline assembly | |
270 and use language-level features to express high-performance code. This is | |
271 great for portability, but atomics currently aren't as fast as they could be | |
272 on all platforms. We had an intern work on this in the summer of 2014, see his | |
273 LLVM developer conference presentation `Blowing up the atomic barrier`_. This | |
274 project would be a continuation of this work: improve LLVM's code generation | |
275 for atomics. | |
276 * **Expected results:** Code using C++11 atomics runs measurably faster on | |
277 different architectures. | |
278 * **Knowledge Prerequisite:** Compilers, memory models. | |
279 * **Mentor:** JF Bastien. | |
280 | |
281 .. _`Blowing up the atomic barrier`: http://llvm.org/devmtg/2014-10/#talk10 | |
282 | |
283 Security-enhanced PNaCl | |
284 ^^^^^^^^^^^^^^^^^^^^^^^ | |
285 | |
286 * **Project:** Security in-depth for PNaCl. | |
287 * **Brief explanation:** PNaCl brings native code to the Web, and we want to | |
288 improve the security of the platform as well as explore novel mitigations. | |
289 This allows PNaCl to take better advantage of the hardware and operating | |
290 system it's running on and makes the platform even faster while keeping users | |
291 safe. It’s also useful for non-browser uses of PNaCl such as running untrusted | |
292 code in the Cloud. A few areas to explore are: code randomization for LLVM and | |
293 Subzero, fuzzing of the translator, code hiding at compilation time, and code | |
294 tuning to the hardware and operating system the untrusted code is running on. | |
295 * **Expected results:** The security design and implementation successfully pass | |
296 a review with the Chrome security team. | |
297 * **Knowledge Prerequisite:** Security. | |
298 * **Mentor:** JF Bastien. | |
299 | |
300 | |
301 NaCl | |
302 ---- | |
303 | |
304 Auto-Sandboxing | |
305 ^^^^^^^^^^^^^^^ | |
306 | |
307 * **Project:** Auto-sandboxing assembler. | |
308 * **Brief explanation:** NaCl has a toolchain which can sandbox native | |
309 code. This toolchain can consume C/C++ as well as pre-sandboxed assembly, or | |
310 assembly which uses special sandboxing macros. The goal of this project is to | |
311 follow NaCl's sandboxing requirements automatically which compiling assembly | |
312 files. | |
313 * **Expected results:** Existing assembly code can be compiled to a native | |
314 executable that follows NaCl's sandboxing rules. | |
315 * **Knowledge Prerequisite:** Assemblers. | |
316 * **Mentor:** Derek Schuff, Roland McGrath. | |
317 | |
318 New Sandbox | |
319 ^^^^^^^^^^^ | |
320 | |
321 * **Project:** Create a new software-fault isolation sandbox. | |
322 * **Brief explanation:** NaCl pioneered production-quality sandboxes based on | |
323 software-fault isolation, and currently supports x86-32, x86-64, ARMv7's ARM, | |
324 and MIPS. This project involves designing and implementing new sandboxes. Of | |
325 particular interest are ARMv8's aarch64 and Power8. This also requires | |
326 implementing sandboxing in the compiler. | |
327 * **Expected results:** The new sandbox's design and implementation successfully | |
328 pass a review with the Chrome security team. Existing NaCl code successfully | |
329 runs in the new sandbox. | |
330 * **Knowledge Prerequisite:** Security, low-level assembly, compilers, LLVM. | |
331 * **Mentor:** David Sehr. | |
332 | |
333 64-bit Sandbox | |
334 ^^^^^^^^^^^^^^ | |
335 | |
336 * **Project:** Create a 64-bit sandbox. | |
337 * **Brief explanation:** NaCl currently supports sandboxes where pointers are | |
338 32-bits. Some applications, both in-browser and not in-browser, would benefit | |
339 from a larger address space. This project involves designing and implementing | |
340 a model for 64-bit sandboxes on all architecture NaCl currently supports. This | |
341 also requires supporting 64-bit pointers in PNaCl using the ``le64`` platform, | |
342 and updating the code generation for each platform. | |
343 * **Expected results:** The new sandbox's design and implementation successfully | |
344 pass a review with the Chrome security team. Existing NaCl code successfully | |
345 runs in the new sandbox. | |
346 * **Knowledge Prerequisite:** Security, low-level assembly, compilers, LLVM. | |
347 * **Mentor:** David Sehr. | |
OLD | NEW |