Imported Upstream version 1.0.0-alpha.2

This commit is contained in:
Sylvestre Ledru 2015-02-22 09:41:28 +01:00
parent 1c8ac2b079
commit 85aaf69fd1
5275 changed files with 222913 additions and 116051 deletions

View File

@ -9,12 +9,15 @@ Aaron Todd <github@opprobrio.us>
Aaron Turon <aturon@mozilla.com> Aaron Turon <aturon@mozilla.com>
Aaron Weiss <aaronweiss74@gmail.com> Aaron Weiss <aaronweiss74@gmail.com>
Adam Bozanich <adam.boz@gmail.com> Adam Bozanich <adam.boz@gmail.com>
Adam Roben <adam@roben.org>
Adam Szkoda <adaszko@gmail.com> Adam Szkoda <adaszko@gmail.com>
Adolfo Ochagavía <aochagavia92@gmail.com> Adolfo Ochagavía <aochagavia92@gmail.com>
Adrien Brault <adrien.brault@gmail.com> Adrien Brault <adrien.brault@gmail.com>
Adrien Tétar <adri-from-59@hotmail.fr> Adrien Tétar <adri-from-59@hotmail.fr>
Ahmed Charles <acharles@outlook.com>
Ahmed Charles <ahmedcharles@gmail.com> Ahmed Charles <ahmedcharles@gmail.com>
Aidan Cully <github@aidan.users.panix.com> Aidan Cully <github@aidan.users.panix.com>
Aidan Hobson Sayers <aidanhs@cantab.net>
Akos Kiss <akiss@inf.u-szeged.hu> Akos Kiss <akiss@inf.u-szeged.hu>
Alan Andrade <alan.andradec@gmail.com> Alan Andrade <alan.andradec@gmail.com>
Alan Williams <mralert@gmail.com> Alan Williams <mralert@gmail.com>
@ -25,12 +28,15 @@ Alex Gaynor <alex.gaynor@gmail.com>
Alex Lyon <arcterus@mail.com> Alex Lyon <arcterus@mail.com>
Alex Rønne Petersen <alex@lycus.org> Alex Rønne Petersen <alex@lycus.org>
Alex Whitney <aw1209@ic.ac.uk> Alex Whitney <aw1209@ic.ac.uk>
Alexander Light <scialexlight@gmail.com> Alexander Bliskovsky <alexander.bliskovsky@gmail.com>
Alexander Korolkov <alexander.korolkov@gmail.com>
Alexander Light <allight@cs.brown.edu>
Alexander Stavonin <a.stavonin@gmail.com> Alexander Stavonin <a.stavonin@gmail.com>
Alexandre Gagnon <alxgnon@gmail.com> Alexandre Gagnon <alxgnon@gmail.com>
Alexandros Tasos <sdi1100085@di.uoa.gr> Alexandros Tasos <sdi1100085@di.uoa.gr>
Alexei Sholik <alcosholik@gmail.com> Alexei Sholik <alcosholik@gmail.com>
Alexis Beingessner <a.beingessner@gmail.com> Alexis Beingessner <a.beingessner@gmail.com>
Alfie John <alfie@alfie.wtf>
Alfie John <alfiej@fastmail.fm> Alfie John <alfiej@fastmail.fm>
Ali Smesseim <smesseim.ali@gmail.com> Ali Smesseim <smesseim.ali@gmail.com>
Alisdair Owens <awo101@zepler.net> Alisdair Owens <awo101@zepler.net>
@ -45,6 +51,7 @@ Andreas Neuhaus <zargony@zargony.com>
Andreas Ots <andreasots@gmail.com> Andreas Ots <andreasots@gmail.com>
Andreas Tolfsen <ato@mozilla.com> Andreas Tolfsen <ato@mozilla.com>
Andrei Formiga <archimedes_siracusa@hotmail.com> Andrei Formiga <archimedes_siracusa@hotmail.com>
Andrew Barchuk <raindev@icloud.com>
Andrew Cann <shum@canndrew.org> Andrew Cann <shum@canndrew.org>
Andrew Chin <achin@eminence32.net> Andrew Chin <achin@eminence32.net>
Andrew Dunham <andrew@du.nham.ca> Andrew Dunham <andrew@du.nham.ca>
@ -56,9 +63,10 @@ Angus Lees <gus@inodes.org>
Anthony Juckel <ajuckel@gmail.com> Anthony Juckel <ajuckel@gmail.com>
Anton Löfgren <anton.lofgren@gmail.com> Anton Löfgren <anton.lofgren@gmail.com>
Arcterus <Arcterus@mail.com> Arcterus <Arcterus@mail.com>
Ariel Ben-Yehuda <ariel.byd@gmail.com> Ariel Ben-Yehuda <arielb1@mail.tau.ac.il>
Arjan Topolovec <arjan.top@gmail.com> Arjan Topolovec <arjan.top@gmail.com>
Arkaitz Jimenez <arkaitzj@gmail.com> Arkaitz Jimenez <arkaitzj@gmail.com>
Armin Preiml <apreiml@strohwolke.at>
Armin Ronacher <armin.ronacher@active-4.com> Armin Ronacher <armin.ronacher@active-4.com>
Arpad Borsos <arpad.borsos@googlemail.com> Arpad Borsos <arpad.borsos@googlemail.com>
Artem <artemciy@gmail.com> Artem <artemciy@gmail.com>
@ -77,7 +85,7 @@ Ben Gamari <bgamari.foss@gmail.com>
Ben Harris <mail@bharr.is> Ben Harris <mail@bharr.is>
Ben Kelly <ben@wanderview.com> Ben Kelly <ben@wanderview.com>
Ben Noordhuis <info@bnoordhuis.nl> Ben Noordhuis <info@bnoordhuis.nl>
Ben S <ogham@bsago.me> Ben S <ogham@users.noreply.github.com>
Ben Striegel <ben.striegel@gmail.com> Ben Striegel <ben.striegel@gmail.com>
Benjamin Adamson <adamson.benjamin@gmail.com> Benjamin Adamson <adamson.benjamin@gmail.com>
Benjamin Herr <ben@0x539.de> Benjamin Herr <ben@0x539.de>
@ -106,18 +114,23 @@ Brian Dawn <brian.t.dawn@gmail.com>
Brian J Brennan <brianloveswords@gmail.com> Brian J Brennan <brianloveswords@gmail.com>
Brian J. Burg <burg@cs.washington.edu> Brian J. Burg <burg@cs.washington.edu>
Brian Koropoff <bkoropoff@gmail.com> Brian Koropoff <bkoropoff@gmail.com>
Brian Leibig <brian.leibig@gmail.com> Brian Leibig <brian@brianleibig.com>
Bruno de Oliveira Abinader <bruno.d@partner.samsung.com> Bruno de Oliveira Abinader <bruno.d@partner.samsung.com>
Bryan Dunsmore <dunsmoreb@gmail.com> Bryan Dunsmore <dunsmoreb@gmail.com>
Byron Williams <byron@112percent.com> Byron Williams <byron@112percent.com>
Cadence Marseille <cadencemarseille@gmail.com> Cadence Marseille <cadencemarseille@gmail.com>
Caitlin Potter <snowball@defpixel.com> Caitlin Potter <snowball@defpixel.com>
Cam Jackson <camjackson89@gmail.com>
Cameron Zwarich <zwarich@mozilla.com> Cameron Zwarich <zwarich@mozilla.com>
CarVac <c.lo.to.da.down.lo@gmail.com>
Carl Lerche <me@carllerche.com>
Carl-Anton Ingmarsson <mail@carlanton.se> Carl-Anton Ingmarsson <mail@carlanton.se>
Carlos <toqueteos@gmail.com> Carlos <toqueteos@gmail.com>
Carol Nichols <cnichols@thinkthroughmath.com> Carol Nichols <carol.nichols@gmail.com>
Carol Willing <carolcode@willingconsulting.com> Carol Willing <carolcode@willingconsulting.com>
Carter Hinsley <carterhinsley@gmail.com>
Carter Tazio Schonwald <carter.schonwald@gmail.com> Carter Tazio Schonwald <carter.schonwald@gmail.com>
Caspar Krieger <caspar@asparck.com>
Chase Southwood <chase.southwood@gmail.com> Chase Southwood <chase.southwood@gmail.com>
Chris Double <chris.double@double.co.nz> Chris Double <chris.double@double.co.nz>
Chris Morgan <me@chrismorgan.info> Chris Morgan <me@chrismorgan.info>
@ -126,12 +139,14 @@ Chris Peterson <cpeterson@mozilla.com>
Chris Pressey <cpressey@gmail.com> Chris Pressey <cpressey@gmail.com>
Chris Sainty <csainty@hotmail.com> Chris Sainty <csainty@hotmail.com>
Chris Shea <cmshea@gmail.com> Chris Shea <cmshea@gmail.com>
Chris Thorn <thorn@thoughtbot.com>
Chris Wong <lambda.fairy@gmail.com> Chris Wong <lambda.fairy@gmail.com>
Christoph Burgdorf <christoph.burgdorf@bvsn.org> Christoph Burgdorf <christoph.burgdorf@bvsn.org>
Christopher Bergqvist <spambox0@digitalpoetry.se> Christopher Bergqvist <spambox0@digitalpoetry.se>
Christopher Kendell <ckendell@outlook.com> Christopher Kendell <ckendell@outlook.com>
Chuck Ries <chuck.ries@gmail.com> Chuck Ries <chuck.ries@gmail.com>
Clark Gaebel <cg.wowus.cg@gmail.com> Clark Gaebel <cg.wowus.cg@gmail.com>
Clifford Caoile <piyo@users.sf.net>
Clinton Ryan <clint.ryan3@gmail.com> Clinton Ryan <clint.ryan3@gmail.com>
Cody P Schafer <dev@codyps.com> Cody P Schafer <dev@codyps.com>
Cody Schroeder <codys@cs.washington.edu> Cody Schroeder <codys@cs.washington.edu>
@ -152,17 +167,22 @@ Dan Albert <danalbert@google.com>
Dan Burkert <dan@danburkert.com> Dan Burkert <dan@danburkert.com>
Dan Connolly <dckc@madmode.com> Dan Connolly <dckc@madmode.com>
Dan Luu <danluu@gmail.com> Dan Luu <danluu@gmail.com>
Dan Yang <dsyang@fb.com>
Daniel Brooks <db48x@db48x.net> Daniel Brooks <db48x@db48x.net>
Daniel Fagnan <dnfagnan@gmail.com> Daniel Fagnan <dnfagnan@gmail.com>
Daniel Farina <daniel@fdr.io> Daniel Farina <daniel@fdr.io>
Daniel Griffen <daniel@dgriffen.com>
Daniel Grunwald <daniel@danielgrunwald.de>
Daniel Hofstetter <daniel.hofstetter@42dh.com> Daniel Hofstetter <daniel.hofstetter@42dh.com>
Daniel Luz <dev@mernen.com> Daniel Luz <dev@mernen.com>
Daniel MacDougall <dmacdougall@gmail.com> Daniel MacDougall <dmacdougall@gmail.com>
Daniel Micay <danielmicay@gmail.com> Daniel Micay <danielmicay@gmail.com>
Daniel Patterson <dbp@riseup.net> Daniel Patterson <dbp@riseup.net>
Daniel Raloff <draloff@side2.com>
Daniel Ralston <Wubbulous@gmail.com> Daniel Ralston <Wubbulous@gmail.com>
Daniel Rosenwasser <DanielRosenwasser@gmail.com> Daniel Rosenwasser <DanielRosenwasser@gmail.com>
Daniel Ursache Dogariu <contact@danniel.net> Daniel Ursache Dogariu <contact@danniel.net>
Daniil Smirnov <danslapman@gmail.com>
Dave Herman <dherman@mozilla.com> Dave Herman <dherman@mozilla.com>
Dave Hodder <dmh@dmh.org.uk> Dave Hodder <dmh@dmh.org.uk>
David Creswick <dcrewi@gyrae.net> David Creswick <dcrewi@gyrae.net>
@ -180,6 +200,7 @@ Derek Guenther <dguenther9@gmail.com>
Derek Harland <derek.harland@finq.co.nz> Derek Harland <derek.harland@finq.co.nz>
Diego Giagio <diego@giagio.com> Diego Giagio <diego@giagio.com>
Diego Ongaro <ongaro@cs.stanford.edu> Diego Ongaro <ongaro@cs.stanford.edu>
Diggory Blake <diggsey@googlemail.com>
Diggory Hardy <diggory.hardy@gmail.com> Diggory Hardy <diggory.hardy@gmail.com>
Dimitri Krassovski <labria@startika.com> Dimitri Krassovski <labria@startika.com>
Dirk Gadsden <dirk@esherido.com> Dirk Gadsden <dirk@esherido.com>
@ -190,9 +211,12 @@ Dmitry Ermolov <epdmitry@yandex.ru>
Dmitry Promsky <dmitry@willworkforcookies.com> Dmitry Promsky <dmitry@willworkforcookies.com>
Dmitry Vasiliev <dima@hlabs.org> Dmitry Vasiliev <dima@hlabs.org>
Do Nhat Minh <mrordinaire@gmail.com> Do Nhat Minh <mrordinaire@gmail.com>
Dominik Inführ <dominik.infuehr@gmail.com>
Donovan Preston <donovanpreston@gmail.com> Donovan Preston <donovanpreston@gmail.com>
Douglas Young <rcxdude@gmail.com> Douglas Young <rcxdude@gmail.com>
Drew Willcoxon <adw@mozilla.com> Drew Willcoxon <adw@mozilla.com>
Duane Edwards <mail@duaneedwards.net>
Duncan Regan <duncanregan@gmail.com>
Dylan Braithwaite <dylanbraithwaite1@gmail.com> Dylan Braithwaite <dylanbraithwaite1@gmail.com>
Dzmitry Malyshau <kvarkus@gmail.com> Dzmitry Malyshau <kvarkus@gmail.com>
Earl St Sauver <estsauver@gmail.com> Earl St Sauver <estsauver@gmail.com>
@ -202,6 +226,7 @@ Eduardo Bautista <me@eduardobautista.com>
Edward Wang <edward.yu.wang@gmail.com> Edward Wang <edward.yu.wang@gmail.com>
Edward Z. Yang <ezyang@cs.stanford.edu> Edward Z. Yang <ezyang@cs.stanford.edu>
Ehsanul Hoque <ehsanul@ehsanul.com> Ehsanul Hoque <ehsanul@ehsanul.com>
Elantsev Serj <elantsev@yandex-team.ru>
Elliott Slaughter <elliottslaughter@gmail.com> Elliott Slaughter <elliottslaughter@gmail.com>
Elly Fong-Jones <elly@leptoquark.net> Elly Fong-Jones <elly@leptoquark.net>
Emanuel Rylke <ema-fox@web.de> Emanuel Rylke <ema-fox@web.de>
@ -212,6 +237,7 @@ Eric Holmes <eric@ejholmes.net>
Eric Kidd <git@randomhacks.net> Eric Kidd <git@randomhacks.net>
Eric Martin <e.a.martin1337@gmail.com> Eric Martin <e.a.martin1337@gmail.com>
Eric Reed <ecreed@cs.washington.edu> Eric Reed <ecreed@cs.washington.edu>
Erick Rivas <chemical.rivas@gmail.com>
Erick Tryzelaar <erick.tryzelaar@gmail.com> Erick Tryzelaar <erick.tryzelaar@gmail.com>
Erik Lyon <elyon001@local.fake> Erik Lyon <elyon001@local.fake>
Erik Price <erik.price16@gmail.com> Erik Price <erik.price16@gmail.com>
@ -219,6 +245,7 @@ Erik Rose <erik@mozilla.com>
Erwan <erwan.ricq@gmail.com> Erwan <erwan.ricq@gmail.com>
Etienne Millon <me@emillon.org> Etienne Millon <me@emillon.org>
Eunchong Yu <kroisse@gmail.com> Eunchong Yu <kroisse@gmail.com>
Eunji Jeong <eun-ji.jeong@samsung.com>
Evan Klitzke <evan@eklitzke.org> Evan Klitzke <evan@eklitzke.org>
Evan McClanahan <evan@evanmcc.com> Evan McClanahan <evan@evanmcc.com>
Evgeny Sologubov Evgeny Sologubov
@ -230,6 +257,8 @@ Fedor Indutny <fedor.indutny@gmail.com>
Felix Crux <felixc@felixcrux.com> Felix Crux <felixc@felixcrux.com>
Felix Raimundo <felix.raimundo@telecom-paristech.fr> Felix Raimundo <felix.raimundo@telecom-paristech.fr>
Felix S. Klock II <pnkfelix@pnkfx.org> Felix S. Klock II <pnkfelix@pnkfx.org>
Fenhl <fenhl@fenhl.net>
Filip Szczepański <jazz2rulez@gmail.com>
Flaper Fesp <flaper87@gmail.com> Flaper Fesp <flaper87@gmail.com>
Flavio Percoco <flaper87@gmail.com> Flavio Percoco <flaper87@gmail.com>
Florian Gilcher <florian.gilcher@asquera.de> Florian Gilcher <florian.gilcher@asquera.de>
@ -241,10 +270,12 @@ Francisco Souza <f@souza.cc>
Franklin Chen <franklinchen@franklinchen.com> Franklin Chen <franklinchen@franklinchen.com>
Gabriel <g2p.code@gmail.com> Gabriel <g2p.code@gmail.com>
Gareth Daniel Smith <garethdanielsmith@gmail.com> Gareth Daniel Smith <garethdanielsmith@gmail.com>
Garrett Heel <garrettheel@gmail.com>
Gary Linscott <glinscott@gmail.com> Gary Linscott <glinscott@gmail.com>
Gary M. Josack <gary@byoteki.com> Gary M. Josack <gary@byoteki.com>
Gavin Baker <gavinb@antonym.org> Gavin Baker <gavinb@antonym.org>
Geoff Hill <geoff@geoffhill.org> Geoff Hill <geoff@geoffhill.org>
Geoffrey Thomas <geofft@ldpreload.com>
Geoffroy Couprie <geo.couprie@gmail.com> Geoffroy Couprie <geo.couprie@gmail.com>
George Papanikolaou <g3orge.app@gmail.com> George Papanikolaou <g3orge.app@gmail.com>
Georges Dubus <georges.dubus@gmail.com> Georges Dubus <georges.dubus@gmail.com>
@ -256,7 +287,9 @@ Gonçalo Cabrita <_@gmcabrita.com>
Graham Fawcett <graham.fawcett@gmail.com> Graham Fawcett <graham.fawcett@gmail.com>
Grahame Bowland <grahame@angrygoats.net> Grahame Bowland <grahame@angrygoats.net>
Graydon Hoare <graydon@mozilla.com> Graydon Hoare <graydon@mozilla.com>
Greg Chapple <gregchapple1@gmail.com>
Grigoriy <ohaistarlight@gmail.com> Grigoriy <ohaistarlight@gmail.com>
Guillaume Gomez <guillaume1.gomez@gmail.com>
Guillaume Pinot <texitoi@texitoi.eu> Guillaume Pinot <texitoi@texitoi.eu>
Gyorgy Andrasek <jurily@gmail.com> Gyorgy Andrasek <jurily@gmail.com>
Gábor Horváth <xazax.hun@gmail.com> Gábor Horváth <xazax.hun@gmail.com>
@ -265,18 +298,22 @@ Haitao Li <lihaitao@gmail.com>
Hanno Braun <mail@hannobraun.de> Hanno Braun <mail@hannobraun.de>
Harry Marr <harry.marr@gmail.com> Harry Marr <harry.marr@gmail.com>
Heather <heather@cynede.net> Heather <heather@cynede.net>
Henrik Schopmans <h.schopmans@googlemail.com>
Herman J. Radtke III <hermanradtke@gmail.com> Herman J. Radtke III <hermanradtke@gmail.com>
HeroesGrave <heroesgrave@gmail.com> HeroesGrave <heroesgrave@gmail.com>
Hong Chulju <ang0123dev@gmail.com> Hong Chulju <ang0123dev@gmail.com>
Honza Strnad <hanny.strnad@gmail.com> Honza Strnad <hanny.strnad@gmail.com>
Hugo Jobling <hello@thisishugo.com> Hugo Jobling <hello@thisishugo.com>
Hugo van der Wijst <hugo@wij.st>
Huon Wilson <dbau.pp+github@gmail.com> Huon Wilson <dbau.pp+github@gmail.com>
Ian Connolly <iconnolly@mozilla.com> Ian Connolly <iconnolly@mozilla.com>
Ian D. Bollinger <ian.bollinger@gmail.com> Ian D. Bollinger <ian.bollinger@gmail.com>
Ian Daniher <it.daniher@gmail.com> Ian Daniher <it.daniher@gmail.com>
Ignacio Corderi <icorderi@msn.com>
Igor Bukanov <igor@mir2.org> Igor Bukanov <igor@mir2.org>
Ilya Dmitrichenko <ilya@xively.com> Ilya Dmitrichenko <ilya@xively.com>
Ilyong Cho <ilyoan@gmail.com> Ilyong Cho <ilyoan@gmail.com>
Ingo Blechschmidt <iblech@web.de>
Isaac Aggrey <isaac.aggrey@gmail.com> Isaac Aggrey <isaac.aggrey@gmail.com>
Isaac Dupree <antispam@idupree.com> Isaac Dupree <antispam@idupree.com>
Ivan Enderlin <ivan.enderlin@hoa-project.net> Ivan Enderlin <ivan.enderlin@hoa-project.net>
@ -286,6 +323,7 @@ Ivano Coppola <rgbfirefox@gmail.com>
J. J. Weber <jjweber@gmail.com> J. J. Weber <jjweber@gmail.com>
J.C. Moyer <jmoyer1992@gmail.com> J.C. Moyer <jmoyer1992@gmail.com>
JONNALAGADDA Srinivas <js@ojuslabs.com> JONNALAGADDA Srinivas <js@ojuslabs.com>
JP Sugarbroad <jpsugar@google.com>
Jack Heizer <jack.heizer@gmail.com> Jack Heizer <jack.heizer@gmail.com>
Jack Moffitt <jack@metajack.im> Jack Moffitt <jack@metajack.im>
Jacob Edelman <edelman.jd@gmail.com> Jacob Edelman <edelman.jd@gmail.com>
@ -320,9 +358,11 @@ Jason Thompson <jason@jthompson.ca>
Jason Toffaletti <jason@topsy.com> Jason Toffaletti <jason@topsy.com>
Jauhien Piatlicki <jauhien@gentoo.org> Jauhien Piatlicki <jauhien@gentoo.org>
Jay Anderson <jayanderson0@gmail.com> Jay Anderson <jayanderson0@gmail.com>
Jay True <glacjay@gmail.com>
Jed Davis <jld@panix.com> Jed Davis <jld@panix.com>
Jed Estep <aje@jhu.edu> Jed Estep <aje@jhu.edu>
Jeff Balogh <jbalogh@mozilla.com> Jeff Balogh <jbalogh@mozilla.com>
Jeff Belgum <jeffbelgum@gmail.com>
Jeff Muizelaar <jmuizelaar@mozilla.com> Jeff Muizelaar <jmuizelaar@mozilla.com>
Jeff Olson <olson.jeffery@gmail.com> Jeff Olson <olson.jeffery@gmail.com>
Jeff Parsons <jeffdougson@gmail.com> Jeff Parsons <jeffdougson@gmail.com>
@ -352,8 +392,9 @@ John Barker <jebarker@gmail.com>
John Clements <clements@racket-lang.org> John Clements <clements@racket-lang.org>
John Fresco <john.fresco@utah.edu> John Fresco <john.fresco@utah.edu>
John Gallagher <jgallagher@bignerdranch.com> John Gallagher <jgallagher@bignerdranch.com>
John Hodge <acessdev@gmail.com>
John Kåre Alsaker <john.kare.alsaker@gmail.com>
John Kleint <jk@hinge.co> John Kleint <jk@hinge.co>
John Kåre Alsaker <john.kare.alsaker@gmail.com>
John Louis Walker <injyuw@gmail.com> John Louis Walker <injyuw@gmail.com>
John Schmidt <john.schmidt.h@gmail.com> John Schmidt <john.schmidt.h@gmail.com>
John Simon <john@johnsoft.com> John Simon <john@johnsoft.com>
@ -368,7 +409,9 @@ Jonathan Sternberg <jonathansternberg@gmail.com>
Joonas Javanainen <joonas.javanainen@gmail.com> Joonas Javanainen <joonas.javanainen@gmail.com>
Jordi Boggiano <j.boggiano@seld.be> Jordi Boggiano <j.boggiano@seld.be>
Jorge Aparicio <japaricious@gmail.com> Jorge Aparicio <japaricious@gmail.com>
Jorge Israel Peña <jorge.israel.p@gmail.com>
Joris Rehm <joris.rehm@wakusei.fr> Joris Rehm <joris.rehm@wakusei.fr>
Jormundir <Chaseph@gmail.com>
Joseph Crail <jbcrail@gmail.com> Joseph Crail <jbcrail@gmail.com>
Joseph Martin <pythoner6@gmail.com> Joseph Martin <pythoner6@gmail.com>
Joseph Rushton Wakeling <joe@webdrake.net> Joseph Rushton Wakeling <joe@webdrake.net>
@ -380,6 +423,7 @@ Joshua Wise <joshua@joshuawise.com>
Joshua Yanovski <pythonesque@gmail.com> Joshua Yanovski <pythonesque@gmail.com>
Julia Evans <julia@jvns.ca> Julia Evans <julia@jvns.ca>
Julian Orth <ju.orth@gmail.com> Julian Orth <ju.orth@gmail.com>
Junseok Lee <lee.junseok@berkeley.edu>
Junyoung Cho <june0.cho@samsung.com> Junyoung Cho <june0.cho@samsung.com>
JustAPerson <jpriest8@ymail.com> JustAPerson <jpriest8@ymail.com>
Justin Noah <justinnoah@gmail.com> Justin Noah <justinnoah@gmail.com>
@ -387,9 +431,10 @@ Jyun-Yan You <jyyou.tw@gmail.com>
Kang Seonghoon <kang.seonghoon@mearie.org> Kang Seonghoon <kang.seonghoon@mearie.org>
Kang Seonghoon <public+git@mearie.org> Kang Seonghoon <public+git@mearie.org>
Kasey Carrothers <kaseyc.808@gmail.com> Kasey Carrothers <kaseyc.808@gmail.com>
Keegan McAllister <kmcallister@mozilla.com> Keegan McAllister <mcallister.keegan@gmail.com>
Kelly Wilson <wilsonk@cpsc.ucalgary.ca> Kelly Wilson <wilsonk@cpsc.ucalgary.ca>
Ken Tossell <ken@tossell.net> Ken Tossell <ken@tossell.net>
KernelJ <kernelj@epixxware.com>
Keshav Kini <keshav.kini@gmail.com> Keshav Kini <keshav.kini@gmail.com>
Kevin Atkinson <kevina@cs.utah.edu> Kevin Atkinson <kevina@cs.utah.edu>
Kevin Ballard <kevin@sb.org> Kevin Ballard <kevin@sb.org>
@ -400,22 +445,30 @@ Kevin Murphy <kemurphy.cmu@gmail.com>
Kevin Walter <kevin.walter.private@googlemail.com> Kevin Walter <kevin.walter.private@googlemail.com>
Kevin Yap <me@kevinyap.ca> Kevin Yap <me@kevinyap.ca>
Kiet Tran <ktt3ja@gmail.com> Kiet Tran <ktt3ja@gmail.com>
Kim Røen <kim@pam.no>
Kostas Karachalios <vrinek@me.com>
Kyeongwoon Lee <kyeongwoon.lee@samsung.com> Kyeongwoon Lee <kyeongwoon.lee@samsung.com>
Lai Jiangshan <laijs@cn.fujitsu.com>
Lars Bergstrom <lbergstrom@mozilla.com> Lars Bergstrom <lbergstrom@mozilla.com>
Laurence Tratt <laurie@tratt.net> Laurence Tratt <laurie@tratt.net>
Laurent Bonnans <bonnans.l@gmail.com> Laurent Bonnans <bonnans.l@gmail.com>
Lauri Lehmijoki <lauri.lehmijoki@iki.fi>
Lawrence Velázquez <larryv@alum.mit.edu> Lawrence Velázquez <larryv@alum.mit.edu>
Leah Hanson <astrieanna@gmail.com> Leah Hanson <astrieanna@gmail.com>
Lee Wondong <wdlee91@gmail.com> Lee Wondong <wdlee91@gmail.com>
LemmingAvalanche <haugsbakk@yahoo.no> LemmingAvalanche <haugsbakk@yahoo.no>
Lennart Kudling <github@kudling.de> Lennart Kudling <github@kudling.de>
Léo Testard <leo.testard@gmail.com> Leo Testard <leo.testard@gmail.com>
Liigo Zhuang <com.liigo@gmail.com> Liigo Zhuang <com.liigo@gmail.com>
Lindsey Kuper <lindsey@composition.al> Lindsey Kuper <lindsey@composition.al>
Lionel Flandrin <lionel.flandrin@parrot.com> Lionel Flandrin <lionel.flandrin@parrot.com>
Logan Chien <tzuhsiang.chien@gmail.com>
Loïc Damien <loic.damien@dzamlo.ch>
Luca Bruno <lucab@debian.org> Luca Bruno <lucab@debian.org>
Luis de Bethencourt <luis@debethencourt.com> Luis de Bethencourt <luis@debethencourt.com>
Luke Francl <look@recursion.org>
Luke Metz <luke.metz@students.olin.edu> Luke Metz <luke.metz@students.olin.edu>
Luke Steensen <luke.steensen@gmail.com>
Luqman Aden <me@luqman.ca> Luqman Aden <me@luqman.ca>
Magnus Auvinen <magnus.auvinen@gmail.com> Magnus Auvinen <magnus.auvinen@gmail.com>
Mahmut Bulut <mahmutbulut0@gmail.com> Mahmut Bulut <mahmutbulut0@gmail.com>
@ -444,6 +497,7 @@ Matt Carberry <carberry.matt@gmail.com>
Matt Coffin <mcoffin13@gmail.com> Matt Coffin <mcoffin13@gmail.com>
Matt McPherrin <git@mcpherrin.ca> Matt McPherrin <git@mcpherrin.ca>
Matt Murphy <matthew.john.murphy@gmail.com> Matt Murphy <matthew.john.murphy@gmail.com>
Matt Roche <angst7@gmail.com>
Matt Windsor <mattwindsor@btinternet.com> Matt Windsor <mattwindsor@btinternet.com>
Matthew Auld <matthew.auld@intel.com> Matthew Auld <matthew.auld@intel.com>
Matthew Iselin <matthew@theiselins.net> Matthew Iselin <matthew@theiselins.net>
@ -461,6 +515,7 @@ Meyer S. Jacobs <meyermagic@gmail.com>
Micah Chalmer <micah@micahchalmer.net> Micah Chalmer <micah@micahchalmer.net>
Michael Arntzenius <daekharel@gmail.com> Michael Arntzenius <daekharel@gmail.com>
Michael Bebenita <mbebenita@mozilla.com> Michael Bebenita <mbebenita@mozilla.com>
Michael Budde <mbudde@gmail.com>
Michael Dagitses <dagitses@google.com> Michael Dagitses <dagitses@google.com>
Michael Darakananda <pongad@gmail.com> Michael Darakananda <pongad@gmail.com>
Michael Fairley <michaelfairley@gmail.com> Michael Fairley <michaelfairley@gmail.com>
@ -469,37 +524,46 @@ Michael Kainer <kaini1123@gmail.com>
Michael Letterle <michael.letterle@gmail.com> Michael Letterle <michael.letterle@gmail.com>
Michael Matuzak <mmatuzak@gmail.com> Michael Matuzak <mmatuzak@gmail.com>
Michael Neumann <mneumann@ntecs.de> Michael Neumann <mneumann@ntecs.de>
Michael Pankov <work@michaelpankov.com>
Michael Pratt <michael@pratt.im> Michael Pratt <michael@pratt.im>
Michael Reinhard <mcreinhard@users.noreply.github.com> Michael Reinhard <mcreinhard@users.noreply.github.com>
Michael Sproul <micsproul@gmail.com> Michael Sproul <micsproul@gmail.com>
Michael Sullivan <sully@msully.net> Michael Sullivan <sully@msully.net>
Michael Williams <m.t.williams@live.com> Michael Williams <m.t.williams@live.com>
Michael Woerister <michaelwoerister@gmail> Michael Woerister <michaelwoerister@posteo>
Michael Zhou <moz@google.com> Michael Zhou <moz@google.com>
Mick Koch <kchmck@gmail.com> Mick Koch <kchmck@gmail.com>
Mickaël Delahaye <mickael.delahaye@gmail.com> Mickaël Delahaye <mickael.delahaye@gmail.com>
Mihnea Dobrescu-Balaur <mihnea@linux.com> Mihnea Dobrescu-Balaur <mihnea@linux.com>
Mike Boutin <mike.boutin@gmail.com> Mike Boutin <mike.boutin@gmail.com>
Mike Dilger <mike@efx.co.nz> Mike Dilger <mike@efx.co.nz>
Mike English <mike.english@atomicobject.com>
Mike Pedersen <noctune9@gmail.com> Mike Pedersen <noctune9@gmail.com>
Mike Robinson <mikeprobinsonuk@gmail.com> Mike Robinson <mikeprobinsonuk@gmail.com>
Mikhail Zabaluev <mikhail.zabaluev@gmail.com>
Mikko Perttunen <cyndis@kapsi.fi> Mikko Perttunen <cyndis@kapsi.fi>
Ms2ger <ms2ger@gmail.com> Ms2ger <ms2ger@gmail.com>
Mukilan Thiagarajan <mukilanthiagarajan@gmail.com> Mukilan Thiagarajan <mukilanthiagarajan@gmail.com>
Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com> Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
Murarth <murarth@gmail.com> Murarth <murarth@gmail.com>
Mátyás Mustoha <mmatyas@inf.u-szeged.hu>
NAKASHIMA, Makoto <makoto.nksm+github@gmail.com>
NODA, Kai <nodakai@gmail.com> NODA, Kai <nodakai@gmail.com>
Nafis <nhoss2@gmail.com> Nafis <nhoss2@gmail.com>
Nathan Froyd <froydnj@gmail.com> Nathan Froyd <froydnj@gmail.com>
Nathan Stoddard <nstodda@purdue.edu>
Nathan Typanski <ntypanski@gmail.com> Nathan Typanski <ntypanski@gmail.com>
Nathan Zadoks <nathan@nathan7.eu> Nathan Zadoks <nathan@nathan7.eu>
Nathaniel Herman <nherman@college.harvard.edu> Nathaniel Herman <nherman@college.harvard.edu>
Nathaniel Theis <nttheis@gmail.com>
Neil Pankey <npankey@gmail.com> Neil Pankey <npankey@gmail.com>
Nelson Chen <crazysim@gmail.com>
NiccosSystem <niccossystem@gmail.com> NiccosSystem <niccossystem@gmail.com>
Nicholas Bishop <nicholasbishop@gmail.com> Nicholas Bishop <nicholasbishop@gmail.com>
Nick Cameron <ncameron@mozilla.com> Nick Cameron <ncameron@mozilla.com>
Nick Desaulniers <ndesaulniers@mozilla.com> Nick Desaulniers <ndesaulniers@mozilla.com>
Nick Howell <howellnick@gmail.com> Nick Howell <howellnick@gmail.com>
Nick Sarten <gen.battle@gmail.com>
Nicolas Silva <nical.silva@gmail.com> Nicolas Silva <nical.silva@gmail.com>
Niels Egberts <git@nielsegberts.nl> Niels Egberts <git@nielsegberts.nl>
Niels langager Ellegaard <niels.ellegaard@gmail.com> Niels langager Ellegaard <niels.ellegaard@gmail.com>
@ -516,7 +580,7 @@ Olivier Saut <osaut@airpost.net>
Olle Jonsson <olle.jonsson@gmail.com> Olle Jonsson <olle.jonsson@gmail.com>
Or Brostovski <tohava@gmail.com> Or Brostovski <tohava@gmail.com>
Oren Hazi <oren.hazi@gmail.com> Oren Hazi <oren.hazi@gmail.com>
Orphée Lafond-Lummis <o@orftz.com> Orpheus Lummis <o@orpheuslummis.com>
P1start <rewi-github@whanau.org> P1start <rewi-github@whanau.org>
Pablo Brasero <pablo@pablobm.com> Pablo Brasero <pablo@pablobm.com>
Palmer Cox <p@lmercox.com> Palmer Cox <p@lmercox.com>
@ -527,6 +591,7 @@ Patrick Walton <pcwalton@mimiga.net>
Patrick Yevsukov <patrickyevsukov@users.noreply.github.com> Patrick Yevsukov <patrickyevsukov@users.noreply.github.com>
Patrik Kårlin <patrik.karlin@gmail.com> Patrik Kårlin <patrik.karlin@gmail.com>
Paul Collier <paul@paulcollier.ca> Paul Collier <paul@paulcollier.ca>
Paul Crowley <paulcrowley@google.com>
Paul Stansifer <paul.stansifer@gmail.com> Paul Stansifer <paul.stansifer@gmail.com>
Paul Woolcock <pwoolcoc+github@gmail.com> Paul Woolcock <pwoolcoc+github@gmail.com>
Pavel Panchekha <me@pavpanchekha.com> Pavel Panchekha <me@pavpanchekha.com>
@ -537,6 +602,7 @@ Peter Atashian <retep998@gmail.com>
Peter Elmers <peter.elmers@yahoo.com> Peter Elmers <peter.elmers@yahoo.com>
Peter Hull <peterhull90@gmail.com> Peter Hull <peterhull90@gmail.com>
Peter Marheine <peter@taricorp.net> Peter Marheine <peter@taricorp.net>
Peter Schuller <peter.schuller@infidyne.com>
Peter Williams <peter@newton.cx> Peter Williams <peter@newton.cx>
Peter Zotov <whitequark@whitequark.org> Peter Zotov <whitequark@whitequark.org>
Petter Remen <petter.remen@gmail.com> Petter Remen <petter.remen@gmail.com>
@ -545,12 +611,15 @@ Phil Ruffwind <rf@rufflewind.com>
Philip Munksgaard <pmunksgaard@gmail.com> Philip Munksgaard <pmunksgaard@gmail.com>
Philipp Brüschweiler <blei42@gmail.com> Philipp Brüschweiler <blei42@gmail.com>
Philipp Gesang <phg42.2a@gmail.com> Philipp Gesang <phg42.2a@gmail.com>
Pierre Baillet <pierre@baillet.name>
Piotr Czarnecki <pioczarn@gmail.com> Piotr Czarnecki <pioczarn@gmail.com>
Piotr Jawniak <sawyer47@gmail.com> Piotr Jawniak <sawyer47@gmail.com>
Piotr Szotkowski <chastell@chastell.net> Piotr Szotkowski <chastell@chastell.net>
Piotr Zolnierek <pz@anixe.pl> Piotr Zolnierek <pz@anixe.pl>
Potpourri <pot_pourri@mail.ru>
Pradeep Kumar <gohanpra@gmail.com> Pradeep Kumar <gohanpra@gmail.com>
Prudhvi Krishna Surapaneni <me@prudhvi.net> Prudhvi Krishna Surapaneni <me@prudhvi.net>
Pyfisch <pyfisch@gmail.com>
Pythoner6 <pythoner6@gmail.com> Pythoner6 <pythoner6@gmail.com>
Q.P.Liu <qpliu@yahoo.com> Q.P.Liu <qpliu@yahoo.com>
Rafael Ávila de Espíndola <respindola@mozilla.com> Rafael Ávila de Espíndola <respindola@mozilla.com>
@ -560,8 +629,10 @@ Ramkumar Ramachandra <artagnon@gmail.com>
Randati <anttivan@gmail.com> Randati <anttivan@gmail.com>
Raphael Catolino <raphael.catolino@gmail.com> Raphael Catolino <raphael.catolino@gmail.com>
Raphael Speyer <rspeyer@gmail.com> Raphael Speyer <rspeyer@gmail.com>
Raul Gutierrez S <rgs@itevenworks.net>
Ray Clanan <rclanan@utopianconcept.com> Ray Clanan <rclanan@utopianconcept.com>
Reilly Watson <reillywatson@gmail.com> Reilly Watson <reillywatson@gmail.com>
Renato Alves <alves.rjc@gmail.com>
Renato Riccieri Santos Zannon <renato@rrsz.com.br> Renato Riccieri Santos Zannon <renato@rrsz.com.br>
Renato Zannon <renato@rrsz.com.br> Renato Zannon <renato@rrsz.com.br>
Reuben Morais <reuben.morais@gmail.com> Reuben Morais <reuben.morais@gmail.com>
@ -581,7 +652,7 @@ Robert Knight <robertknight@gmail.com>
Robert Millar <robert.millar@cantab.net> Robert Millar <robert.millar@cantab.net>
Robin Gloster <robin@loc-com.de> Robin Gloster <robin@loc-com.de>
Robin Stocker <robin@nibor.org> Robin Stocker <robin@nibor.org>
Rohit Joshi <rohit.joshi@capitalone.com> Rohit Joshi <rohitjoshi@users.noreply.github.com>
Roland Tanglao <roland@rolandtanglao.com> Roland Tanglao <roland@rolandtanglao.com>
Rolf Timmermans <rolftimmermans@voormedia.com> Rolf Timmermans <rolftimmermans@voormedia.com>
Rolf van de Krol <info@rolfvandekrol.nl> Rolf van de Krol <info@rolfvandekrol.nl>
@ -590,6 +661,7 @@ Roy Crihfield <rscrihf@gmail.com>
Roy Frostig <rfrostig@mozilla.com> Roy Frostig <rfrostig@mozilla.com>
Russell <rpjohnst@gmail.com> Russell <rpjohnst@gmail.com>
Ruud van Asseldonk <dev@veniogames.com> Ruud van Asseldonk <dev@veniogames.com>
Ryan Levick <ryan@6wunderkinder.com>
Ryan Mulligan <ryan@ryantm.com> Ryan Mulligan <ryan@ryantm.com>
Ryan Scheel <ryan.havvy@gmail.com> Ryan Scheel <ryan.havvy@gmail.com>
Ryman <haqkrs@gmail.com> Ryman <haqkrs@gmail.com>
@ -612,14 +684,18 @@ Sean Gillespie <sean.william.g@gmail.com>
Sean Jensen-Grey <seanj@xyke.com> Sean Jensen-Grey <seanj@xyke.com>
Sean McArthur <sean.monstar@gmail.com> Sean McArthur <sean.monstar@gmail.com>
Sean Moon <ssamoon@ucla.edu> Sean Moon <ssamoon@ucla.edu>
Sean Patrick Santos <SeanPatrickSantos@gmail.com>
Sean Stangl <sstangl@mozilla.com> Sean Stangl <sstangl@mozilla.com>
Sean T Allen <sean@monkeysnatchbanana.com> Sean T Allen <sean@monkeysnatchbanana.com>
Sebastian Gesemann <s.gesemann@gmail.com>
Sebastian N. Fernandez <cachobot@gmail.com> Sebastian N. Fernandez <cachobot@gmail.com>
Sebastian Rasmussen <sebras@gmail.com>
Sebastian Zaha <sebastian.zaha@gmail.com> Sebastian Zaha <sebastian.zaha@gmail.com>
Sebastien Martini <seb@dbzteam.org> Sebastien Martini <seb@dbzteam.org>
Seo Sanghyeon <sanxiyn@gmail.com> Seo Sanghyeon <sanxiyn@gmail.com>
Seonghyun Kim <sh8281.kim@samsung.com> Seonghyun Kim <sh8281.kim@samsung.com>
Sergio Benitez <sbenitez@mit.edu> Sergio Benitez <sbenitez@mit.edu>
Seth Faxon <seth.faxon@gmail.com>
Seth Pink <sethpink@gmail.com> Seth Pink <sethpink@gmail.com>
Seth Pollack <sethpollack@users.noreply.github.com> Seth Pollack <sethpollack@users.noreply.github.com>
Shamir Khodzha <khodzha.sh@gmail.com> Shamir Khodzha <khodzha.sh@gmail.com>
@ -636,6 +712,8 @@ Stefan Plantikow <stefan.plantikow@googlemail.com>
Stepan Koltsov <stepan.koltsov@gmail.com> Stepan Koltsov <stepan.koltsov@gmail.com>
Sterling Greene <sterling.greene@gmail.com> Sterling Greene <sterling.greene@gmail.com>
Steve Klabnik <steve@steveklabnik.com> Steve Klabnik <steve@steveklabnik.com>
Steven Allen <steven@stebalien.com>
Steven Crockett <crockett.j.steven@gmail.com>
Steven De Coeyer <steven@banteng.be> Steven De Coeyer <steven@banteng.be>
Steven Fackler <sfackler@gmail.com> Steven Fackler <sfackler@gmail.com>
Steven Sheldon <steven@sasheldon.com> Steven Sheldon <steven@sasheldon.com>
@ -646,41 +724,53 @@ Subhash Bhushan <subhash.bhushan@kaybus.com>
Sylvestre Ledru <sylvestre@debian.org> Sylvestre Ledru <sylvestre@debian.org>
Sébastien Chauvel <eichi237@mailoo.org> Sébastien Chauvel <eichi237@mailoo.org>
Sébastien Crozet <developer@crozet.re> Sébastien Crozet <developer@crozet.re>
Sébastien Marie <semarie@users.noreply.github.com>
Sébastien Paolacci <sebastien.paolacci@gmail.com> Sébastien Paolacci <sebastien.paolacci@gmail.com>
Tamir Duberstein <tamird@squareup.com> Tamir Duberstein <tamird@squareup.com>
Taras Shpot <mrshpot@gmail.com> Taras Shpot <mrshpot@gmail.com>
Taylor Hutchison <seanthutchison@gmail.com> Taylor Hutchison <seanthutchison@gmail.com>
Ted Horst <ted.horst@earthlink.net> Ted Horst <ted.horst@earthlink.net>
Thad Guidry <thadguidry@gmail.com> Thad Guidry <thadguidry@gmail.com>
Thiago Carvalho <thiago.carvalho@westwing.de>
Thomas Backman <serenity@exscape.org> Thomas Backman <serenity@exscape.org>
Thomas Daede <daede003@umn.edu> Thomas Daede <daede003@umn.edu>
Till Hoeppner <till@hoeppner.ws> Till Hoeppner <till@hoeppner.ws>
Tim Brooks <tim.brooks@staples.com> Tim Brooks <brooks@cern.ch>
Tim Chevalier <chevalier@alum.wellesley.edu> Tim Chevalier <chevalier@alum.wellesley.edu>
Tim Cuthbertson <tim@gfxmonk.net>
Tim Dumol <tim@timdumol.com>
Tim Joseph Dumol <tim@timdumol.com> Tim Joseph Dumol <tim@timdumol.com>
Tim Kuehn <tkuehn@cmu.edu> Tim Kuehn <tkuehn@cmu.edu>
Tim Parenti <timparenti@gmail.com>
Tim Taubert <tim@timtaubert.de> Tim Taubert <tim@timtaubert.de>
Timon Rapp <timon@zaeda.net> Timon Rapp <timon@zaeda.net>
Timothée Ravier <tim@siosm.fr> Timothée Ravier <tim@siosm.fr>
Titouan Vervack <tivervac@gmail.com> Titouan Vervack <tivervac@gmail.com>
Tobba <tobias.haegermarck@gmail.com> Tobba <tobias.haegermarck@gmail.com>
Tobias Bucher <tobiasbucher5991@gmail.com> Tobias Bucher <tobiasbucher5991@gmail.com>
Toby Scrace <toby.scrace@gmail.com>
Tohava <tohava@tohava-laptop.(none)> Tohava <tohava@tohava-laptop.(none)>
Tom Chittenden <thchittenden@cmu.edu>
Tom Jakubowski <tom@crystae.net> Tom Jakubowski <tom@crystae.net>
Tom Lee <github@tomlee.co> Tom Lee <github@tomlee.co>
Tomas Sedovic <tomas@sedovic.cz> Tomas Sedovic <tomas@sedovic.cz>
Tommy M. McGuire <mcguire@crsr.net> Tommy M. McGuire <mcguire@crsr.net>
Tomoki Aonuma <uasi@99cm.org> Tomoki Aonuma <uasi@99cm.org>
Toni Cárdenas <toni@tcardenas.me>
Tony Young <tony@rfw.name> Tony Young <tony@rfw.name>
Torsten Weber <TorstenWeber12@gmail.com> Torsten Weber <TorstenWeber12@gmail.com>
Travis Watkins <amaranth@ubuntu.com>
Trent Ogren <tedwardo2@gmail.com> Trent Ogren <tedwardo2@gmail.com>
Trinick <slicksilver555@mac.com> Trinick <slicksilver555@mac.com>
Tristan Storch <tstorch@math.uni-bielefeld.de>
Tshepang Lekhonkhobe <tshepang@gmail.com> Tshepang Lekhonkhobe <tshepang@gmail.com>
Tuncer Ayaz <tuncer.ayaz@gmail.com> Tuncer Ayaz <tuncer.ayaz@gmail.com>
TyOverby <ty@pre-alpha.com> TyOverby <ty@pre-alpha.com>
Tycho Sci <tychosci@gmail.com> Tycho Sci <tychosci@gmail.com>
Tyler Bindon <martica@martica.org> Tyler Bindon <martica@martica.org>
Tyler Thrailkill <tylerbthrailkill@gmail.com>
U-NOV2010\eugals U-NOV2010\eugals
Ulrik Sverdrup <root@localhost>
Ulysse Carion <ulysse@ulysse.io> Ulysse Carion <ulysse@ulysse.io>
Utkarsh Kukreti <utkarshkukreti@gmail.com> Utkarsh Kukreti <utkarshkukreti@gmail.com>
Uwe Dauernheim <uwe@dauernheim.net> Uwe Dauernheim <uwe@dauernheim.net>
@ -690,6 +780,7 @@ Valentin Tsatskin <vtsatskin@mozilla.com>
Valerii Hiora <valerii.hiora@gmail.com> Valerii Hiora <valerii.hiora@gmail.com>
Victor Berger <victor.berger@m4x.org> Victor Berger <victor.berger@m4x.org>
Victor van den Elzen <victor.vde@gmail.com> Victor van den Elzen <victor.vde@gmail.com>
Victory <git@dfhu.org>
Vijay Korapaty <rust@korapaty.com> Vijay Korapaty <rust@korapaty.com>
Viktor Dahl <pazaconyoman@gmail.com> Viktor Dahl <pazaconyoman@gmail.com>
Vincent Belliard <vincent@famillebelliard.fr> Vincent Belliard <vincent@famillebelliard.fr>
@ -700,11 +791,15 @@ Vivek Galatage <vivekgalatage@gmail.com>
Vladimir Matveev <vladimir.matweev@gmail.com> Vladimir Matveev <vladimir.matweev@gmail.com>
Vladimir Pouzanov <farcaller@gmail.com> Vladimir Pouzanov <farcaller@gmail.com>
Vladimir Smola <smola.vladimir@gmail.com> Vladimir Smola <smola.vladimir@gmail.com>
Vojtech Kral <vojtech@kral.hk>
Volker Mische <volker.mische@gmail.com> Volker Mische <volker.mische@gmail.com>
Wade Mealing <wmealing@gmail.com> Wade Mealing <wmealing@gmail.com>
Wangshan Lu <wisagan@gmail.com>
WebeWizard <webewizard@gmail.com> WebeWizard <webewizard@gmail.com>
Wendell Smith <wendell.smith@yale.edu> Wendell Smith <wendell.smith@yale.edu>
Will <will@glozer.net>
William Ting <io@williamting.com> William Ting <io@williamting.com>
Willson Mock <willson.mock@gmail.com>
Yasuhiro Fujii <y-fujii@mimosa-pudica.net> Yasuhiro Fujii <y-fujii@mimosa-pudica.net>
YawarRaza7349 <YawarRaza7349@gmail.com> YawarRaza7349 <YawarRaza7349@gmail.com>
Yazhong Liu <yorkiefixer@gmail.com> Yazhong Liu <yorkiefixer@gmail.com>
@ -728,10 +823,12 @@ arturo <arturo@openframeworks.cc>
auREAX <mark@xn--hwg34fba.ws> auREAX <mark@xn--hwg34fba.ws>
b1nd <clint.ryan3@gmail.com> b1nd <clint.ryan3@gmail.com>
bachm <Ab@vapor.com> bachm <Ab@vapor.com>
blackbeam <aikorsky@gmail.com>
blake2-ppc <ulrik.sverdrup@gmail.com> blake2-ppc <ulrik.sverdrup@gmail.com>
bluss <bluss> bluss <bluss>
bombless <bombless@126.com> bombless <bombless@126.com>
bors <bors@rust-lang.org> bors <bors@rust-lang.org>
caipre <platt.nicholas@gmail.com>
chitra chitra
chromatic <chromatic@wgz.org> chromatic <chromatic@wgz.org>
comex <comexk@gmail.com> comex <comexk@gmail.com>
@ -742,6 +839,7 @@ dgoon <dgoon@dgoon.net>
donkopotamus <general@chocolate-fish.com> donkopotamus <general@chocolate-fish.com>
eliovir <eliovir@gmail.com> eliovir <eliovir@gmail.com>
elszben <notgonna@tellyou> elszben <notgonna@tellyou>
emanueLczirai <emanueLczirai@cryptoLab.net>
flo-l <lacknerflo@gmail.com> flo-l <lacknerflo@gmail.com>
fort <e@mail.com> fort <e@mail.com>
free-Runner <aali07@students.poly.edu> free-Runner <aali07@students.poly.edu>
@ -753,6 +851,7 @@ hansjorg <hansjorg@gmail.com>
iancormac84 <wilnathan@gmail.com> iancormac84 <wilnathan@gmail.com>
inrustwetrust <inrustwetrust@users.noreply.github.com> inrustwetrust <inrustwetrust@users.noreply.github.com>
jamesluke <jamesluke@users.noreply.github.com> jamesluke <jamesluke@users.noreply.github.com>
jatinn <jatinn@users.noreply.github.com>
jbranchaud <jbranchaud@gmail.com> jbranchaud <jbranchaud@gmail.com>
jfager <jfager@gmail.com> jfager <jfager@gmail.com>
jmgrosen <jmgrosen@gmail.com> jmgrosen <jmgrosen@gmail.com>
@ -763,6 +862,7 @@ juxiliary <juxiliary@gmail.com>
jxv <joevargas@hush.com> jxv <joevargas@hush.com>
klutzy <klutzytheklutzy@gmail.com> klutzy <klutzytheklutzy@gmail.com>
korenchkin <korenchkin2@gmail.com> korenchkin <korenchkin2@gmail.com>
kud1ing <github@kudling.de>
kulakowski <george.kulakowski@gmail.com> kulakowski <george.kulakowski@gmail.com>
kvark <kvarkus@gmail.com> kvark <kvarkus@gmail.com>
kwantam <kwantam@gmail.com> kwantam <kwantam@gmail.com>
@ -770,6 +870,7 @@ lpy <pylaurent1314@gmail.com>
lucy <ne.tetewi@gmail.com> lucy <ne.tetewi@gmail.com>
lyuts <dioxinu@gmail.com> lyuts <dioxinu@gmail.com>
m-r-r <raybaudroigm@gmail.com> m-r-r <raybaudroigm@gmail.com>
madmalik <matthias.tellen@googlemail.com>
maikklein <maikklein@googlemail.com> maikklein <maikklein@googlemail.com>
masklinn <github.com@masklinn.net> masklinn <github.com@masklinn.net>
mchaput <matt@whoosh.ca> mchaput <matt@whoosh.ca>
@ -779,12 +880,14 @@ moonglum <moonglum@moonbeamlabs.com>
mr.Shu <mr@shu.io> mr.Shu <mr@shu.io>
mrec <mike.capp@gmail.com> mrec <mike.capp@gmail.com>
musitdev <philippe.delrieu@free.fr> musitdev <philippe.delrieu@free.fr>
nathan dotz <nathan.dotz@gmail.com>
nham <hamann.nick@gmail.com> nham <hamann.nick@gmail.com>
noam <noam@clusterfoo.com> noam <noam@clusterfoo.com>
novalis <novalis@novalis.org> novalis <novalis@novalis.org>
oli-obk <github6541940@oli-obk.de> oli-obk <github6541940@oli-obk.de>
olivren <o.renaud@gmx.fr> olivren <o.renaud@gmx.fr>
osa1 <omeragacan@gmail.com> osa1 <omeragacan@gmail.com>
posixphreak <posixphreak@gmail.com>
qwitwa <qwitwa@gmail.com> qwitwa <qwitwa@gmail.com>
reedlepee <reedlepee123@gmail.com> reedlepee <reedlepee123@gmail.com>
rjz <rj@rjzaworski.com> rjz <rj@rjzaworski.com>
@ -799,9 +902,11 @@ thiagopnts <thiagopnts@gmail.com>
tinaun <tinagma@gmail.com> tinaun <tinagma@gmail.com>
tshakah <tshakah@gmail.com> tshakah <tshakah@gmail.com>
ville-h <ville3.14159@gmail.com> ville-h <ville3.14159@gmail.com>
visualfc <visualfc@gmail.com>
we <vadim.petrochenkov@gmail.com> we <vadim.petrochenkov@gmail.com>
whataloadofwhat <unusualmoniker@gmail.com> whataloadofwhat <unusualmoniker@gmail.com>
wickerwaka <martin.donlon@gmail.com> wickerwaka <martin.donlon@gmail.com>
wonyong kim <wonyong.kim@samsung.com>
xales <xales@naveria.com> xales <xales@naveria.com>
zofrex <zofrex@gmail.com> zofrex <zofrex@gmail.com>
zslayton <zack.slayton@gmail.com> zslayton <zack.slayton@gmail.com>

View File

@ -1,60 +1,156 @@
## How to submit a bug report # Contributing to Rust
If you're just reporting a bug, please see: Thank you for your interest in contributing to Rust! There are many ways to
contribute, and we appreciate all of them. This document is a bit long, so here's
links to the major sections:
http://doc.rust-lang.org/complement-bugreport.html * [Feature Requests](#feature-requests)
* [Bug Reports](#bug-reports)
* [Pull Requests](#pull-requests)
* [Writing Documentation](#writing-documentation)
* [Issue Triage](#issue-triage)
* [Out-of-tree Contributions](#out-of-tree-contributions)
## Submitting an issue If you have questions, please make a post on [internals.rust-lang.org][internals] or
hop on [#rust-internals][pound-rust-internals].
Please submit issues here for bug reports or implementation details. For feature As a reminder, all contributors are expected to follow our [Code of Conduct](coc).
requests, language changes, or major changes to the libraries, please submit an
issue against the [RFCs repository](https://github.com/rust-lang/rfcs).
## Pull request procedure
Pull requests should be targeted at Rust's `master` branch.
Before pushing to your Github repo and issuing the pull request,
please do two things:
1. [Rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) your
local changes against the `master` branch. Resolve any conflicts
that arise.
2. Run the full Rust test suite with the `make check` command. You're
not off the hook even if you just stick to documentation; code
examples in the docs are tested as well! Although for simple
wording or grammar fixes, this is probably unnecessary.
Pull requests will be treated as "review requests", and we will give
feedback we expect to see corrected on
[style](https://github.com/rust-lang/rust/wiki/Note-style-guide) and
substance before pulling. Changes contributed via pull request should
focus on a single issue at a time, like any other. We will not accept
pull-requests that try to "sneak" unrelated changes in.
Normally, all pull requests must include regression tests (see
[Note-testsuite](https://github.com/rust-lang/rust/wiki/Note-testsuite))
that test your change. Occasionally, a change will be very difficult
to test for. In those cases, please include a note in your commit
message explaining why.
In the licensing header at the beginning of any files you change,
please make sure the listed date range includes the current year. For
example, if it's 2014, and you change a Rust file that was created in
2010, it should begin:
```
// Copyright 2010-2014 The Rust Project Developers.
```
# Coordination and communication
Get feedback from other developers on
[discuss.rust-lang.org][discuss], and
[#rust-internals][pound-rust-internals].
[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals [pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
[discuss]: http://discuss.rust-lang.org [internals]: http://internals.rust-lang.org
[coc]: http://www.rust-lang.org/conduct.html
For more details, please refer to ## Feature Requests
[Note-development-policy](https://github.com/rust-lang/rust/wiki/Note-development-policy).
To request a change to the way that the Rust language works, please open an
issue in the [RFCs repository](https://github.com/rust-lang/rfcs/issues/new)
rather than this one. New features and other significant language changes
must go through the RFC process.
## Bug Reports
While bugs are unfortunate, they're a reality in software. We can't fix what we
don't know about, so please report liberally. If you're not sure if something
is a bug or not, feel free to file a bug anyway.
If you have the chance, before reporting a bug, please [search existing
issues](https://github.com/rust-lang/rust/search?q=&type=Issues&utf8=%E2%9C%93),
as it's possible that someone else has already reported your error. This doesn't
always work, and sometimes it's hard to know what to search for, so consider this
extra credit. We won't mind if you accidentally file a duplicate report.
Opening an issue is as easy as following [this
link](https://github.com/rust-lang/rust/issues/new) and filling out the fields.
Here's a template that you can use to file a bug, though it's not necessary to
use it exactly:
<short summary of the bug>
I tried this code:
<code sample that causes the bug>
I expected to see this happen: <explanation>
Instead, this happened: <explanation>
## Meta
`rustc --version --verbose`:
Backtrace:
All three components are important: what you did, what you expected, what
happened instead. Please include the output of `rustc --version --verbose`,
which includes important information about what platform you're on, what
version of Rust you're using, etc.
Sometimes, a backtrace is helpful, and so including that is nice. To get
a backtrace, set the `RUST_BACKTRACE` environment variable. The easiest way
to do this is to invoke `rustc` like this:
```bash
$ RUST_BACKTRACE=1 rustc ...
```
## Pull Requests
Pull requests are the primary mechanism we use to change Rust. GitHub itself
has some [great documentation][pull-requests] on using the Pull Request
feature. We use the 'fork and pull' model described there.
[pull-requests]: https://help.github.com/articles/using-pull-requests/
Please make pull requests against the `master` branch.
All pull requests are reviewed by another person. We have a bot,
@rust-highfive, that will automatically assign a random person to review your request.
If you want to request that a specific person reviews your pull request,
you can add an `r?` to the message. For example, Steve usually reviews
documentation changes. So if you were to make a documentation change, add
r? @steveklabnik
to the end of the message, and @rust-highfive will assign @steveklabnik instead
of a random person. This is entirely optional.
After someone has reviewed your pull request, they will leave an annotation
on the pull request with an `r+`. It will look something like this:
@bors: r+ 38fe8d2
This tells @bors, our lovable integration bot, that your pull request has
been approved. The PR then enters the [merge queue][merge-queue], where @bors
will run all the tests on every platform we support. If it all works out,
@bors will merge your code into `master` and close the pull request.
[merge-queue]: http://buildbot.rust-lang.org/homu/queue/rust
## Writing Documentation
Documentation improvements are very welcome. The source of `doc.rust-lang.org`
is located in `src/doc` in the tree, and standard API documentation is generated
from the source code itself.
Documentation pull requests function in the same as other pull requests, though
you may see a slightly different form of `r+`:
@bors: r+ 38fe8d2 rollup
That additional `rollup` tells @bors that this change is eligible for a 'rollup'.
To save @bors some work, and to get small changes through more quickly, when
@bors attempts to merge a commit that's rollup-eligible, it will also merge
the other rollup-eligible patches too, and they'll get tested and merged at
the same time.
## Issue Triage
Sometimes, an issue will stay open, even though the bug has been fixed. And
sometimes, the original bug may go stale because something has changed in the
meantime.
It can be helpful to go through older bug reports and make sure that they are
still valid. Load up an older issue, double check that it's still true, and
leave a comment letting us know if it is or is not. The [least recently updated sort][lru] is good for finding issues like this.
[lru]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-asc
## Out-of-tree Contributions
There are a number of other ways to contribute to Rust that don't deal with
this repository.
Answer questions in [#rust][pound-rust], or on [users.rust-lang.org][users],
or on [StackOverflow][so].
Participate in the [RFC process](https://github.com/rust-lang/rfcs).
Find a [requested community library][community-library], build it, and publish
it to [Crates.io](http://crates.io). Easier said than done, but very, very
valuable!
[pound-rust]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
[users]: http://users.rust-lang.org/
[so]: http://stackoverflow.com/questions/tagged/rust
[community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library

View File

@ -6,7 +6,7 @@ terms.
Longer version: Longer version:
The Rust Project is copyright 2014, The Rust Project The Rust Project is copyright 2015, The Rust Project
Developers (given in the file AUTHORS.txt). Developers (given in the file AUTHORS.txt).
Licensed under the Apache License, Version 2.0 Licensed under the Apache License, Version 2.0
@ -23,12 +23,12 @@ The following third party packages are included, and carry
their own copyright notices and license terms: their own copyright notices and license terms:
* Two header files that are part of the Valgrind * Two header files that are part of the Valgrind
package. These files are found at src/rt/vg/valgrind.h and package. These files are found at src/rt/valgrind/valgrind.h and
src/rt/vg/memcheck.h, within this distribution. These files src/rt/valgrind/memcheck.h, within this distribution. These files
are redistributed under the following terms, as noted in are redistributed under the following terms, as noted in
them: them:
for src/rt/vg/valgrind.h: for src/rt/valgrind/valgrind.h:
This file is part of Valgrind, a dynamic binary This file is part of Valgrind, a dynamic binary
instrumentation framework. instrumentation framework.
@ -74,7 +74,7 @@ their own copyright notices and license terms:
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE. OF SUCH DAMAGE.
for src/rt/vg/memcheck.h: for src/rt/valgrind/memcheck.h:
This file is part of MemCheck, a heavyweight Valgrind This file is part of MemCheck, a heavyweight Valgrind
tool for detecting memory errors. tool for detecting memory errors.
@ -120,18 +120,6 @@ their own copyright notices and license terms:
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE. OF SUCH DAMAGE.
* The auxiliary file src/etc/pkg/modpath.iss contains a
library routine compiled, by Inno Setup, into the Windows
installer binary. This file is licensed under the LGPL,
version 3, but, in our legal interpretation, this does not
affect the aggregate "collected work" license of the Rust
distribution (MIT/ASL2) nor any other components of it. We
believe that the terms governing distribution of the
binary Windows installer built from modpath.iss are
therefore LGPL, but not the terms governing distribution
of any of the files installed by such an installer (such
as the Rust compiler or runtime libraries themselves).
* The src/rt/miniz.c file, carrying an implementation of * The src/rt/miniz.c file, carrying an implementation of
RFC1950/RFC1951 DEFLATE, by Rich Geldreich RFC1950/RFC1951 DEFLATE, by Rich Geldreich
<richgel99@gmail.com>. All uses of this file are <richgel99@gmail.com>. All uses of this file are

View File

@ -1,4 +1,4 @@
Copyright (c) 2014 The Rust Project Developers Copyright (c) 2015 The Rust Project Developers
Permission is hereby granted, free of charge, to any Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated person obtaining a copy of this software and associated

View File

@ -59,6 +59,9 @@
# * check-stage$(stage)-$(crate) - Test a crate in a specific stage # * check-stage$(stage)-$(crate) - Test a crate in a specific stage
# * check-stage$(stage)-{rpass,rfail,cfail,rmake,...} - Run tests in src/test/ # * check-stage$(stage)-{rpass,rfail,cfail,rmake,...} - Run tests in src/test/
# * check-stage1-T-$(target)-H-$(host) - Run cross-compiled-tests # * check-stage1-T-$(target)-H-$(host) - Run cross-compiled-tests
# * tidy-basic - show file / line stats
# * tidy-errors - show the highest rustc error code
# * tidy-features - show the status of language and lib features
# #
# Then mix in some of these environment variables to harness the # Then mix in some of these environment variables to harness the
# ultimate power of The Rust Build System. # ultimate power of The Rust Build System.
@ -97,10 +100,9 @@
# make check-stage1-std RUST_TEST_TASKS=1 # make check-stage1-std RUST_TEST_TASKS=1
# #
# This is hardly all there is to know of The Rust Build System's # This is hardly all there is to know of The Rust Build System's
# mysteries. The tale continues on the wiki[1][2]. # mysteries. The tale continues on the wiki[1].
# #
# [1]: https://github.com/rust-lang/rust/wiki/Note-getting-started-developing-Rust # [1]: https://github.com/rust-lang/rust/wiki/Note-testsuite
# [2]: https://github.com/rust-lang/rust/wiki/Note-testsuite
# #
# If you really feel like getting your hands dirty, then: # If you really feel like getting your hands dirty, then:
# #

View File

@ -1,46 +1,34 @@
# The Rust Programming Language # The Rust Programming Language
This is a compiler for Rust, including standard libraries, tools and This is a compiler for Rust, including standard libraries, tools and
documentation. documentation. Rust is a systems programming language that is fast,
memory safe and multithreaded, but does not employ a garbage collector
or otherwise impose significant runtime overhead.
## Quick Start ## Quick Start
1. Download a [binary installer][installer] for your platform. Read ["Installing Rust"] from [The Book].
2. Read [The Rust Programming Language][trpl].
3. Enjoy!
> ***Note:*** Windows users can read the detailed ["Installing Rust"]: http://doc.rust-lang.org/book/installing-rust.html
> [using Rust on Windows][win-wiki] notes on the wiki. [The Book]: http://doc.rust-lang.org/book/index.html
[installer]: http://www.rust-lang.org/install.html
[trpl]: http://doc.rust-lang.org/book/index.html
[win-wiki]: https://github.com/rust-lang/rust/wiki/Using-Rust-on-Windows
## Building from Source ## Building from Source
1. Make sure you have installed the dependencies: 1. Make sure you have installed the dependencies:
* `g++` 4.7 or `clang++` 3.x * `g++` 4.7 or `clang++` 3.x
* `python` 2.6 or later (but not 3.x) * `python` 2.6 or later (but not 3.x)
* `perl` 5.0 or later
* GNU `make` 3.81 or later * GNU `make` 3.81 or later
* `curl` * `curl`
* `git` * `git`
2. Download and build Rust:
You can either download a [tarball] or build directly from the [repo]. 2. Clone the [source] with `git`:
To build from the [tarball] do:
$ curl -O https://static.rust-lang.org/dist/rust-nightly.tar.gz
$ tar -xzf rust-nightly.tar.gz
$ cd rust-nightly
Or to build from the [repo] do:
$ git clone https://github.com/rust-lang/rust.git $ git clone https://github.com/rust-lang/rust.git
$ cd rust $ cd rust
Now that you have Rust's source code, you can configure and build it: [source]: https://github.com/rust-lang/rust
3. Build and install:
$ ./configure $ ./configure
$ make && make install $ make && make install
@ -52,31 +40,35 @@ documentation.
When complete, `make install` will place several programs into When complete, `make install` will place several programs into
`/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the `/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the
API-documentation tool. API-documentation tool. This install does not include [Cargo],
3. Read [The Rust Programming Language][trpl]. Rust's package manager, which you may also want to build.
4. Enjoy!
[Cargo]: https://github.com/rust-lang/cargo
### Building on Windows ### Building on Windows
To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/msys2/): To easily build on windows we can use [MSYS2](http://msys2.github.io/):
1. Grab the latest MSYS2 installer and go through the installer. 1. Grab the latest MSYS2 installer and go through the installer.
2. Now from the MSYS2 terminal we want to install the mingw64 toolchain and the other 2. Now from the MSYS2 terminal we want to install the mingw64 toolchain and the other
tools we need. tools we need.
```bash
# choose one based on platform
$ pacman -S mingw-w64-i686-toolchain $ pacman -S mingw-w64-i686-toolchain
$ pacman -S base-devel $ pacman -S mingw-w64-x86_64-toolchain
3. With that now start `mingw32_shell.bat` from where you installed MSYS2 (i.e. `C:\msys`). $ pacman -S base-devel
```
3. With that now start `mingw32_shell.bat` or `mingw64_shell.bat`
from where you installed MSYS2 (i.e. `C:\msys`). Which one you
choose depends on if you want 32 or 64 bit Rust.
4. From there just navigate to where you have Rust's source code, configure and build it: 4. From there just navigate to where you have Rust's source code, configure and build it:
$ ./configure $ ./configure
$ make && make install $ make && make install
[repo]: https://github.com/rust-lang/rust
[tarball]: https://static.rust-lang.org/dist/rust-nightly.tar.gz
[trpl]: http://doc.rust-lang.org/book/index.html
## Notes ## Notes
Since the Rust compiler is written in Rust, it must be built by a Since the Rust compiler is written in Rust, it must be built by a
@ -96,21 +88,33 @@ supported build environments that are most likely to work.
Rust currently needs about 1.5 GiB of RAM to build without swapping; if it hits Rust currently needs about 1.5 GiB of RAM to build without swapping; if it hits
swap, it will take a very long time to build. swap, it will take a very long time to build.
There is a lot more documentation in the [wiki]. There is more advice about hacking on Rust in [CONTRIBUTING.md].
[wiki]: https://github.com/rust-lang/rust/wiki [CONTRIBUTING.md]: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md
## Getting help and getting involved ## Getting help
The Rust community congregates in a few places: The Rust community congregates in a few places:
* [StackOverflow] - Get help here. * [StackOverflow] - Direct questions about using the language here.
* [/r/rust] - General discussion. * [users.rust-lang.org] - General discussion, broader questions.
* [discuss.rust-lang.org] - For development of the Rust language itself. * [/r/rust] - News and general discussion.
[StackOverflow]: http://stackoverflow.com/questions/tagged/rust [StackOverflow]: http://stackoverflow.com/questions/tagged/rust
[/r/rust]: http://reddit.com/r/rust [/r/rust]: http://reddit.com/r/rust
[discuss.rust-lang.org]: http://discuss.rust-lang.org/ [users.rust-lang.org]: http://users.rust-lang.org/
## Contributing
To contribute to Rust, please see [CONTRIBUTING.md](CONTRIBUTING.md).
Rust has an [IRC] culture and most real-time collaboration happens in a
variety of channels on Mozilla's IRC network, irc.mozilla.org. The
most popular channel is [#rust], a venue for general discussion about
Rust, and a good place to ask for help,
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
[#rust]: irc://irc.mozilla.org/rust
## License ## License

View File

@ -1,3 +1,102 @@
Version 1.0.0-alpha.2 (February 2015)
-------------------------------------
* ~1300 changes, numerous bugfixes
* Highlights
* The various I/O modules were [overhauled][io-rfc] to reduce
unncessary abstractions and provide better interoperation with
the underlying platform. The old `io` module remains temporarily
at `std::old_io`.
* The standard library now [partipates in feature gating][feat],
so use of unstable libraries now requires a `#![feature(...)]`
attribute. The impact of this change is [described on the
forum][feat-forum]. [RFC][feat-rfc].
* Language
* `for` loops [now operate on the `IntoIterator` trait][into],
which eliminates the need to call `.iter()`, etc. to iterate
over collections. There are some new subtleties to remember
though regarding what sort of iterators various types yield, in
particular that `for foo in bar { }` yields values from a move
iterator, destroying the original collection. [RFC][into-rfc].
* Objects now have [default lifetime bounds][obj], so you don't
have to write `Box<Trait+'static>` when you don't care about
storing references. [RFC][obj-rfc].
* In types that implement `Drop`, [lifetimes must outlive the
value][drop]. This will soon make it possible to safely
implement `Drop` for types where `#[unsafe_destructor]` is now
required. Read the [gorgeous RFC][drop-rfc] for details.
* The fully qualified <T as Trait>::X syntax lets you set the Self
type for a trait method or associated type. [RFC][ufcs-rfc].
* References to types that implement `Deref<U>` now [automatically
coerce to references][deref] to the dereferenced type `U`,
e.g. `&T where T: Deref<U>` automatically coerces to `&U`. This
should eliminate many unsightly uses of `&*`, as when converting
from references to vectors into references to
slices. [RFC][deref-rfc].
* The explicit [closure kind syntax][close] (`|&:|`, `|&mut:|`,
`|:|`) is obsolete and closure kind is inferred from context.
* [`Self` is a keyword][Self].
* Libraries
* The `Show` and `String` formatting traits [have been
renamed][fmt] to `Debug` and `Display` to more clearly reflect
their related purposes. Automatically getting a string
conversion to use with `format!("{:?}", something_to_debug)` is
now written `#[derive(Debug)]`.
* Abstract [OS-specific string types][osstr], `std::ff::{OsString,
OsStr}`, provide strings in platform-specific encodings for easier
interop with system APIs. [RFC][osstr-rfc].
* The `boxed::into_raw` and `Box::frow_raw` functions [convert
between `Box<T>` and `*mut T`][boxraw], a common pattern for
creating raw pointers.
* Tooling
* Certain long error messages of the form 'expected foo found bar'
are now [split neatly across multiple
lines][multiline]. Examples in the PR.
* On Unix Rust can be [uninstalled][un] by running
`/usr/local/lib/rustlib/uninstall.sh`.
* The `#[rustc_on_unimplemented]` attribute, requiring the
'on_unimplemented' feature, lets rustc [display custom error
messages when a trait is expected to be implemented for a type
but is not][onun].
* Misc
* Rust is tested against a [LALR grammar][lalr], which parses
almost all the Rust files that rustc does.
[boxraw]: https://github.com/rust-lang/rust/pull/21318
[close]: https://github.com/rust-lang/rust/pull/21843
[deref]: https://github.com/rust-lang/rust/pull/21351
[deref-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0241-deref-conversions.md
[drop]: https://github.com/rust-lang/rust/pull/21972
[drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
[feat]: https://github.com/rust-lang/rust/pull/21248
[feat-forum]: http://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
[feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
[fmt]: https://github.com/rust-lang/rust/pull/21457
[into]: https://github.com/rust-lang/rust/pull/20790
[into-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#intoiterator-and-iterable
[io-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
[lalr]: https://github.com/rust-lang/rust/pull/21452
[multiline]: https://github.com/rust-lang/rust/pull/19870
[obj]: https://github.com/rust-lang/rust/pull/22230
[obj-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md
[onun]: https://github.com/rust-lang/rust/pull/20889
[osstr]: https://github.com/rust-lang/rust/pull/21488
[osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
[Self]: https://github.com/rust-lang/rust/pull/22158
[ufcs]: https://github.com/rust-lang/rust/pull/21077
[ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
[un]: https://github.com/rust-lang/rust/pull/22256
Version 1.0.0-alpha (January 2015) Version 1.0.0-alpha (January 2015)
---------------------------------- ----------------------------------
@ -22,7 +121,7 @@ Version 1.0.0-alpha (January 2015)
* Documentation continues to be expanded with more API coverage, more * Documentation continues to be expanded with more API coverage, more
examples, and more in-depth explanations. The guides have been examples, and more in-depth explanations. The guides have been
consolidated into [The Rust Programming Language][trpl]. consolidated into [The Rust Programming Language][trpl].
* "Rust By Example" is now maintained by the Rust team. * "[Rust By Example][rbe]" is now maintained by the Rust team.
* All official Rust binary installers now come with [Cargo], the * All official Rust binary installers now come with [Cargo], the
Rust package manager. Rust package manager.
@ -182,6 +281,7 @@ Version 1.0.0-alpha (January 2015)
[assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md [assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
[ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871 [ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
[trpl]: http://doc.rust-lang.org/book/index.html [trpl]: http://doc.rust-lang.org/book/index.html
[rbe]: http://rustbyexample.com/
Version 0.12.0 (October 2014) Version 0.12.0 (October 2014)
----------------------------- -----------------------------

32
configure vendored
View File

@ -28,8 +28,8 @@ need_ok() {
need_cmd() { need_cmd() {
if command -v $1 >/dev/null 2>&1 if command -v $1 >/dev/null 2>&1
then msg "found $1" then msg "found program $1"
else err "need $1" else err "need program $1"
fi fi
} }
@ -340,6 +340,7 @@ need_cmd date
need_cmd tr need_cmd tr
need_cmd sed need_cmd sed
need_cmd file need_cmd file
need_cmd make
msg "inspecting environment" msg "inspecting environment"
@ -373,6 +374,10 @@ case $CFG_OSTYPE in
CFG_OSTYPE=unknown-dragonfly CFG_OSTYPE=unknown-dragonfly
;; ;;
OpenBSD)
CFG_OSTYPE=unknown-openbsd
;;
Darwin) Darwin)
CFG_OSTYPE=apple-darwin CFG_OSTYPE=apple-darwin
;; ;;
@ -448,6 +453,10 @@ case $CFG_CPUTYPE in
CFG_CPUTYPE=aarch64 CFG_CPUTYPE=aarch64
;; ;;
powerpc)
CFG_CPUTYPE=powerpc
;;
x86_64 | x86-64 | x64 | amd64) x86_64 | x86-64 | x64 | amd64)
CFG_CPUTYPE=x86_64 CFG_CPUTYPE=x86_64
;; ;;
@ -505,7 +514,6 @@ opt optimize-tests 1 "build tests with optimizations"
opt libcpp 1 "build with llvm with libc++ instead of libstdc++ when using clang" opt libcpp 1 "build with llvm with libc++ instead of libstdc++ when using clang"
opt llvm-assertions 1 "build LLVM with assertions" opt llvm-assertions 1 "build LLVM with assertions"
opt debug 1 "build with extra debug fun" opt debug 1 "build with extra debug fun"
opt ratchet-bench 0 "ratchet benchmarks"
opt fast-make 0 "use .gitmodules as timestamp for submodule deps" opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds" opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
opt local-rust 0 "use an installed rustc rather than downloading a snapshot" opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
@ -517,6 +525,7 @@ opt verify-install 1 "verify installed binaries work"
opt dist-host-only 0 "only install bins for the host architecture" opt dist-host-only 0 "only install bins for the host architecture"
opt inject-std-version 1 "inject the current compiler version of libstd into programs" opt inject-std-version 1 "inject the current compiler version of libstd into programs"
opt jemalloc 1 "build liballoc with jemalloc" opt jemalloc 1 "build liballoc with jemalloc"
opt llvm-version-check 1 "don't check if the LLVM version is supported, build anyway"
valopt localstatedir "/var/lib" "local state directory" valopt localstatedir "/var/lib" "local state directory"
valopt sysconfdir "/etc" "install system configuration files" valopt sysconfdir "/etc" "install system configuration files"
@ -608,12 +617,11 @@ putvar CFG_RELEASE_CHANNEL
# channel. # channel.
# Basing CFG_BOOTSTRAP_KEY on CFG_BOOTSTRAP_KEY lets it get picked up # Basing CFG_BOOTSTRAP_KEY on CFG_BOOTSTRAP_KEY lets it get picked up
# during a Makefile reconfig. # during a Makefile reconfig.
CFG_BOOTSTRAP_KEY="${CFG_BOOTSTRAP_KEY-`date +%N`}" CFG_BOOTSTRAP_KEY="${CFG_BOOTSTRAP_KEY-`date +%H:%M:%S`}"
putvar CFG_BOOTSTRAP_KEY putvar CFG_BOOTSTRAP_KEY
step_msg "looking for build programs" step_msg "looking for build programs"
probe_need CFG_PERL perl
probe_need CFG_CURLORWGET curl wget probe_need CFG_CURLORWGET curl wget
probe_need CFG_PYTHON python2.7 python2.6 python2 python probe_need CFG_PYTHON python2.7 python2.6 python2 python
@ -643,10 +651,10 @@ probe CFG_ISCC iscc
probe CFG_JAVAC javac probe CFG_JAVAC javac
probe CFG_ANTLR4 antlr4 probe CFG_ANTLR4 antlr4
probe CFG_GRUN grun probe CFG_GRUN grun
probe CFG_FLEX flex
probe CFG_BISON bison
probe CFG_PANDOC pandoc probe CFG_PANDOC pandoc
probe CFG_PDFLATEX pdflatex
probe CFG_XELATEX xelatex probe CFG_XELATEX xelatex
probe CFG_LUALATEX lualatex
probe CFG_GDB gdb probe CFG_GDB gdb
probe CFG_LLDB lldb probe CFG_LLDB lldb
@ -789,7 +797,7 @@ then
putvar CFG_ENABLE_CLANG putvar CFG_ENABLE_CLANG
fi fi
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ] if [ ! -z "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
then then
step_msg "using custom LLVM at $CFG_LLVM_ROOT" step_msg "using custom LLVM at $CFG_LLVM_ROOT"
@ -1004,7 +1012,7 @@ do
make_dir $t/rt/jemalloc make_dir $t/rt/jemalloc
for i in \ for i in \
isaac sync test \ isaac sync test \
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips arch/powerpc
do do
make_dir $t/rt/stage$s/$i make_dir $t/rt/stage$s/$i
done done
@ -1048,6 +1056,7 @@ do
make_dir $h/test/run-pass-fulldeps make_dir $h/test/run-pass-fulldeps
make_dir $h/test/run-fail make_dir $h/test/run-fail
make_dir $h/test/compile-fail make_dir $h/test/compile-fail
make_dir $h/test/parse-fail
make_dir $h/test/compile-fail-fulldeps make_dir $h/test/compile-fail-fulldeps
make_dir $h/test/bench make_dir $h/test/bench
make_dir $h/test/perf make_dir $h/test/perf
@ -1169,7 +1178,7 @@ do
msg "configuring LLVM for $gnu_t" msg "configuring LLVM for $gnu_t"
LLVM_TARGETS="--enable-targets=x86,x86_64,arm,aarch64,mips" LLVM_TARGETS="--enable-targets=x86,x86_64,arm,aarch64,mips,powerpc"
LLVM_BUILD="--build=$gnu_t" LLVM_BUILD="--build=$gnu_t"
LLVM_HOST="--host=$gnu_t" LLVM_HOST="--host=$gnu_t"
LLVM_TARGET="--target=$gnu_t" LLVM_TARGET="--target=$gnu_t"
@ -1371,7 +1380,8 @@ do
done done
# Munge any paths that appear in config.mk back to posix-y # Munge any paths that appear in config.mk back to posix-y
perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' config.tmp cp config.tmp config.tmp.bak
sed -e 's@ \([a-zA-Z]\):[/\\]@ /\1/@g;' <config.tmp.bak >config.tmp
rm -f config.tmp.bak rm -f config.tmp.bak
msg msg

53
debian/README.Debian vendored
View File

@ -1,53 +0,0 @@
For now, the shared libraries of Rust are private.
The rational is the following:
* Upstream prefers static linking for now
- https://github.com/rust-lang/rust/issues/10209
* rust is still under heavy development. As far as we know, there is
no commitement from upstream to provide a stable ABI for now.
Until we know more, we cannot take the chance to have Rust-built packages
failing at each release of the compiler.
* Static builds are working out of the box just fine
* However, LD_LIBRARY_PATH has to be updated when -C prefer-dynamic is used
-- Sylvestre Ledru <sylvestre@debian.org>, Fri, 13 Feb 2015 15:08:43 +0100
Bootstrapping from nothing
--------------------------
You need a "stage0" rust compiler from somewhere. You can download a
pre-built minimal stage0 from http://www.rust-lang.org/ at build time,
or use a rustc that was already in /usr/bin via whatever black magic
(or some other path if you modify debian/rules).
apt-get source --compile --build-profiles=dlstage0,nodocs rustc
"dlstage0" downloads a stage0 from rust-lang.org during the build.
"nodocs" disables building rust-doc package and skips the long list of
build-deps usually required.
dpkg -i rustc*.deb
apt-get source --compile rustc
This produces the full rust compiler built using your now obsolete
"dlstage0" rustc compiler.
Bootstrapping a new architecture
--------------------------------
0. Start with rust installed on an existing platform
1. Build a rust cross-compiler targeting new architecture
sudo apt-get build-dep --build-profile=nodocs rustc
dpkg-buildpackage -t $new_arch
2. Use cross-compiler to build a compiler that runs on new architecture
dpkg --add-architecture $new_arch
sudo apt-get build-dep --host-architecture=$new_arch rustc
dpkg-buildpackage -a $new_arch
# Perhaps this is sufficient ??
#apt-get source --compile --host-architecture=$new_arch rustc
-- Angus Lees <gus@debian.org>, Sun, 1 Feb 2015 16:16:44 +1100

89
debian/README.source vendored
View File

@ -1,89 +0,0 @@
This source package is unfortunately quite tricky and with
several cutting edges, due to the complexity of rust-lang
bootstrapping system and the high rate of language changes
still ongoing.
We try to describe here inner packaging details and the
reasons behind them.
Bootstrapping
=============
This package is composed of two upstream tarballs:
* the rust-lang source
* a minimal stage0 to start bootstrapping the system
This is an interim solution, in the long term we plan to have
rust bootstrap itself from an installed copy. However, we are
currently forced to ship a stage0.
We have to that way, because:
* upstream periodically snapshots stage0. This happens multiple times
between releases, so it is not currently possible to bootstrap using
(only) released versions
* requirements are pretty tight, and when a language feature change
rustc cannot self-bootstrap (you need a stage0 before the change,
which support the old set of features)
* stage0 are in strictly-chained linear series. This means we cannot
miss even a single snapshot, otherwise next bootstrap could fail.
Moreover, also due to first point above, bootstrapping across
non-adjacent snapshots/packages won't work
On the other hand:
* stage0 is directly generated by the same infrastructure that
packages the source tarball
* Mozilla upstream directly provides it, and at least has some point
you have to trust it in order to break the boostrap cycle
* builds are automated, and public build logs can be inspected at
http://buildbot.rust-lang.org/builders/snap3-linux
* snapshot artifacts have to be manually approved by upstream, and
are identified by the SHA1 of the resulting content
Things should improve as the language is being stabilized.
We will re-evaluate this choice after 1.0.
Embedded libraries
==================
This source package embeds several external libraries (foeked and managed
by rust upstream as git submodules).
In early stages, many more libraries were forked/emebedded but we are steadily
progressing in splitting them out.
Here below the remaining ones, with the technical reasons.
* jemalloc from https://github.com/rust-lang/jemalloc
-> system-wide one can't be used due to rust using a "je_" prefix.
This is intentional upstream design and won't change soon, see:
- https://github.com/rust-lang/rust/pull/18678
- http://smallcultfollowing.com/babysteps/blog/2014/11/14/allocators-in-rust/
* compiler-rt from https://github.com/rust-lang/compiler-rt
-> system-wide compiler-rt fails during linkage
Bug reported upstream, still to be fixed, see:
- https://github.com/rust-lang/rust/issues/15054
- https://github.com/rust-lang/rust/issues/15708
* LLVM from https://github.com/rust-lang/llvm
-> minimum required LLVM is now 3.6, not yet released
Moreover, the code does not seem to build against 3.6 rc1
- https://github.com/rust-lang/rust/issues/21512
Rust fork delta is minimal and mostly performance/optimizations only.
Declared goal is to get in synch with vanilla LLVM.
However, rust depends on some features not available in LLVM-3.5,
while LLVM-3.6 is still pending release. See:
- https://github.com/rust-lang/rust/issues/20010
- http://discuss.rust-lang.org/t/targeted-llvm-for-1-0/1371
As a summary, we plan to:
* keep embedding jemalloc (probably forever)
* wait for a stable LLVM-3.6 to try the switch
* work with upstream to fix compiler-rt linkage soon.
-- Luca Bruno <lucab@debian.org> Wed, 21 Jan 2015 14:24:35 +0100

10
debian/TODO.Debian vendored
View File

@ -1,10 +0,0 @@
* Use LLVM package
* Use Compiler-rt package
* Improve the bootstrap (do the local build first on our systems, upload
to Debian and use the packages)
* Port on other archs
* Create a runtime package (rust-runtime)
* Move the runtime library into a public directory
* Fix the parallel build (failing on tests)
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 20 Jan 2015 08:50:28 +0100

21
debian/changelog vendored
View File

@ -1,21 +0,0 @@
rust (1.0.0~alpha-0~exp2) experimental; urgency=medium
* Introduce some changes by Angus Lees
- Introduction of build stages
- Disable the parallel execution of tests
- Improving of the parallel syntax
- Use override_dh_auto_build-arch
- Use override_dh_auto_build-indep
- Introduction of rust-mode, vim-syntax-rust & kate-syntax-rust packages
- Better declarations of the doc
- Update of the description
- Watch file updated (with key check)
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 13 Feb 2015 15:00:45 +0100
rust (1.0.0~alpha-0~exp1) experimental; urgency=low
* Initial package (Closes: #689207)
Work done by Luca Bruno, Jordan Justen and Sylvestre Ledru
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 23 Jan 2015 15:47:37 +0100

1
debian/compat vendored
View File

@ -1 +0,0 @@
9

92
debian/control vendored
View File

@ -1,92 +0,0 @@
Source: rust
Section: devel
Priority: extra
Maintainer: Rust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org>
Uploaders: Jordan Justen <jordan.l.justen@intel.com>,
Luca Bruno <lucab@debian.org>,
Sylvestre Ledru <sylvestre@debian.org>,
Angus Lees <gus@debian.org>
Build-Depends: debhelper (>= 9),
# rust <!dlstage0>,
autotools-dev,
curl,
python,
nodejs,
zlib1g-dev,
libedit-dev,
valgrind,
git,
ca-certificates <dlstage0>
Build-Depends-Indep: pandoc (>=1.9) <!nodocs>,
po4a <!nodocs>,
texlive-luatex <!nodocs>,
texlive-xetex <!nodocs>,
texlive-latex-base <!nodocs>,
texlive-generic-recommended <!nodocs>,
lmodern <!nodocs>
# git is necessary for 'make check'
Standards-Version: 3.9.6
Homepage: http://www.rust-lang.org/
Vcs-Git: git://git.debian.org/pkg-rust/rust.git
Vcs-Browser: http://git.debian.org/?p=pkg-rust/rust.git;a=summary
Package: rust
Architecture: amd64 i386
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Rust systems programming language
Rust is a curly-brace, block-structured expression language. It
visually resembles the C language family, but differs significantly
in syntactic and semantic details. Its design is oriented toward
concerns of "programming in the large", that is, of creating and
maintaining boundaries - both abstract and operational - that
preserve large-system integrity, availability and concurrency.
.
It supports a mixture of imperative procedural, concurrent actor,
object-oriented and pure functional styles. Rust also supports
generic programming and meta-programming, in both static and dynamic
styles.
Package: rust-doc
Section: doc
Architecture: all
Build-Profiles: <!nodocs>
Depends: ${misc:Depends}
Description: Rust systems programming language - Documentation
Rust is a curly-brace, block-structured expression language. It
visually resembles the C language family, but differs significantly
in syntactic and semantic details. Its design is oriented toward
concerns of "programming in the large", that is, of creating and
maintaining boundaries - both abstract and operational - that
preserve large-system integrity, availability and concurrency.
.
It supports a mixture of imperative procedural, concurrent actor,
object-oriented and pure functional styles. Rust also supports
generic programming and meta-programming, in both static and dynamic
styles.
.
This package contains the documentation.
Package: rust-mode
Architecture: all
Depends: emacs24 | emacsen, ${misc:Depends}
Suggests: rustc
Description: Rust mode for emacs
This package provides a GNU Emacs major mode for editing code in the
Rust programming language.
Package: vim-syntax-rust
Architecture: all
Depends: vim, ${misc:Depends}
Recommends: vim-addon-manager
Suggests: rustc, vim-syntastic
Description: Vim highlighting syntax files for Rust
This package provides syntax files for the Vim editor for editing code
in the Rust programming language.
Package: kate-syntax-rust
Architecture: all
Depends: kate, ${misc:Depends}
Suggests: rustc
Description: Kate highlighting syntax files for Rust
This package provides syntax files for the Kate editor for editing
code in the Rust programming language.

417
debian/copyright vendored
View File

@ -1,417 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: rust
Source: http://www.rust-lang.org
Files: *
Copyright: 2006-2009 Graydon Hoare
2009-2012 Mozilla Foundation
2012-2015 The Rust Project Developers (see AUTHORS.txt)
License: Expat or Apache-2.0
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE
or http://www.apache.org/licenses/LICENSE-2.0> or the MIT
license <LICENSE-MIT or http://opensource.org/licenses/MIT>,
at your option. All files in the project carrying such
notice may not be copied, modified, or distributed except
according to those terms.
Files: src/librustc_trans/trans/cabi_x86_64.rs
Copyright: 2008-2010 Tachyon Technologies
License: BSD-2-clause
Files: src/rt/miniz.c
Copyright: 1996-2012 Rich Geldreich
License: unlicense
This is free and unencumbered software released into the public domain.
.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the
benefit of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.
For more information, please refer to <http://unlicense.org/>
Files: src/rt/valgrind/*.h
Copyright: 2000-2013 Julian Seward
License: Valgrind-BSD-style
Files: src/jemalloc/*
Copyright: 2002-2014 Jason Evans <jasone@canonware.com>
2007-2012 Mozilla Foundation
2009-2014 Facebook, Inc.
License: BSD-2-clause
Files: src/jemalloc/bin/pprof
Copyright: 1998-2007, Google Inc.
License: BSD-3-Clause
Files: src/compiler-rt/*
Copyright: 2009-2015 Howard Hinnant
2009-2015 The CompileRT Developers (see src/compiler-rt/CREDITS.TXT)
License: U-OF-I-BSD-LIKE or Expat
The compiler_rt library is dual licensed under both the University of Illinois
"BSD-Like" license and the MIT license. As a user of this code you may choose
to use it under either license. As a contributor, you agree to allow your code
to be used under both.
Files: src/compiler-rt/BlocksRuntime/*
Copyright: 2008-2010 Apple, Inc.
License: Expat
Files: src/rt/hoedown/*
Copyright: 2008 Natacha Porté
2011 Vicent Martí
2013 Devin Torres and the Hoedown authors
License: ISC
Files: src/libbacktrace/*
Copyright: 2012-2014 Free Software Foundation, Inc.
(written by Ian Lance Taylor, Google.)
License: BSD-3-Clause
Files: src/llvm/*
Copyright: 2003-2013 University of Illinois at Urbana-Champaign.
License: U-OF-I-BSD-LIKE
Files: src/llvm/install-sh
Copyright: 1994 X Consortium
License: LLVM-MIT
This script is licensed under the LLVM license, with the following
additional copyrights and restrictions:
.
Copyright 1991 by the Massachusetts Institute of Technology
.
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission. M.I.T. makes no representations about the
suitability of this software for any purpose. It is provided "as is"
without express or implied warranty.
.
==============================================================================
LLVM Release License
==============================================================================
University of Illinois/NCSA
Open Source License
.
Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign.
All rights reserved.
.
Developed by:
.
LLVM Team
.
University of Illinois at Urbana-Champaign
.
http://llvm.org
.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
.
* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.
Files: src/llvm/include/llvm/Support/*
Copyright: 2003-2013 University of Illinois at Urbana-Champaign.
Copyright (C) 2004 eXtensible Systems, Inc.
License: U-OF-I-BSD-LIKE
Files: src/llvm/lib/Support/reg*
Copyright: 1992, 1993, 1994 Henry Spencer
1992, 1993, 1994 The Regents of the University of California
License: BSD-3-clause
Files: src/llvm/lib/Target/ARM/*
Copyright: ARM Limited
License: ARM-LLVM
ARM Limited
.
Software Grant License Agreement ("Agreement")
.
Except for the license granted herein to you, ARM Limited ("ARM") reserves all
right, title, and interest in and to the Software (defined below).
.
Definition
.
"Software" means the code and documentation as well as any original work of
authorship, including any modifications or additions to an existing work, that
is intentionally submitted by ARM to llvm.org (http://llvm.org) ("LLVM") for
inclusion in, or documentation of, any of the products owned or managed by LLVM
(the "Work"). For the purposes of this definition, "submitted" means any form of
electronic, verbal, or written communication sent to LLVM or its
representatives, including but not limited to communication on electronic
mailing lists, source code control systems, and issue tracking systems that are
managed by, or on behalf of, LLVM for the purpose of discussing and improving
the Work, but excluding communication that is conspicuously marked otherwise.
.
1. Grant of Copyright License. Subject to the terms and conditions of this
Agreement, ARM hereby grants to you and to recipients of the Software
distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable copyright license to reproduce, prepare derivative
works of, publicly display, publicly perform, sublicense, and distribute the
Software and such derivative works.
.
2. Grant of Patent License. Subject to the terms and conditions of this
Agreement, ARM hereby grants you and to recipients of the Software
distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent license
to make, have made, use, offer to sell, sell, import, and otherwise transfer
the Work, where such license applies only to those patent claims licensable
by ARM that are necessarily infringed by ARM's Software alone or by
combination of the Software with the Work to which such Software was
submitted. If any entity institutes patent litigation against ARM or any
other entity (including a cross-claim or counterclaim in a lawsuit) alleging
that ARM's Software, or the Work to which ARM has contributed constitutes
direct or contributory patent infringement, then any patent licenses granted
to that entity under this Agreement for the Software or Work shall terminate
as of the date such litigation is filed.
.
Unless required by applicable law or agreed to in writing, the software is
provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied, including, without limitation, any warranties or
conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE.
Files: src/llvm/test/YAMLParser/*
Copyright: 2006 Kirill Simonov
License: Expat
Files: src/llvm/utils/unittest/googletest/*
Copyright: 2006-2008, Google Inc.
License: BSD-3-Clause
License: BSD-1-clause
Redistribution and use in source and binary forms, with
or without modification, are permitted provided that the
following conditions are met:
.
1. Redistributions of source code must retain the
above copyright notice, this list of conditions
and the following disclaimer.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
License: BSD-2-clause
Redistribution and use in source and binary forms, with
or without modification, are permitted provided that the
following conditions are met:
.
1. Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
2. Redistributions in binary form must reproduce the
above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or
other materials provided with the distribution.
.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License: Expat
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
.
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the organization nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
License: Apache-2.0
The full text of the Apache license can be found in
`/usr/share/common-licenses/Apache-2.0'.
License: Valgrind-BSD-style
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
.
3. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
.
4. The name of the author may not be used to endorse or promote
products derived from this software without specific prior written
permission.
.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License: U-OF-I-BSD-LIKE
==============================================================================
LLVM Release License
==============================================================================
University of Illinois/NCSA
Open Source License
.
Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign.
All rights reserved.
.
Developed by:
.
LLVM Team
.
University of Illinois at Urbana-Champaign
.
http://llvm.org
.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
.
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
.
* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.
License: ISC
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

9
debian/gbp.conf vendored
View File

@ -1,9 +0,0 @@
[DEFAULT]
upstream-tag = upstream-tar/%(version)s
debian-tag = debian/%(version)s
pristine-tar = True
[git-import-orig]
upstream-branch = upstream/tar
debian-branch = master

View File

@ -1 +0,0 @@
src/etc/kate/ usr/share/kde4/apps/katepart/syntax/

View File

@ -1,58 +0,0 @@
#!/usr/bin/python
import os
import re
import StringIO
import subprocess
import sys
import tarfile
import urllib3
deb_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
src_root_dir = os.path.realpath(os.path.join(deb_dir, '..'))
src_root_parent_dir = os.path.realpath(os.path.join(src_root_dir, '..'))
snapshot_dir = os.path.join(src_root_dir, 'src', 'etc')
os.environ['CFG_SRC_DIR'] = src_root_dir
os.chdir(src_root_dir)
ps = subprocess.Popen('dpkg-parsechangelog', stdout=subprocess.PIPE)
version = ps.stdout.read()
regex = re.compile('^Version:\s*(\S+)\s*$', re.MULTILINE)
mo = regex.search(version)
assert mo is not None
version = mo.group(1)
upstream_version = version.split('-')[0]
sys.path.append(snapshot_dir)
from snapshot import determine_curr_snapshot
snapshots = {}
for arch in ('i386', 'x86_64'):
snapshots[arch] = determine_curr_snapshot(arch + '-unknown-linux')
http = urllib3.PoolManager()
def create_dl_tarball():
dl_tarfile = 'rust_' + upstream_version + '.orig-dl.tar.gz'
dl_tarfile = os.path.join(src_root_parent_dir, dl_tarfile)
tar = tarfile.open(dl_tarfile, 'w:gz')
url_base = 'https://static.rust-lang.org/stage0-snapshots/'
for arch in snapshots.iterkeys():
snapshot = snapshots[arch]
url = url_base + snapshot
print 'Downloading', snapshot, '...',
sys.stdout.flush()
r = http.request('GET', url)
print
assert(r.status == 200)
filelike = StringIO.StringIO(r.data)
tarinfo = tarfile.TarInfo(snapshot)
tarinfo.size = len(filelike.buf)
print 'Writing to', dl_tarfile, '...',
tar.addfile(tarinfo, filelike)
filelike.close()
print
tar.close()
create_dl_tarball()

129
debian/rules vendored
View File

@ -1,129 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
include /usr/share/dpkg/pkg-info.mk
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# When using sudo pbuilder, this will cause mk/install.mk to run sudo,
# but we don't need sudo as a build-dep for the package if we unexport
# the SUDO_USER variable.
unexport SUDO_USER
# Debhelper clears MAKEFLAGS, so we have to do this again for any
# target where we call $(MAKE) directly. Boo.
DEB_PARALLEL_JOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
DEB_MAKE_PARALLEL = $(if $(DEB_PARALLEL_JOBS),-j$(DEB_PARALLEL_JOBS))
# $DEB_VERSION_UPSTREAM is the full upstream version (eg. 1.0.0~alpha)
# This is original/unmangled upstream version (eg. 1.0.0-alpha)
UPSTREAM_RUST_VERSION := $(subst ~,-,$(DEB_VERSION_UPSTREAM))
# Main (major.minor) upstream version (eg. 1.0)
MAIN_RUST_VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | egrep -o '^[^\.]+\.[^\.]+')
# Upstream version suffix, if any (eg. alpha)
UPSTREAM_RUST_SUFFIX := $(shell echo $(DEB_VERSION_UPSTREAM) | egrep -o '[^\~]+$$')
# Private dir for rust .so and .rlib
RUST_PREFIX := usr/lib/$(DEB_HOST_MULTIARCH)/rust/$(MAIN_RUST_VERSION)
# Release type (one of beta, stable or nightly)
RELEASE_CHANNEL := beta
DEB_DESTDIR := $(CURDIR)/debian/tmp
RUST_TMP_PREFIX := $(DEB_DESTDIR)/$(RUST_PREFIX)
# These are the normal build flags
COMMON_FLAGS = \
--disable-manage-submodules \
--release-channel=$(RELEASE_CHANNEL) \
--mandir=/usr/share/man \
--enable-rpath \
--prefix=/$(RUST_PREFIX)
# TODO
# These flags will be used to avoid external
# stage0 bootstrap binaries
SELF_BOOTSTRAP = \
--enable-local-rust \
--local-rust-root=/usr
# TODO
# These flags will enable the system-wide LLVM
SYSTEM_LLVM = --llvm-root=/usr
ifeq (,$(findstring dlstage0,$(DEB_BUILD_PROFILES)))
# Without these options, a pre-built stage0 will be downloaded from
# rust-lang.org at build time.
DEB_CONFIGURE_EXTRA_FLAGS += --enable-local-rust --local-rust-root=/usr
endif
BUILD_DOCS = 1
ifneq (,$(findstring nodocs,$(DEB_BUILD_PROFILES)))
DEB_CONFIGURE_EXTRA_FLAGS += --disable-docs
BUILD_DOCS = 0
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
DEB_CONFIGURE_EXTRA_FLAGS += --disable-optimize --disable-optimize-cxx --disable-optimize-llvm
endif
%:
dh $@ --parallel
# Note: SHELL is not set by dash, but the configure script wants to use it
override_dh_auto_configure:
SHELL=/bin/sh \
./configure \
$(COMMON_FLAGS) \
$(DEB_CONFIGURE_EXTRA_FLAGS) \
# TODO
# $(SELF_BOOTSTRAP)
# $(SYSTEM_LLVM)
override_dh_auto_build-arch:
dh_auto_build -- all VERBOSE=1
override_dh_auto_build-indep:
$(if $(BUILD_DOCS),dh_auto_build -- docs)
LD_TMP1 := $(RUST_TMP_PREFIX)/lib
# TODO improve this stuff to make it dynamic
LD_TMP_i386 := $(LD_TMP1)/rustlib/i686-unknown-linux-gnu/lib
LD_TMP_AMD64 := $(LD_TMP1)/rustlib/x86_64-unknown-linux-gnu/lib
RUST_TMP_LD_PATH := $(LD_TMP1):$(LD_TMP_i386):$(LD_TMP_AMD64)
override_dh_shlibdeps:
LD_LIBRARY_PATH=$(RUST_TMP_LD_PATH):$(LD_LIBRARY_PATH) \
dh_shlibdeps -l$(RUST_TMP_LD_PATH)
override_dh_auto_install:
dh_auto_install
dh_link $(RUST_PREFIX)/bin/rustc usr/bin/rustc-$(MAIN_RUST_VERSION)
dh_link usr/bin/rustc-$(MAIN_RUST_VERSION) usr/bin/rustc
dh_link $(RUST_PREFIX)/bin/rustdoc usr/bin/rustdoc-$(MAIN_RUST_VERSION)
dh_link usr/bin/rustdoc-$(MAIN_RUST_VERSION) usr/bin/rustdoc
dh_link $(RUST_PREFIX)/bin/rust-gdb usr/bin/rust-gdb-$(MAIN_RUST_VERSION)
dh_link usr/bin/rust-gdb-$(MAIN_RUST_VERSION) usr/bin/rust-gdb
override_dh_install:
# Brute force to remove privacy-breach-logo lintian warning.
# We could have updated the upstream sources but it would complexify
# the rebase
if test "$(BUILD)" = "1"; then \
sed -i '/rel="shortcut icon" href="http:\/\/www.rust-lang.org\/favicon.ico"/d' `find $(DEB_DESTDIR) -iname '*.html'`; \
rm -f `find $(DEB_DESTDIR) -iname '*.html' -empty` $(DEB_DESTDIR)/usr/share/doc/rust/html/.lock; \
fi
dh_install
override_dh_auto_test:
# NB: not parallel - there is some race that leads to failures like:
# note: cc: error: x86_64-unknown-linux-gnu/test/run-pass/generic-default-type-params-cross-crate.stage2-x86_64-unknown-linux-gnulibaux/default_type_params_xc.o: No such file or directory
$(MAKE) check-notidy

View File

@ -1,12 +0,0 @@
Document: rust-book
Title: The Rust Programming Language
Section: Programming/Rust
Abstract:
This book will teach you about the Rust Programming Language. Rust is
a modern systems programming language focusing on safety and speed. It
accomplishes these goals by being memory safe without using garbage
collection.
Format: HTML
Index: /usr/share/doc/rust/book.html

View File

@ -1,11 +0,0 @@
Document: rust-intro
Title: The Rust Guide
Section: Programming/Rust
Abstract: This introduction will give you a rough idea of what Rust is
like, eliding many details.
Format: HTML
Index: /usr/share/doc/rust/intro.html
Format: EPUB
Files: /usr/share/doc/rust/intro.epub

View File

@ -1,14 +0,0 @@
Document: rust-reference
Title: The Rust Reference
Section: Programming/Rust
Abstract: This document is the primary reference for the Rust
programming language.
Format: HTML
Index: /usr/share/doc/rust/reference.html
Format: PDF
Files: /usr/share/doc/rust/reference.pdf
Format: EPUB
Files: /usr/share/doc/rust/reference.epub

View File

@ -1 +0,0 @@
doc/*

View File

@ -1 +0,0 @@
usr/lib/*/rust/*/share/doc/rust/ usr/share/doc

View File

@ -1 +0,0 @@
src/etc/emacs/README.md

View File

@ -1,20 +0,0 @@
#!/bin/sh -e
FLAVOR=$1
PACKAGE=rust-mode
ELDIR=/usr/share/emacs/site-lisp/
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
ELFILE="rust-mode.el"
FLAGS="-batch -no-site-file -f batch-byte-compile"
if [ ${FLAVOR} != emacs ]; then
echo install/${PACKAGE}: Byte-compiling for ${FLAVOR}
install -m 755 -d ${ELCDIR}
# Source file symlink (emacsen policy 5C)
ln -s "${ELDIR}/${ELFILE}" "${ELCDIR}/${ELFILE}"
# Compile
(cd ${ELCDIR}; ${FLAVOR} ${FLAGS} ${ELFILE})
fi

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
FLAVOR=$1
PACKAGE=rust-mode
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
if [ ${FLAVOR} != emacs ]; then
echo remove/${PACKAGE}: Purging byte-compiled files for ${FLAVOR}
rm -rf "${ELCDIR}"
fi

View File

@ -1,22 +0,0 @@
;; -*- emacs-lisp -*-
;;
;; Emacs startup file for the Debian GNU/Linux rust-mode package
(cond
((not (file-exists-p "/usr/share/emacs/site-lisp/rust-mode"))
(message "Package rust-mode removed but not purged. Skipping setup."))
((not (file-exists-p (concat "/usr/share/"
(symbol-name debian-emacs-flavor)
"/site-lisp/rust-mode/rust-mode.elc")))
(message "Package rust-mode not fully installed. Skipping setup."))
(t
(debian-pkg-add-load-path-item
(concat "/usr/share/"
(symbol-name debian-emacs-flavor)
"/site-lisp/rust-mode"))
;; autoloads for rust-mode
(autoload 'rust-mode "rust-mode" "Major mode for Rust code." t)
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))))

View File

@ -1,2 +0,0 @@
src/etc/emacs/rust-mode.el usr/share/emacs/site-lisp/rust-mode/
src/etc/emacs/rust-mode-tests.el usr/share/emacs/site-lisp/rust-mode/

2
debian/rust.install vendored
View File

@ -1,2 +0,0 @@
usr/lib/*/rust/*/bin/
usr/lib/*/rust/*/lib/

View File

@ -1,4 +0,0 @@
# Rust uses libraries that are not directly linked to libc
rust binary: library-not-linked-against-libc
rust binary: description-starts-with-package-name

View File

@ -1,3 +0,0 @@
debian/tmp/usr/share/man/man1/rustc.1
debian/tmp/usr/share/man/man1/rustdoc.1

View File

@ -1 +0,0 @@
3.0 (quilt)

View File

@ -1,2 +0,0 @@
debian/dl/rust-stage0-2015-01-07-9e4e524-linux-i386-d8b73fc9aa3ad72ce1408a41e35d78dba10eb4d4.tar.bz2
debian/dl/rust-stage0-2015-01-07-9e4e524-linux-x86_64-697880d3640e981bbbf23284363e8e9a158b588d.tar.bz2

View File

@ -1,5 +0,0 @@
# Rust source tree contains minified javascript code:
# source-is-missing src/librustdoc/html/static/jquery-2.1.0.min.js
rust source: source-is-missing
rust source: description-starts-with-package-name

View File

@ -1,2 +0,0 @@
debian/vim-syntax-rust.yaml usr/share/vim/registry/
src/etc/vim usr/share/vim/addons/

View File

@ -1,14 +0,0 @@
addon: rust-syntax
description: "Addon support for the Rust language"
files:
- after/syntax/rust.vim
- syntax/rust.vim
- compiler/rustc.vim
- compiler/cargo.vim
- ftdetect/rust.vim
- plugin/rust.vim
- autoload/rust.vim
- doc/rust.txt
- indent/rust.vim
- ftplugin/rust.vim
- syntax_checkers/rust/rustc.vim

5
debian/watch vendored
View File

@ -1,5 +0,0 @@
version=3
opts="pgpsigurlmangle=s/$/.asc/" \
http://www.rust-lang.org/install.html \
(?:.*/)rustc?-(\d[\d\.]*(?:-\w+)?)-src\.tar\.gz

View File

@ -18,10 +18,15 @@ Display the help message
\fB\-\-cfg\fR SPEC \fB\-\-cfg\fR SPEC
Configure the compilation environment Configure the compilation environment
.TP .TP
\fB\-L\fR PATH \fB\-L\fR [KIND=]PATH
Add a directory to the library search path Add a directory to the library search path. The optional KIND can be one of:
dependency = only lookup transitive dependencies here
crate = only lookup local `extern crate` directives here
native = only lookup native libraries here
framework = only look for OSX frameworks here
all = look for anything here (the default)
.TP .TP
\fB\-l\fR NAME[:KIND] \fB\-l\fR [KIND=]NAME
Link the generated crate(s) to the specified native library NAME. The optional Link the generated crate(s) to the specified native library NAME. The optional
KIND can be one of, static, dylib, or framework. If omitted, dylib is assumed. KIND can be one of, static, dylib, or framework. If omitted, dylib is assumed.
.TP .TP

View File

@ -35,9 +35,27 @@ space-separated list of plugins to run (default: '')
--plugin-path <val> --plugin-path <val>
directory to load plugins from (default: /tmp/rustdoc_ng/plugins) directory to load plugins from (default: /tmp/rustdoc_ng/plugins)
.TP .TP
--target <val>
target triple to document
.TP
--crate-name <val>
specify the name of this crate
.TP
-L --library-path <val> -L --library-path <val>
directory to add to crate search path directory to add to crate search path
.TP .TP
--cfg <val>
pass a --cfg to rustc
.TP
--extern <val>
pass an --extern to rustc
.TP
--test
run code examples as tests
.TP
--test-args <val>
pass arguments to the test runner
.TP
--html-in-header <val> --html-in-header <val>
file to add to <head> file to add to <head>
.TP .TP
@ -47,8 +65,20 @@ file to add in <body>, before content
--html-after-content <val> --html-after-content <val>
file to add in <body>, after content file to add in <body>, after content
.TP .TP
--markdown-css <val>
CSS files to include via <link> in a rendered Markdown file
.TP
--markdown-playground-url <val>
URL to send code snippets to
.TP
--markdown-no-toc
don't include table of contents
.TP
-h, --help -h, --help
Print help Print help
.TP
-V, --version
Print rustdoc's version
.SH "OUTPUT FORMATS" .SH "OUTPUT FORMATS"

View File

@ -0,0 +1,36 @@
# aarch64-apple-ios configuration
CFG_SDK_NAME_aarch64-apple-ios := iphoneos
CFG_SDK_ARCHS_aarch64-apple-ios := arm64
ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
CFG_IOS_SDK_aarch64-apple-ios := $(shell xcrun --show-sdk-path -sdk iphoneos 2>/dev/null)
CFG_IOS_SDK_FLAGS_aarch64-apple-ios := -target aarch64-apple-darwin -isysroot $(CFG_IOS_SDK_aarch64-apple-ios) -mios-version-min=7.0 -arch arm64
CC_aarch64-apple-ios = $(shell xcrun -find -sdk iphoneos clang)
CXX_aarch64-apple-ios = $(shell xcrun -find -sdk iphoneos clang++)
CPP_aarch64-apple-ios = $(shell xcrun -find -sdk iphoneos clang++)
AR_aarch64-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
endif
CFG_LIB_NAME_aarch64-apple-ios = lib$(1).a
CFG_LIB_GLOB_aarch64-apple-ios = lib$(1)-*.a
CFG_INSTALL_ONLY_RLIB_aarch64-apple-ios = 1
CFG_STATIC_LIB_NAME_aarch64-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_aarch64-apple-ios = lib$(1)-*.a.dSYM
CFG_CFLAGS_aarch64-apple-ios := $(CFG_IOS_SDK_FLAGS_aarch64-apple-ios)
CFG_JEMALLOC_CFLAGS_aarch64-apple-ios := $(CFG_IOS_SDK_FLAGS_aarch64-apple-ios)
CFG_GCCISH_CFLAGS_aarch64-apple-ios := -Wall -Werror -fPIC $(CFG_IOS_SDK_FLAGS_aarch64-apple-ios)
CFG_GCCISH_CXXFLAGS_aarch64-apple-ios := -fno-rtti $(CFG_IOS_SDK_FLAGS_aarch64-apple-ios) -I$(CFG_IOS_SDK_aarch64-apple-ios)/usr/include/c++/4.2.1
CFG_GCCISH_LINK_FLAGS_aarch64-apple-ios := -lpthread -syslibroot $(CFG_IOS_SDK_aarch64-apple-ios) -Wl,-no_compact_unwind
CFG_GCCISH_DEF_FLAG_aarch64-apple-ios := -Wl,-exported_symbols_list,
CFG_GCCISH_PRE_LIB_FLAGS_aarch64-apple-ios :=
CFG_GCCISH_POST_LIB_FLAGS_aarch64-apple-ios :=
CFG_DEF_SUFFIX_aarch64-apple-ios := .darwin.def
CFG_LLC_FLAGS_aarch64-apple-ios := -mattr=+neon,+cyclone,+fp-armv8
CFG_INSTALL_NAME_aarch64-apple-ios = -Wl,-install_name,@rpath/$(1)
CFG_LIBUV_LINK_FLAGS_aarch64-apple-ios =
CFG_EXE_SUFFIX_aarch64-apple-ios :=
CFG_WINDOWSY_aarch64-apple-ios :=
CFG_UNIXY_aarch64-apple-ios := 1
CFG_PATH_MUNGE_aarch64-apple-ios := true
CFG_LDPATH_aarch64-apple-ios :=
CFG_RUN_aarch64-apple-ios = $(2)
CFG_RUN_TARG_aarch64-apple-ios = $(call CFG_RUN_aarch64-apple-ios,,$(2))
CFG_GNU_TRIPLE_aarch64-apple-ios := aarch64-apple-ios

View File

@ -0,0 +1,30 @@
# aarch64-linux-android configuration
# CROSS_PREFIX_aarch64-linux-android-
CC_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
CXX_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-g++
CPP_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc -E
AR_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-ar
CFG_LIB_NAME_aarch64-linux-android=lib$(1).so
CFG_STATIC_LIB_NAME_aarch64-linux-android=lib$(1).a
CFG_LIB_GLOB_aarch64-linux-android=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_aarch64-linux-android=lib$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_aarch64-linux-android := -D__aarch64__ -DANDROID -D__ANDROID__ $(CFLAGS)
CFG_GCCISH_CFLAGS_aarch64-linux-android := -Wall -g -fPIC -D__aarch64__ -DANDROID -D__ANDROID__ $(CFLAGS)
CFG_GCCISH_CXXFLAGS_aarch64-linux-android := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_aarch64-linux-android := -shared -fPIC -ldl -g -lm -lsupc++
CFG_GCCISH_DEF_FLAG_aarch64-linux-android := -Wl,--export-dynamic,--dynamic-list=
CFG_GCCISH_PRE_LIB_FLAGS_aarch64-linux-android := -Wl,-whole-archive
CFG_GCCISH_POST_LIB_FLAGS_aarch64-linux-android := -Wl,-no-whole-archive
CFG_DEF_SUFFIX_aarch64-linux-android := .android.def
CFG_LLC_FLAGS_aarch64-linux-android :=
CFG_INSTALL_NAME_aarch64-linux-android =
CFG_EXE_SUFFIX_aarch64-linux-android :=
CFG_WINDOWSY_aarch64-linux-android :=
CFG_UNIXY_aarch64-linux-android := 1
CFG_PATH_MUNGE_aarch64-linux-android := true
CFG_LDPATH_aarch64-linux-android :=
CFG_RUN_aarch64-linux-android=
CFG_RUN_TARG_aarch64-linux-android=
RUSTC_FLAGS_aarch64-linux-android :=
RUSTC_CROSS_FLAGS_aarch64-linux-android :=
CFG_GNU_TRIPLE_aarch64-linux-android := aarch64-linux-android

View File

@ -1,35 +0,0 @@
# arm-apple-ios configuration
CFG_SDK_NAME_arm-apple-ios = iphoneos
CFG_SDK_ARCHS_arm-apple-ios = armv7
ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
CFG_IOS_SDK = $(shell xcrun --show-sdk-path -sdk iphoneos 2>/dev/null)
CFG_IOS_FLAGS = -target armv7-apple-ios -isysroot $(CFG_IOS_SDK) -mios-version-min=7.0
CC_arm-apple-ios = $(shell xcrun -find -sdk iphoneos clang)
CXX_arm-apple-ios = $(shell xcrun -find -sdk iphoneos clang++)
CPP_arm-apple-ios = $(shell xcrun -find -sdk iphoneos clang++)
AR_arm-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
endif
CFG_LIB_NAME_arm-apple-ios = lib$(1).a
CFG_LIB_GLOB_arm-apple-ios = lib$(1)-*.a
CFG_STATIC_LIB_NAME_arm-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_arm-apple-ios = lib$(1)-*.a.dSYM
CFG_JEMALLOC_CFLAGS_arm-apple-ios := -arch armv7 -mfpu=vfp3 $(CFG_IOS_FLAGS)
CFG_GCCISH_CFLAGS_arm-apple-ios := -Wall -Werror -g -fPIC $(CFG_IOS_FLAGS) -mfpu=vfp3 -arch armv7
CFG_GCCISH_CXXFLAGS_arm-apple-ios := -fno-rtti $(CFG_IOS_FLAGS) -I$(CFG_IOS_SDK)/usr/include/c++/4.2.1
CFG_GCCISH_LINK_FLAGS_arm-apple-ios := -lpthread -syslibroot $(CFG_IOS_SDK) -Wl,-no_compact_unwind
CFG_GCCISH_DEF_FLAG_arm-apple-ios := -Wl,-exported_symbols_list,
CFG_GCCISH_PRE_LIB_FLAGS_arm-apple-ios :=
CFG_GCCISH_POST_LIB_FLAGS_arm-apple-ios :=
CFG_DEF_SUFFIX_arm-apple-ios := .darwin.def
CFG_LLC_FLAGS_arm-apple-ios := -mattr=+vfp3,+v7,+thumb2,+neon -march=arm
CFG_INSTALL_NAME_arm-apple-ios = -Wl,-install_name,@rpath/$(1)
CFG_EXE_SUFFIX_arm-apple-ios :=
CFG_WINDOWSY_arm-apple-ios :=
CFG_UNIXY_arm-apple-ios := 1
CFG_PATH_MUNGE_arm-apple-ios := true
CFG_LDPATH_arm-apple-ios :=
CFG_RUN_arm-apple-ios = $(2)
CFG_RUN_TARG_arm-apple-ios = $(call CFG_RUN_arm-apple-ios,,$(2))
RUSTC_FLAGS_arm-apple-ios := -C relocation_model=pic
RUSTC_CROSS_FLAGS_arm-apple-ios :=-C relocation_model=pic
CFG_GNU_TRIPLE_arm-apple-ios := arm-apple-ios

34
mk/cfg/armv7-apple-ios.mk Normal file
View File

@ -0,0 +1,34 @@
# armv7-apple-ios configuration
CFG_SDK_NAME_armv7-apple-ios := iphoneos
CFG_SDK_ARCHS_armv7-apple-ios := armv7
ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
CFG_IOS_SDK_armv7-apple-ios := $(shell xcrun --show-sdk-path -sdk iphoneos 2>/dev/null)
CFG_IOS_SDK_FLAGS_armv7-apple-ios := -target armv7-apple-ios -isysroot $(CFG_IOS_SDK_armv7-apple-ios) -mios-version-min=7.0
CC_armv7-apple-ios = $(shell xcrun -find -sdk iphoneos clang)
CXX_armv7-apple-ios = $(shell xcrun -find -sdk iphoneos clang++)
CPP_armv7-apple-ios = $(shell xcrun -find -sdk iphoneos clang++)
AR_armv7-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
endif
CFG_LIB_NAME_armv7-apple-ios = lib$(1).a
CFG_LIB_GLOB_armv7-apple-ios = lib$(1)-*.a
CFG_INSTALL_ONLY_RLIB_armv7-apple-ios = 1
CFG_STATIC_LIB_NAME_armv7-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_armv7-apple-ios = lib$(1)-*.a.dSYM
CFG_JEMALLOC_CFLAGS_armv7-apple-ios := -arch armv7 -mfpu=vfp3 $(CFG_IOS_SDK_FLAGS_armv7-apple-ios)
CFG_GCCISH_CFLAGS_armv7-apple-ios := -Wall -Werror -g -fPIC $(CFG_IOS_SDK_FLAGS_armv7-apple-ios) -mfpu=vfp3 -arch armv7
CFG_GCCISH_CXXFLAGS_armv7-apple-ios := -fno-rtti $(CFG_IOS_SDK_FLAGS_armv7-apple-ios) -I$(CFG_IOS_SDK_armv7-apple-ios)/usr/include/c++/4.2.1
CFG_GCCISH_LINK_FLAGS_armv7-apple-ios := -lpthread -syslibroot $(CFG_IOS_SDK_armv7-apple-ios) -Wl,-no_compact_unwind
CFG_GCCISH_DEF_FLAG_armv7-apple-ios := -Wl,-exported_symbols_list,
CFG_GCCISH_PRE_LIB_FLAGS_armv7-apple-ios :=
CFG_GCCISH_POST_LIB_FLAGS_armv7-apple-ios :=
CFG_DEF_SUFFIX_armv7-apple-ios := .darwin.def
CFG_LLC_FLAGS_armv7-apple-ios := -mattr=+vfp3,+v7,+neon -march=arm
CFG_INSTALL_NAME_armv7-apple-ios = -Wl,-install_name,@rpath/$(1)
CFG_EXE_SUFFIX_armv7-apple-ios :=
CFG_WINDOWSY_armv7-apple-ios :=
CFG_UNIXY_armv7-apple-ios := 1
CFG_PATH_MUNGE_armv7-apple-ios := true
CFG_LDPATH_armv7-apple-ios :=
CFG_RUN_armv7-apple-ios = $(2)
CFG_RUN_TARG_armv7-apple-ios = $(call CFG_RUN_armv7-apple-ios,,$(2))
CFG_GNU_TRIPLE_armv7-apple-ios := armv7-apple-ios

View File

@ -0,0 +1,34 @@
# armv7s-apple-ios configuration
CFG_SDK_NAME_armv7s-apple-ios := iphoneos
CFG_SDK_ARCHS_armv7s-apple-ios := armv7s
ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
CFG_IOS_SDK_armv7s-apple-ios := $(shell xcrun --show-sdk-path -sdk iphoneos 2>/dev/null)
CFG_IOS_SDK_FLAGS_armv7s-apple-ios := -target armv7s-apple-ios -isysroot $(CFG_IOS_SDK_armv7s-apple-ios) -mios-version-min=7.0
CC_armv7s-apple-ios = $(shell xcrun -find -sdk iphoneos clang)
CXX_armv7s-apple-ios = $(shell xcrun -find -sdk iphoneos clang++)
CPP_armv7s-apple-ios = $(shell xcrun -find -sdk iphoneos clang++)
AR_armv7s-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
endif
CFG_LIB_NAME_armv7s-apple-ios = lib$(1).a
CFG_LIB_GLOB_armv7s-apple-ios = lib$(1)-*.a
CFG_INSTALL_ONLY_RLIB_armv7s-apple-ios = 1
CFG_STATIC_LIB_NAME_armv7s-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_armv7s-apple-ios = lib$(1)-*.a.dSYM
CFG_JEMALLOC_CFLAGS_armv7s-apple-ios := -arch armv7s -mfpu=vfp4 $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios)
CFG_GCCISH_CFLAGS_armv7s-apple-ios := -Wall -Werror -g -fPIC $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) -mfpu=vfp4 -arch armv7s
CFG_GCCISH_CXXFLAGS_armv7s-apple-ios := -fno-rtti $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) -I$(CFG_IOS_SDK_armv7s-apple-ios)/usr/include/c++/4.2.1
CFG_GCCISH_LINK_FLAGS_armv7s-apple-ios := -lpthread -syslibroot $(CFG_IOS_SDK_armv7s-apple-ios) -Wl,-no_compact_unwind
CFG_GCCISH_DEF_FLAG_armv7s-apple-ios := -Wl,-exported_symbols_list,
CFG_GCCISH_PRE_LIB_FLAGS_armv7s-apple-ios :=
CFG_GCCISH_POST_LIB_FLAGS_armv7s-apple-ios :=
CFG_DEF_SUFFIX_armv7s-apple-ios := .darwin.def
CFG_LLC_FLAGS_armv7s-apple-ios := -mattr=+vfp4,+v7,+neon
CFG_INSTALL_NAME_armv7s-apple-ios = -Wl,-install_name,@rpath/$(1)
CFG_EXE_SUFFIX_armv7s-apple-ios :=
CFG_WINDOWSY_armv7s-apple-ios :=
CFG_UNIXY_armv7s-apple-ios := 1
CFG_PATH_MUNGE_armv7s-apple-ios := true
CFG_LDPATH_armv7s-apple-ios :=
CFG_RUN_armv7s-apple-ios = $(2)
CFG_RUN_TARG_armv7s-apple-ios = $(call CFG_RUN_armv7s-apple-ios,,$(2))
CFG_GNU_TRIPLE_armv7s-apple-ios := armv7s-apple-ios

View File

@ -1,9 +1,9 @@
# i386-apple-ios configuration # i386-apple-ios configuration
CFG_SDK_NAME_i386-apple-ios = iphonesimulator CFG_SDK_NAME_i386-apple-ios := iphonesimulator
CFG_SDK_ARCHS_i386-apple-ios = i386 CFG_SDK_ARCHS_i386-apple-ios := i386
ifneq ($(findstring darwin,$(CFG_OSTYPE)),) ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
CFG_IOSSIM_SDK = $(shell xcrun --show-sdk-path -sdk iphonesimulator 2>/dev/null) CFG_IOSSIM_SDK_i386-apple-ios := $(shell xcrun --show-sdk-path -sdk iphonesimulator 2>/dev/null)
CFG_IOSSIM_FLAGS = -target i386-apple-ios -isysroot $(CFG_IOSSIM_SDK) -mios-simulator-version-min=7.0 CFG_IOSSIM_FLAGS_i386-apple-ios := -m32 -target i386-apple-ios -isysroot $(CFG_IOSSIM_SDK_i386-apple-ios) -mios-simulator-version-min=7.0
CC_i386-apple-ios = $(shell xcrun -find -sdk iphonesimulator clang) CC_i386-apple-ios = $(shell xcrun -find -sdk iphonesimulator clang)
CXX_i386-apple-ios = $(shell xcrun -find -sdk iphonesimulator clang++) CXX_i386-apple-ios = $(shell xcrun -find -sdk iphonesimulator clang++)
CPP_i386-apple-ios = $(shell xcrun -find -sdk iphonesimulator clang++) CPP_i386-apple-ios = $(shell xcrun -find -sdk iphonesimulator clang++)
@ -11,23 +11,24 @@ AR_i386-apple-ios = $(shell xcrun -find -sdk iphonesimulator ar)
endif endif
CFG_LIB_NAME_i386-apple-ios = lib$(1).a CFG_LIB_NAME_i386-apple-ios = lib$(1).a
CFG_LIB_GLOB_i386-apple-ios = lib$(1)-*.dylib CFG_LIB_GLOB_i386-apple-ios = lib$(1)-*.dylib
CFG_INSTALL_ONLY_RLIB_i386-apple-ios = 1
CFG_STATIC_LIB_NAME_i386-apple-ios=lib$(1).a CFG_STATIC_LIB_NAME_i386-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_i386-apple-ios = lib$(1)-*.dylib.dSYM CFG_LIB_DSYM_GLOB_i386-apple-ios = lib$(1)-*.dylib.dSYM
CFG_GCCISH_CFLAGS_i386-apple-ios = -Wall -Werror -g -fPIC -m32 $(CFG_IOSSIM_FLAGS) CFG_GCCISH_CFLAGS_i386-apple-ios := -Wall -Werror -g -fPIC -m32 $(CFG_IOSSIM_FLAGS_i386-apple-ios)
CFG_GCCISH_CXXFLAGS_i386-apple-ios = -fno-rtti $(CFG_IOSSIM_FLAGS) -I$(CFG_IOSSIM_SDK)/usr/include/c++/4.2.1 CFG_GCCISH_CXXFLAGS_i386-apple-ios := -fno-rtti $(CFG_IOSSIM_FLAGS_i386-apple-ios) -I$(CFG_IOSSIM_SDK_i386-apple-ios)/usr/include/c++/4.2.1
CFG_GCCISH_LINK_FLAGS_i386-apple-ios = -lpthread -Wl,-no_compact_unwind -m32 -Wl,-syslibroot $(CFG_IOSSIM_SDK) CFG_GCCISH_LINK_FLAGS_i386-apple-ios := -lpthread -m32 -Wl,-no_compact_unwind -m32 -Wl,-syslibroot $(CFG_IOSSIM_SDK_i386-apple-ios)
CFG_GCCISH_DEF_FLAG_i386-apple-ios = -Wl,-exported_symbols_list, CFG_GCCISH_DEF_FLAG_i386-apple-ios := -Wl,-exported_symbols_list,
CFG_GCCISH_PRE_LIB_FLAGS_i386-apple-ios = CFG_GCCISH_PRE_LIB_FLAGS_i386-apple-ios :=
CFG_GCCISH_POST_LIB_FLAGS_i386-apple-ios = CFG_GCCISH_POST_LIB_FLAGS_i386-apple-ios :=
CFG_DEF_SUFFIX_i386-apple-ios = .darwin.def CFG_DEF_SUFFIX_i386-apple-ios := .darwin.def
CFG_LLC_FLAGS_i386-apple-ios = CFG_LLC_FLAGS_i386-apple-ios =
CFG_INSTALL_NAME_i386-apple-ios = -Wl,-install_name,@rpath/$(1) CFG_INSTALL_NAME_i386-apple-ios = -Wl,-install_name,@rpath/$(1)
CFG_EXE_SUFFIX_i386-apple-ios = CFG_EXE_SUFFIX_i386-apple-ios :=
CFG_WINDOWSY_i386-apple-ios = CFG_WINDOWSY_i386-apple-ios :=
CFG_UNIXY_i386-apple-ios = 1 CFG_UNIXY_i386-apple-ios := 1
CFG_PATH_MUNGE_i386-apple-ios = true CFG_PATH_MUNGE_i386-apple-ios = :true
CFG_LDPATH_i386-apple-ios = CFG_LDPATH_i386-apple-ios =
CFG_RUN_i386-apple-ios = $(2) CFG_RUN_i386-apple-ios = $(2)
CFG_RUN_TARG_i386-apple-ios = $(call CFG_RUN_i386-apple-ios,,$(2)) CFG_RUN_TARG_i386-apple-ios = $(call CFG_RUN_i386-apple-ios,,$(2))
CFG_JEMALLOC_CFLAGS_i386-apple-ios = $(CFG_IOSSIM_FLAGS) -target i386-apple-ios -Wl,-syslibroot $(CFG_IOSSIM_SDK) -Wl,-no_compact_unwind CFG_JEMALLOC_CFLAGS_i386-apple-ios = $(CFG_IOSSIM_FLAGS_i386-apple-ios) -target i386-apple-ios #-Wl,-syslibroot $(CFG_IOSSIM_SDK_i386-apple-ios) -Wl,-no_compact_unwind
CFG_GNU_TRIPLE_i386-apple-ios := i386-apple-ios CFG_GNU_TRIPLE_i386-apple-ios := i386-apple-ios

View File

@ -8,8 +8,8 @@ CFG_LIB_NAME_i686-pc-windows-gnu=$(1).dll
CFG_STATIC_LIB_NAME_i686-pc-windows-gnu=$(1).lib CFG_STATIC_LIB_NAME_i686-pc-windows-gnu=$(1).lib
CFG_LIB_GLOB_i686-pc-windows-gnu=$(1)-*.dll CFG_LIB_GLOB_i686-pc-windows-gnu=$(1)-*.dll
CFG_LIB_DSYM_GLOB_i686-pc-windows-gnu=$(1)-*.dylib.dSYM CFG_LIB_DSYM_GLOB_i686-pc-windows-gnu=$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_i686-pc-windows-gnu := -march=i686 -m32 -D_WIN32_WINNT=0x0600 $(CFLAGS) CFG_JEMALLOC_CFLAGS_i686-pc-windows-gnu := -march=i686 -m32 -D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS)
CFG_GCCISH_CFLAGS_i686-pc-windows-gnu := -Wall -Werror -g -m32 -D_WIN32_WINNT=0x0600 $(CFLAGS) CFG_GCCISH_CFLAGS_i686-pc-windows-gnu := -Wall -Werror -g -m32 -D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_i686-pc-windows-gnu := -fno-rtti $(CXXFLAGS) CFG_GCCISH_CXXFLAGS_i686-pc-windows-gnu := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_i686-pc-windows-gnu := -shared -g -m32 CFG_GCCISH_LINK_FLAGS_i686-pc-windows-gnu := -shared -g -m32
CFG_GCCISH_DEF_FLAG_i686-pc-windows-gnu := CFG_GCCISH_DEF_FLAG_i686-pc-windows-gnu :=
@ -22,7 +22,7 @@ CFG_EXE_SUFFIX_i686-pc-windows-gnu := .exe
CFG_WINDOWSY_i686-pc-windows-gnu := 1 CFG_WINDOWSY_i686-pc-windows-gnu := 1
CFG_UNIXY_i686-pc-windows-gnu := CFG_UNIXY_i686-pc-windows-gnu :=
CFG_PATH_MUNGE_i686-pc-windows-gnu := CFG_PATH_MUNGE_i686-pc-windows-gnu :=
CFG_LDPATH_i686-pc-windows-gnu :=$(CFG_LDPATH_i686-pc-windows-gnu):$(PATH) CFG_LDPATH_i686-pc-windows-gnu :=
CFG_RUN_i686-pc-windows-gnu=PATH="$(CFG_LDPATH_i686-pc-windows-gnu):$(1)" $(2) CFG_RUN_i686-pc-windows-gnu=$(2)
CFG_RUN_TARG_i686-pc-windows-gnu=$(call CFG_RUN_i686-pc-windows-gnu,$(HLIB$(1)_H_$(CFG_BUILD)),$(2)) CFG_RUN_TARG_i686-pc-windows-gnu=$(call CFG_RUN_i686-pc-windows-gnu,,$(2))
CFG_GNU_TRIPLE_i686-pc-windows-gnu := i686-w64-mingw32 CFG_GNU_TRIPLE_i686-pc-windows-gnu := i686-w64-mingw32

View File

@ -0,0 +1,28 @@
# powerpc-unknown-linux-gnu configuration
CROSS_PREFIX_powerpc-unknown-linux-gnu=powerpc-linux-gnu-
CC_powerpc-unknown-linux-gnu=$(CC)
CXX_powerpc-unknown-linux-gnu=$(CXX)
CPP_powerpc-unknown-linux-gnu=$(CPP)
AR_powerpc-unknown-linux-gnu=$(AR)
CFG_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).so
CFG_STATIC_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).a
CFG_LIB_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
CFG_CFLAGS_powerpc-unknown-linux-gnu := -m32 $(CFLAGS)
CFG_GCCISH_CFLAGS_powerpc-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_powerpc-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_powerpc-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
CFG_GCCISH_DEF_FLAG_powerpc-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
CFG_GCCISH_PRE_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-whole-archive
CFG_GCCISH_POST_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-no-whole-archive
CFG_DEF_SUFFIX_powerpc-unknown-linux-gnu := .linux.def
CFG_LLC_FLAGS_powerpc-unknown-linux-gnu :=
CFG_INSTALL_NAME_powerpc-unknown-linux-gnu =
CFG_EXE_SUFFIX_powerpc-unknown-linux-gnu =
CFG_WINDOWSY_powerpc-unknown-linux-gnu :=
CFG_UNIXY_powerpc-unknown-linux-gnu := 1
CFG_PATH_MUNGE_powerpc-unknown-linux-gnu := true
CFG_LDPATH_powerpc-unknown-linux-gnu :=
CFG_RUN_powerpc-unknown-linux-gnu=$(2)
CFG_RUN_TARG_powerpc-unknown-linux-gnu=$(call CFG_RUN_powerpc-unknown-linux-gnu,,$(2))
CFG_GNU_TRIPLE_powerpc-unknown-linux-gnu := powerpc-unknown-linux-gnu

View File

@ -0,0 +1,36 @@
# x86_64-apple-ios configuration
CFG_SDK_NAME_x86_64-apple-ios := iphonesimulator
CFG_SDK_ARCHS_x86_64-apple-ios := x86_64
ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
CFG_IOSSIM_SDK_x86_64-apple-ios := $(shell xcrun --show-sdk-path -sdk iphonesimulator 2>/dev/null)
CFG_IOSSIM_FLAGS_x86_64-apple-ios := -m64 -target x86_64-apple-ios -isysroot $(CFG_IOSSIM_SDK_x86_64-apple-ios) -mios-simulator-version-min=7.0
CC_x86_64-apple-ios = $(shell xcrun -find -sdk iphonesimulator clang)
CXX_x86_64-apple-ios = $(shell xcrun -find -sdk iphonesimulator clang++)
CPP_x86_64-apple-ios = $(shell xcrun -find -sdk iphonesimulator clang++)
AR_x86_64-apple-ios = $(shell xcrun -find -sdk iphonesimulator ar)
endif
CFG_LIB_NAME_x86_64-apple-ios = lib$(1).a
CFG_LIB_GLOB_x86_64-apple-ios = lib$(1)-*.a
CFG_INSTALL_ONLY_RLIB_x86_64-apple-ios = 1
CFG_STATIC_LIB_NAME_x86_64-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_x86_64-apple-ios = lib$(1)-*.a.dSYM
CFG_CFLAGS_x86_64-apple-ios := $(CFG_IOSSIM_FLAGS_x86_64-apple-ios)
CFG_JEMALLOC_CFLAGS_x86_64-apple-ios := $(CFG_IOSSIM_FLAGS_x86_64-apple-ios)
CFG_GCCISH_CFLAGS_x86_64-apple-ios := -Wall -Werror -fPIC $(CFG_IOSSIM_FLAGS_x86_64-apple-ios)
CFG_GCCISH_CXXFLAGS_x86_64-apple-ios := -fno-rtti $(CFG_IOSSIM_FLAGS_x86_64-apple-ios) -I$(CFG_IOSSIM_SDK_x86_64-apple-ios)/usr/include/c++/4.2.1
CFG_GCCISH_LINK_FLAGS_x86_64-apple-ios := -lpthread -Wl,-no_compact_unwind -m64 -Wl,-syslibroot $(CFG_IOSSIM_SDK_x86_64-apple-ios)
CFG_GCCISH_DEF_FLAG_x86_64-apple-ios := -Wl,-exported_symbols_list,
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-apple-ios :=
CFG_GCCISH_POST_LIB_FLAGS_x86_64-apple-ios :=
CFG_DEF_SUFFIX_x86_64-apple-ios := .darwin.def
CFG_LLC_FLAGS_x86_64-apple-ios :=
CFG_INSTALL_NAME_x86_64-apple-ios = -Wl,-install_name,@rpath/$(1)
CFG_LIBUV_LINK_FLAGS_x86_64-apple-ios :=
CFG_EXE_SUFFIX_x86_64-apple-ios :=
CFG_WINDOWSY_x86_64-apple-ios :=
CFG_UNIXY_x86_64-apple-ios := 1
CFG_PATH_MUNGE_x86_64-apple-ios := true
CFG_LDPATH_x86_64-apple-ios :=
CFG_RUN_x86_64-apple-ios = $(2)
CFG_RUN_TARG_x86_64-apple-ios = $(call CFG_RUN_x86_64-apple-ios,,$(2))
CFG_GNU_TRIPLE_i386-apple-ios := x86_64-apple-ios

View File

@ -8,8 +8,8 @@ CFG_LIB_NAME_x86_64-pc-windows-gnu=$(1).dll
CFG_STATIC_LIB_NAME_x86_64-pc-windows-gnu=$(1).lib CFG_STATIC_LIB_NAME_x86_64-pc-windows-gnu=$(1).lib
CFG_LIB_GLOB_x86_64-pc-windows-gnu=$(1)-*.dll CFG_LIB_GLOB_x86_64-pc-windows-gnu=$(1)-*.dll
CFG_LIB_DSYM_GLOB_x86_64-pc-windows-gnu=$(1)-*.dylib.dSYM CFG_LIB_DSYM_GLOB_x86_64-pc-windows-gnu=$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_x86_64-pc-windows-gnu := -m64 -D_WIN32_WINNT=0x0600 $(CFLAGS) CFG_JEMALLOC_CFLAGS_x86_64-pc-windows-gnu := -m64 -D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS)
CFG_GCCISH_CFLAGS_x86_64-pc-windows-gnu := -Wall -Werror -g -m64 -D_WIN32_WINNT=0x0600 $(CFLAGS) CFG_GCCISH_CFLAGS_x86_64-pc-windows-gnu := -Wall -Werror -g -m64 -D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS)
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-gnu := -fno-rtti $(CXXFLAGS) CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-gnu := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_x86_64-pc-windows-gnu := -shared -g -m64 CFG_GCCISH_LINK_FLAGS_x86_64-pc-windows-gnu := -shared -g -m64
CFG_GCCISH_DEF_FLAG_x86_64-pc-windows-gnu := CFG_GCCISH_DEF_FLAG_x86_64-pc-windows-gnu :=
@ -22,7 +22,7 @@ CFG_EXE_SUFFIX_x86_64-pc-windows-gnu := .exe
CFG_WINDOWSY_x86_64-pc-windows-gnu := 1 CFG_WINDOWSY_x86_64-pc-windows-gnu := 1
CFG_UNIXY_x86_64-pc-windows-gnu := CFG_UNIXY_x86_64-pc-windows-gnu :=
CFG_PATH_MUNGE_x86_64-pc-windows-gnu := CFG_PATH_MUNGE_x86_64-pc-windows-gnu :=
CFG_LDPATH_x86_64-pc-windows-gnu :=$(CFG_LDPATH_x86_64-pc-windows-gnu):$(PATH) CFG_LDPATH_x86_64-pc-windows-gnu :=
CFG_RUN_x86_64-pc-windows-gnu=PATH="$(CFG_LDPATH_x86_64-pc-windows-gnu):$(1)" $(2) CFG_RUN_x86_64-pc-windows-gnu=$(2)
CFG_RUN_TARG_x86_64-pc-windows-gnu=$(call CFG_RUN_x86_64-pc-windows-gnu,$(HLIB$(1)_H_$(CFG_BUILD)),$(2)) CFG_RUN_TARG_x86_64-pc-windows-gnu=$(call CFG_RUN_x86_64-pc-windows-gnu,,$(2))
CFG_GNU_TRIPLE_x86_64-pc-windows-gnu := x86_64-w64-mingw32 CFG_GNU_TRIPLE_x86_64-pc-windows-gnu := x86_64-w64-mingw32

View File

@ -0,0 +1,26 @@
# x86_64-pc-openbsd-elf configuration
CC_x86_64-unknown-openbsd=$(CC)
CXX_x86_64-unknown-openbsd=$(CXX)
CPP_x86_64-unknown-openbsd=$(CPP)
AR_x86_64-unknown-openbsd=$(AR)
CFG_LIB_NAME_x86_64-unknown-openbsd=lib$(1).so
CFG_STATIC_LIB_NAME_x86_64-unknown-openbsd=lib$(1).a
CFG_LIB_GLOB_x86_64-unknown-openbsd=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_x86_64-unknown-openbsd=$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_x86_64-unknown-openbsd := -m64 -I/usr/include $(CFLAGS)
CFG_GCCISH_CFLAGS_x86_64-unknown-openbsd := -Wall -Werror -g -fPIC -m64 -I/usr/include $(CFLAGS)
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-openbsd := -shared -fPIC -g -pthread -m64
CFG_GCCISH_DEF_FLAG_x86_64-unknown-openbsd := -Wl,--export-dynamic,--dynamic-list=
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-openbsd := -Wl,-whole-archive
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-openbsd := -Wl,-no-whole-archive
CFG_DEF_SUFFIX_x86_64-unknown-openbsd := .bsd.def
CFG_LLC_FLAGS_x86_64-unknown-openbsd :=
CFG_INSTALL_NAME_x86_64-unknown-openbsd =
CFG_EXE_SUFFIX_x86_64-unknown-openbsd :=
CFG_WINDOWSY_x86_64-unknown-openbsd :=
CFG_UNIXY_x86_64-unknown-openbsd := 1
CFG_PATH_MUNGE_x86_64-unknown-openbsd :=
CFG_LDPATH_x86_64-unknown-openbsd :=
CFG_RUN_x86_64-unknown-openbsd=$(2)
CFG_RUN_TARG_x86_64-unknown-openbsd=$(call CFG_RUN_x86_64-unknown-openbsd,,$(2))
CFG_GNU_TRIPLE_x86_64-unknown-openbsd := x86_64-unknown-openbsd

View File

@ -51,10 +51,10 @@
TARGET_CRATES := libc std flate arena term \ TARGET_CRATES := libc std flate arena term \
serialize getopts collections test rand \ serialize getopts collections test rand \
log regex graphviz core rbml alloc \ log graphviz core rbml alloc \
unicode unicode rustc_bitflags
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \ RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
rustc_trans rustc_back rustc_llvm rustc_trans rustc_back rustc_llvm rustc_privacy
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
CRATES := $(TARGET_CRATES) $(HOST_CRATES) CRATES := $(TARGET_CRATES) $(HOST_CRATES)
TOOLS := compiletest rustdoc rustc rustbook TOOLS := compiletest rustdoc rustc rustbook
@ -64,22 +64,27 @@ DEPS_libc := core
DEPS_unicode := core DEPS_unicode := core
DEPS_alloc := core libc native:jemalloc DEPS_alloc := core libc native:jemalloc
DEPS_std := core libc rand alloc collections unicode \ DEPS_std := core libc rand alloc collections unicode \
native:rust_builtin native:backtrace native:rustrt_native native:rust_builtin native:backtrace native:rustrt_native \
rustc_bitflags
DEPS_graphviz := std DEPS_graphviz := std
DEPS_syntax := std term serialize log fmt_macros arena libc DEPS_syntax := std term serialize log fmt_macros arena libc
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \ DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
rustc_typeck rustc_resolve log syntax serialize rustc_llvm rustc_trans rustc_typeck rustc_resolve log syntax serialize rustc_llvm \
rustc_trans rustc_privacy
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \ DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
log syntax serialize rustc_llvm log syntax serialize rustc_llvm
DEPS_rustc_typeck := rustc syntax DEPS_rustc_typeck := rustc syntax
DEPS_rustc_borrowck := rustc log graphviz syntax DEPS_rustc_borrowck := rustc log graphviz syntax
DEPS_rustc_resolve := rustc log syntax DEPS_rustc_resolve := rustc log syntax
DEPS_rustc_privacy := rustc log syntax
DEPS_rustc := syntax flate arena serialize getopts rbml \ DEPS_rustc := syntax flate arena serialize getopts rbml \
log graphviz rustc_llvm rustc_back log graphviz rustc_llvm rustc_back
DEPS_rustc_llvm := native:rustllvm libc std DEPS_rustc_llvm := native:rustllvm libc std
DEPS_rustc_back := std syntax rustc_llvm flate log libc DEPS_rustc_back := std syntax rustc_llvm flate log libc
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \ DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
test test
DEPS_rustc_bitflags := core
DEPS_flate := std native:miniz DEPS_flate := std native:miniz
DEPS_arena := std DEPS_arena := std
DEPS_graphviz := std DEPS_graphviz := std
@ -90,16 +95,15 @@ DEPS_term := std log
DEPS_getopts := std DEPS_getopts := std
DEPS_collections := core alloc unicode DEPS_collections := core alloc unicode
DEPS_num := std DEPS_num := std
DEPS_test := std getopts serialize rbml term regex native:rust_test_helpers DEPS_test := std getopts serialize rbml term native:rust_test_helpers
DEPS_rand := core DEPS_rand := core
DEPS_log := std regex DEPS_log := std
DEPS_regex := std
DEPS_fmt_macros = std DEPS_fmt_macros = std
TOOL_DEPS_compiletest := test getopts TOOL_DEPS_compiletest := test getopts
TOOL_DEPS_rustdoc := rustdoc TOOL_DEPS_rustdoc := rustdoc
TOOL_DEPS_rustc := rustc_driver TOOL_DEPS_rustc := rustc_driver
TOOL_DEPS_rustbook := std regex rustdoc TOOL_DEPS_rustbook := std rustdoc
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
@ -111,6 +115,7 @@ ONLY_RLIB_alloc := 1
ONLY_RLIB_rand := 1 ONLY_RLIB_rand := 1
ONLY_RLIB_collections := 1 ONLY_RLIB_collections := 1
ONLY_RLIB_unicode := 1 ONLY_RLIB_unicode := 1
ONLY_RLIB_rustc_bitflags := 1
################################################################################ ################################################################################
# You should not need to edit below this line # You should not need to edit below this line
@ -122,12 +127,12 @@ DOC_CRATES := $(filter-out rustc, \
$(filter-out rustc_borrowck, \ $(filter-out rustc_borrowck, \
$(filter-out rustc_resolve, \ $(filter-out rustc_resolve, \
$(filter-out rustc_driver, \ $(filter-out rustc_driver, \
$(filter-out rustc_privacy, \
$(filter-out log, \ $(filter-out log, \
$(filter-out regex, \
$(filter-out getopts, \ $(filter-out getopts, \
$(filter-out syntax, $(CRATES))))))))))) $(filter-out syntax, $(CRATES)))))))))))
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \ COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
rustc_typeck rustc_driver syntax rustc_typeck rustc_driver syntax rustc_privacy
# This macro creates some simple definitions for each crate being built, just # This macro creates some simple definitions for each crate being built, just
# some munging of all of the parameters above. # some munging of all of the parameters above.

View File

@ -109,8 +109,6 @@ distcheck-tar-src: dist-tar-src
# Unix binary installer tarballs # Unix binary installer tarballs
###################################################################### ######################################################################
NON_INSTALLED_PREFIXES=COPYRIGHT,LICENSE-APACHE,LICENSE-MIT,README.md,version
define DEF_INSTALLER define DEF_INSTALLER
$$(eval $$(call DEF_PREPARE,dir-$(1))) $$(eval $$(call DEF_PREPARE,dir-$(1)))
@ -124,19 +122,23 @@ dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD) dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
dist-install-dir-$(1): PREPARE_CLEAN=true dist-install-dir-$(1): PREPARE_CLEAN=true
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
$$(Q)mkdir -p $$(PREPARE_DEST_DIR)/share/doc/rust $$(Q)mkdir -p $$(PREPARE_DEST_DIR)/share/doc/rust
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)/share/doc/rust $$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)/share/doc/rust
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)/share/doc/rust $$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)/share/doc/rust
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)/share/doc/rust $$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)/share/doc/rust
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)/share/doc/rust $$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)/share/doc/rust
# This tiny morsel of metadata is used by rust-packaging
$$(Q)echo "$(CFG_VERSION)" > $$(PREPARE_DEST_DIR)/version
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1) prepare-overlay-$(1):
$$(Q)rm -Rf tmp/dist/$$(PKG_NAME)-$(1)-overlay
$$(Q)mkdir -p tmp/dist/$$(PKG_NAME)-$(1)-overlay
$$(Q)cp $$(S)COPYRIGHT tmp/dist/$$(PKG_NAME)-$(1)-overlay/
$$(Q)cp $$(S)LICENSE-APACHE tmp/dist/$$(PKG_NAME)-$(1)-overlay/
$$(Q)cp $$(S)LICENSE-MIT tmp/dist/$$(PKG_NAME)-$(1)-overlay/
$$(Q)cp $$(S)README.md tmp/dist/$$(PKG_NAME)-$(1)-overlay/
# This tiny morsel of metadata is used by rust-packaging
$$(Q)echo "$(CFG_VERSION)" > tmp/dist/$$(PKG_NAME)-$(1)-overlay/version
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1) prepare-overlay-$(1)
@$(call E, build: $$@) @$(call E, build: $$@)
# Copy essential gcc components into installer # Copy essential gcc components into installer
ifdef CFG_WINDOWSY_$(1) ifdef CFG_WINDOWSY_$(1)
@ -146,13 +148,12 @@ ifdef CFG_WINDOWSY_$(1)
endif endif
$$(Q)$$(S)src/rust-installer/gen-installer.sh \ $$(Q)$$(S)src/rust-installer/gen-installer.sh \
--product-name=Rust \ --product-name=Rust \
--verify-bin=rustc \
--rel-manifest-dir=rustlib \ --rel-manifest-dir=rustlib \
--success-message=Rust-is-ready-to-roll. \ --success-message=Rust-is-ready-to-roll. \
--image-dir=tmp/dist/$$(PKG_NAME)-$(1)-image \ --image-dir=tmp/dist/$$(PKG_NAME)-$(1)-image \
--work-dir=tmp/dist \ --work-dir=tmp/dist \
--output-dir=dist \ --output-dir=dist \
--non-installed-prefixes=$$(NON_INSTALLED_PREFIXES) \ --non-installed-overlay=tmp/dist/$$(PKG_NAME)-$(1)-overlay \
--package-name=$$(PKG_NAME)-$(1) \ --package-name=$$(PKG_NAME)-$(1) \
--component-name=rustc \ --component-name=rustc \
--legacy-manifest-dirs=rustlib,cargo --legacy-manifest-dirs=rustlib,cargo

View File

@ -25,9 +25,15 @@
# L10N_LANGS are the languages for which the docs have been # L10N_LANGS are the languages for which the docs have been
# translated. # translated.
###################################################################### ######################################################################
DOCS := index intro tutorial complement-bugreport \ DOCS := index intro tutorial \
complement-lang-faq complement-design-faq complement-project-faq \ complement-lang-faq complement-design-faq complement-project-faq \
rustdoc reference rustdoc reference grammar
# Legacy guides, preserved for a while to reduce the number of 404s
DOCS += guide-crates guide-error-handling guide-ffi guide-macros guide \
guide-ownership guide-plugins guide-pointers guide-strings guide-tasks \
guide-testing
PDF_DOCS := reference PDF_DOCS := reference
@ -67,7 +73,7 @@ RUSTBOOK = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTBOOK_EXE)
D := $(S)src/doc D := $(S)src/doc
DOC_TARGETS := trpl DOC_TARGETS := trpl style
COMPILER_DOC_TARGETS := COMPILER_DOC_TARGETS :=
DOC_L10N_TARGETS := DOC_L10N_TARGETS :=
@ -79,27 +85,16 @@ else
HTML_DEPS := HTML_DEPS :=
endif endif
# Check for the various external utilities for the EPUB/PDF docs: # Check for xelatex
ifeq ($(CFG_LUALATEX),) ifneq ($(CFG_XELATEX),)
$(info cfg: no lualatex found, deferring to xelatex)
ifeq ($(CFG_XELATEX),)
$(info cfg: no xelatex found, deferring to pdflatex)
ifeq ($(CFG_PDFLATEX),)
$(info cfg: no pdflatex found, disabling LaTeX docs)
NO_PDF_DOCS = 1
else
CFG_LATEX := $(CFG_PDFLATEX)
endif
else
CFG_LATEX := $(CFG_XELATEX) CFG_LATEX := $(CFG_XELATEX)
XELATEX = 1 XELATEX = 1
endif
else else
CFG_LATEX := $(CFG_LUALATEX) $(info cfg: no xelatex found, disabling LaTeX docs)
NO_PDF_DOCS = 1
endif endif
ifeq ($(CFG_PANDOC),) ifeq ($(CFG_PANDOC),)
$(info cfg: no pandoc found, omitting PDF and EPUB docs) $(info cfg: no pandoc found, omitting PDF and EPUB docs)
ONLY_HTML_DOCS = 1 ONLY_HTML_DOCS = 1
@ -134,21 +129,21 @@ doc/:
HTML_DEPS += doc/rust.css HTML_DEPS += doc/rust.css
doc/rust.css: $(D)/rust.css | doc/ doc/rust.css: $(D)/rust.css | doc/
@$(call E, cp: $@) @$(call E, cp: $@)
$(Q)cp -a $< $@ 2> /dev/null $(Q)cp -PRp $< $@ 2> /dev/null
HTML_DEPS += doc/favicon.inc HTML_DEPS += doc/favicon.inc
doc/favicon.inc: $(D)/favicon.inc | doc/ doc/favicon.inc: $(D)/favicon.inc | doc/
@$(call E, cp: $@) @$(call E, cp: $@)
$(Q)cp -a $< $@ 2> /dev/null $(Q)cp -PRp $< $@ 2> /dev/null
doc/full-toc.inc: $(D)/full-toc.inc | doc/ doc/full-toc.inc: $(D)/full-toc.inc | doc/
@$(call E, cp: $@) @$(call E, cp: $@)
$(Q)cp -a $< $@ 2> /dev/null $(Q)cp -PRp $< $@ 2> /dev/null
HTML_DEPS += doc/footer.inc HTML_DEPS += doc/footer.inc
doc/footer.inc: $(D)/footer.inc | doc/ doc/footer.inc: $(D)/footer.inc | doc/
@$(call E, cp: $@) @$(call E, cp: $@)
$(Q)cp -a $< $@ 2> /dev/null $(Q)cp -PRp $< $@ 2> /dev/null
# The (english) documentation for each doc item. # The (english) documentation for each doc item.
@ -277,6 +272,12 @@ compiler-docs: $(COMPILER_DOC_TARGETS)
trpl: doc/book/index.html trpl: doc/book/index.html
doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md) doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md) | doc/
$(Q)rm -rf doc/book $(Q)rm -rf doc/book
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book $(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book
style: doc/style/index.html
doc/style/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/style/*.md) | doc/
$(Q)rm -rf doc/style
$(Q)$(RUSTBOOK) build $(S)src/doc/style doc/style

View File

@ -14,6 +14,11 @@ B = $(CFG_BUILD_DIR)/$(CFG_BUILD)/stage2/
L = $(B)lib/rustlib/$(CFG_BUILD)/lib L = $(B)lib/rustlib/$(CFG_BUILD)/lib
LD = $(CFG_BUILD)/stage2/lib/rustlib/$(CFG_BUILD)/lib/ LD = $(CFG_BUILD)/stage2/lib/rustlib/$(CFG_BUILD)/lib/
RUSTC = $(STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) RUSTC = $(STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD))
ifeq ($(CFG_OSTYPE),apple-darwin)
FLEX_LDFLAGS=-ll
else
FLEX_LDFLAGS=-lfl
endif
# Run the reference lexer against libsyntax and compare the tokens and spans. # Run the reference lexer against libsyntax and compare the tokens and spans.
# If "// ignore-lexer-test" is present in the file, it will be ignored. # If "// ignore-lexer-test" is present in the file, it will be ignored.
@ -67,3 +72,46 @@ $(info cfg: javac not available, skipping lexer test...)
check-lexer: check-lexer:
endif endif
$(BG)lex.yy.c: $(SG)lexer.l $(BG)
@$(call E, flex: $@)
$(Q)$(CFG_FLEX) -o $@ $<
$(BG)lexer-lalr.o: $(BG)lex.yy.c $(BG)parser-lalr.tab.h
@$(call E, cc: $@)
$(Q)$(CFG_CC) -include $(BG)parser-lalr.tab.h -c -o $@ $<
$(BG)parser-lalr.tab.c $(BG)parser-lalr.tab.h: $(SG)parser-lalr.y
@$(call E, bison: $@)
$(Q)$(CFG_BISON) $< --output=$(BG)parser-lalr.tab.c --defines=$(BG)parser-lalr.tab.h \
--name-prefix=rs --warnings=error=all
$(BG)parser-lalr.o: $(BG)parser-lalr.tab.c
@$(call E, cc: $@)
$(Q)$(CFG_CC) -c -o $@ $<
$(BG)parser-lalr-main.o: $(SG)parser-lalr-main.c
@$(call E, cc: $@)
$(Q)$(CFG_CC) -std=c99 -c -o $@ $<
$(BG)parser-lalr: $(BG)parser-lalr.o $(BG)parser-lalr-main.o $(BG)lexer-lalr.o
@$(call E, cc: $@)
$(Q)$(CFG_CC) -o $@ $^ $(FLEX_LDFLAGS)
ifdef CFG_FLEX
ifdef CFG_BISON
check-grammar: $(BG) $(BG)parser-lalr
$(info Verifying grammar ...)
$(SG)testparser.py -p $(BG)parser-lalr -s $(S)src
else
$(info cfg: bison not available, skipping parser test...)
check-grammar:
endif
else
$(info cfg: flex not available, skipping parser test...)
check-grammar:
endif

View File

@ -58,14 +58,13 @@ tmp/empty_dir:
# Android runtime setup # Android runtime setup
# FIXME: This probably belongs somewhere else # FIXME: This probably belongs somewhere else
# target platform specific variables # target platform specific variables for android
# for arm-linux-androidabi
define DEF_ADB_DEVICE_STATUS define DEF_ADB_DEVICE_STATUS
CFG_ADB_DEVICE_STATUS=$(1) CFG_ADB_DEVICE_STATUS=$(1)
endef endef
$(foreach target,$(CFG_TARGET), \ $(foreach target,$(CFG_TARGET), \
$(if $(findstring $(target),"arm-linux-androideabi"), \ $(if $(findstring android, $(target)), \
$(if $(findstring adb,$(CFG_ADB)), \ $(if $(findstring adb,$(CFG_ADB)), \
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \ $(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
$(info install: install-runtime-target for $(target) enabled \ $(info install: install-runtime-target for $(target) enabled \
@ -117,8 +116,11 @@ install-runtime-target-$(1)-cleanup:
$$(call ADB_SHELL,rm,$$(CFG_RUNTIME_PUSH_DIR)/$$(call CFG_LIB_GLOB_$(1),$$(crate)));) $$(call ADB_SHELL,rm,$$(CFG_RUNTIME_PUSH_DIR)/$$(call CFG_LIB_GLOB_$(1),$$(crate)));)
endef endef
$(eval $(call INSTALL_RUNTIME_TARGET_N,arm-linux-androideabi,$(CFG_BUILD))) $(foreach target,$(CFG_TARGET), \
$(eval $(call INSTALL_RUNTIME_TARGET_CLEANUP_N,arm-linux-androideabi)) $(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \
$(eval $(call INSTALL_RUNTIME_TARGET_N,$(taget),$(CFG_BUILD))) \
$(eval $(call INSTALL_RUNTIME_TARGET_CLEANUP_N,$(target))) \
))
install-runtime-target: \ install-runtime-target: \
install-runtime-target-arm-linux-androideabi-cleanup \ install-runtime-target-arm-linux-androideabi-cleanup \

View File

@ -15,8 +15,10 @@
# The version number # The version number
CFG_RELEASE_NUM=1.0.0 CFG_RELEASE_NUM=1.0.0
# An optional number to put after the label, e.g. '2' -> '-beta2' # An optional number to put after the label, e.g. '.2' -> '-beta.2'
CFG_BETA_CYCLE= # NB Make sure it starts with a dot to conform to semver pre-release
# versions (section 9)
CFG_PRERELEASE_VERSION=.2
CFG_FILENAME_EXTRA=4e7c5e5c CFG_FILENAME_EXTRA=4e7c5e5c
@ -28,9 +30,8 @@ CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
CFG_DISABLE_UNSTABLE_FEATURES=1 CFG_DISABLE_UNSTABLE_FEATURES=1
endif endif
ifeq ($(CFG_RELEASE_CHANNEL),beta) ifeq ($(CFG_RELEASE_CHANNEL),beta)
# The beta channel is temporarily called 'alpha' CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE) CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
CFG_DISABLE_UNSTABLE_FEATURES=1 CFG_DISABLE_UNSTABLE_FEATURES=1
endif endif
ifeq ($(CFG_RELEASE_CHANNEL),nightly) ifeq ($(CFG_RELEASE_CHANNEL),nightly)
@ -60,17 +61,21 @@ SPACE :=
SPACE += SPACE +=
ifneq ($(CFG_GIT),) ifneq ($(CFG_GIT),)
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),) ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
CFG_VER_DATE = $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 --pretty=format:'%ci') CFG_VER_DATE = $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 --date=short --pretty=format:'%cd')
CFG_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse HEAD) CFG_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse HEAD)
CFG_SHORT_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse --short=9 HEAD) CFG_SHORT_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse --short=9 HEAD)
CFG_VERSION += ($(CFG_SHORT_VER_HASH) $(CFG_VER_DATE)) CFG_VERSION += ($(CFG_SHORT_VER_HASH) $(CFG_VER_DATE))
endif endif
endif endif
CFG_BUILD_DATE = $(shell date +%F)
CFG_VERSION += (built $(CFG_BUILD_DATE))
# Windows exe's need numeric versions - don't use anything but # Windows exe's need numeric versions - don't use anything but
# numbers and dots here # numbers and dots here
CFG_VERSION_WIN = $(CFG_RELEASE_NUM) CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
CFG_INFO := $(info cfg: version $(CFG_VERSION))
###################################################################### ######################################################################
# More configuration # More configuration
@ -178,6 +183,7 @@ endif
ifndef CFG_DISABLE_VALGRIND_RPASS ifndef CFG_DISABLE_VALGRIND_RPASS
$(info cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS)) $(info cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS))
$(info cfg: valgrind-rpass command set to $(CFG_VALGRIND))
CFG_VALGRIND_RPASS :=$(CFG_VALGRIND) CFG_VALGRIND_RPASS :=$(CFG_VALGRIND)
else else
CFG_VALGRIND_RPASS := CFG_VALGRIND_RPASS :=
@ -261,7 +267,7 @@ endif
###################################################################### ######################################################################
# FIXME: x86-ism # FIXME: x86-ism
LLVM_COMPONENTS=x86 arm aarch64 mips ipo bitreader bitwriter linker asmparser mcjit \ LLVM_COMPONENTS=x86 arm aarch64 mips powerpc ipo bitreader bitwriter linker asmparser mcjit \
interpreter instrumentation interpreter instrumentation
# Only build these LLVM tools # Only build these LLVM tools
@ -314,6 +320,7 @@ endif
ifdef CFG_VER_HASH ifdef CFG_VER_HASH
export CFG_VER_HASH export CFG_VER_HASH
endif endif
export CFG_BUILD_DATE
export CFG_VERSION export CFG_VERSION
export CFG_VERSION_WIN export CFG_VERSION_WIN
export CFG_RELEASE export CFG_RELEASE
@ -329,10 +336,10 @@ ifdef CFG_DISABLE_UNSTABLE_FEATURES
CFG_INFO := $(info cfg: disabling unstable features (CFG_DISABLE_UNSTABLE_FEATURES)) CFG_INFO := $(info cfg: disabling unstable features (CFG_DISABLE_UNSTABLE_FEATURES))
# Turn on feature-staging # Turn on feature-staging
export CFG_DISABLE_UNSTABLE_FEATURES export CFG_DISABLE_UNSTABLE_FEATURES
endif
# Subvert unstable feature lints to do the self-build # Subvert unstable feature lints to do the self-build
export CFG_BOOTSTRAP_KEY
export RUSTC_BOOTSTRAP_KEY:=$(CFG_BOOTSTRAP_KEY) export RUSTC_BOOTSTRAP_KEY:=$(CFG_BOOTSTRAP_KEY)
endif
export CFG_BOOTSTRAP_KEY
###################################################################### ######################################################################
# Per-stage targets and runner # Per-stage targets and runner

View File

@ -177,7 +177,7 @@ define CFG_MAKE_TOOLCHAIN
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \ $$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
$$(call CFG_INSTALL_NAME_$(1),$$(4)) $$(call CFG_INSTALL_NAME_$(1),$$(4))
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel),) ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
# We're using llvm-mc as our assembler because it supports # We're using llvm-mc as our assembler because it supports
# .cfi pseudo-ops on mac # .cfi pseudo-ops on mac
@ -189,7 +189,7 @@ define CFG_MAKE_TOOLCHAIN
-o=$$(1) -o=$$(1)
else else
# For the ARM, AARCH64 and MIPS crosses, use the toolchain assembler # For the ARM, AARCH64, MIPS and POWER crosses, use the toolchain assembler
# FIXME: We should be able to use the LLVM assembler # FIXME: We should be able to use the LLVM assembler
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \ CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1) $$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)

View File

@ -134,7 +134,7 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
$$(if $$(findstring $(3), $$(PREPARE_HOST)), \ $$(if $$(findstring $(3), $$(PREPARE_HOST)), \
$$(call PREPARE_DIR,$$(PREPARE_WORKING_DEST_LIB_DIR)) \ $$(call PREPARE_DIR,$$(PREPARE_WORKING_DEST_LIB_DIR)) \
$$(foreach crate,$$(TARGET_CRATES), \ $$(foreach crate,$$(TARGET_CRATES), \
$$(if $$(findstring 1, $$(ONLY_RLIB_$$(crate))),, \ $$(if $$(or $$(findstring 1, $$(ONLY_RLIB_$$(crate))),$$(findstring 1,$$(CFG_INSTALL_ONLY_RLIB_$(2)))),, \
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))) \ $$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))) \
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate)))) \ $$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate)))) \
$$(if $$(findstring $(2),$$(CFG_HOST)), \ $$(if $$(findstring $(2),$$(CFG_HOST)), \

View File

@ -139,7 +139,7 @@ ifeq ($$(CFG_WINDOWSY_$(1)), 1)
JEMALLOC_ARGS_$(1) := --enable-lazy-lock JEMALLOC_ARGS_$(1) := --enable-lazy-lock
else ifeq ($(OSTYPE_$(1)), apple-ios) else ifeq ($(OSTYPE_$(1)), apple-ios)
JEMALLOC_ARGS_$(1) := --disable-tls JEMALLOC_ARGS_$(1) := --disable-tls
else ifeq ($(OSTYPE_$(1)), linux-androideabi) else ifeq ($(findstring android, $(OSTYPE_$(1))), android)
JEMALLOC_ARGS_$(1) := --disable-tls JEMALLOC_ARGS_$(1) := --disable-tls
endif endif

View File

@ -38,16 +38,9 @@ ifdef CHECK_IGNORED
TESTARGS += --ignored TESTARGS += --ignored
endif endif
TEST_BENCH =
# Arguments to the cfail/rfail/rpass/bench tests # Arguments to the cfail/rfail/rpass/bench tests
ifdef CFG_VALGRIND ifdef CFG_VALGRIND
CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)" CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
TEST_BENCH =
endif
ifdef PLEASE_BENCH
TEST_BENCH = --bench
endif endif
# Arguments to the perf tests # Arguments to the perf tests
@ -57,6 +50,11 @@ endif
CTEST_TESTARGS := $(TESTARGS) CTEST_TESTARGS := $(TESTARGS)
# --bench is only relevant for crate tests, not for the compile tests
ifdef PLEASE_BENCH
TESTARGS += --bench
endif
ifdef VERBOSE ifdef VERBOSE
CTEST_TESTARGS += --verbose CTEST_TESTARGS += --verbose
endif endif
@ -109,14 +107,13 @@ endef
$(foreach target,$(CFG_TARGET), \ $(foreach target,$(CFG_TARGET), \
$(eval $(call DEF_TARGET_COMMANDS,$(target)))) $(eval $(call DEF_TARGET_COMMANDS,$(target))))
# Target platform specific variables # Target platform specific variables for android
# for arm-linux-androidabi
define DEF_ADB_DEVICE_STATUS define DEF_ADB_DEVICE_STATUS
CFG_ADB_DEVICE_STATUS=$(1) CFG_ADB_DEVICE_STATUS=$(1)
endef endef
$(foreach target,$(CFG_TARGET), \ $(foreach target,$(CFG_TARGET), \
$(if $(findstring $(target),"arm-linux-androideabi"), \ $(if $(findstring android, $(target)), \
$(if $(findstring adb,$(CFG_ADB)), \ $(if $(findstring adb,$(CFG_ADB)), \
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[:_A-Za-z0-9-]+[[:blank:]]+device')), \ $(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[:_A-Za-z0-9-]+[[:blank:]]+device')), \
$(info check: android device attached) \ $(info check: android device attached) \
@ -137,12 +134,14 @@ $(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \
$(shell $(CFG_ADB) remount 1>/dev/null) \ $(shell $(CFG_ADB) remount 1>/dev/null) \
$(shell $(CFG_ADB) shell rm -r $(CFG_ADB_TEST_DIR) >/dev/null) \ $(shell $(CFG_ADB) shell rm -r $(CFG_ADB_TEST_DIR) >/dev/null) \
$(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)) \ $(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)) \
$(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)/tmp) \
$(shell $(CFG_ADB) push $(S)src/etc/adb_run_wrapper.sh $(CFG_ADB_TEST_DIR) 1>/dev/null) \ $(shell $(CFG_ADB) push $(S)src/etc/adb_run_wrapper.sh $(CFG_ADB_TEST_DIR) 1>/dev/null) \
$(foreach target,$(CFG_TARGET), \
$(if $(findstring android, $(target)), \
$(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)/$(target)) \
$(foreach crate,$(TARGET_CRATES), \ $(foreach crate,$(TARGET_CRATES), \
$(shell $(CFG_ADB) push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(call CFG_LIB_GLOB_arm-linux-androideabi,$(crate)) \ $(shell $(CFG_ADB) push $(TLIB2_T_$(target)_H_$(CFG_BUILD))/$(call CFG_LIB_GLOB_$(target),$(crate)) \
$(CFG_ADB_TEST_DIR))) \ $(CFG_ADB_TEST_DIR)/$(target))), \
) )))
else else
CFG_ADB_TEST_DIR= CFG_ADB_TEST_DIR=
endif endif
@ -164,7 +163,8 @@ $(foreach file,$(wildcard $(S)src/doc/trpl/*.md), \
###################################################################### ######################################################################
# The main testing target. Tests lots of stuff. # The main testing target. Tests lots of stuff.
check: cleantmptestlogs cleantestlibs check-notidy tidy check: cleantmptestlogs cleantestlibs all check-stage2 tidy
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
# As above but don't bother running tidy. # As above but don't bother running tidy.
check-notidy: cleantmptestlogs cleantestlibs all check-stage2 check-notidy: cleantmptestlogs cleantestlibs all check-stage2
@ -174,12 +174,12 @@ check-notidy: cleantmptestlogs cleantestlibs all check-stage2
check-lite: cleantestlibs cleantmptestlogs \ check-lite: cleantestlibs cleantmptestlogs \
$(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \ $(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \
check-stage2-rpass check-stage2-rpass-valgrind \ check-stage2-rpass check-stage2-rpass-valgrind \
check-stage2-rfail check-stage2-cfail check-stage2-rmake check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
# Only check the 'reference' tests: rpass/cfail/rfail/rmake. # Only check the 'reference' tests: rpass/cfail/rfail/rmake.
check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \ check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \
check-stage2-rfail check-stage2-cfail check-stage2-rmake check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
# Only check the docs. # Only check the docs.
@ -237,57 +237,24 @@ cleantestlibs:
###################################################################### ######################################################################
ifdef CFG_NOTIDY ifdef CFG_NOTIDY
.PHONY: tidy
tidy: tidy:
else else
ALL_CS := $(wildcard $(S)src/rt/*.cpp \
$(S)src/rt/*/*.cpp \
$(S)src/rt/*/*/*.cpp \
$(S)src/rustllvm/*.cpp)
ALL_CS := $(filter-out $(S)src/rt/miniz.cpp \
$(wildcard $(S)src/rt/hoedown/src/*.c) \
$(wildcard $(S)src/rt/hoedown/bin/*.c) \
,$(ALL_CS))
ALL_HS := $(wildcard $(S)src/rt/*.h \
$(S)src/rt/*/*.h \
$(S)src/rt/*/*/*.h \
$(S)src/rustllvm/*.h)
ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
$(S)src/rt/valgrind/memcheck.h \
$(S)src/rt/msvc/typeof.h \
$(S)src/rt/msvc/stdint.h \
$(S)src/rt/msvc/inttypes.h \
$(wildcard $(S)src/rt/hoedown/src/*.h) \
$(wildcard $(S)src/rt/hoedown/bin/*.h) \
,$(ALL_HS))
# Run the tidy script in multiple parts to avoid huge 'echo' commands # Run the tidy script in multiple parts to avoid huge 'echo' commands
tidy: .PHONY: tidy
tidy: tidy-basic tidy-binaries tidy-errors tidy-features
endif
.PHONY: tidy-basic
tidy-basic:
@$(call E, check: formatting) @$(call E, check: formatting)
$(Q)find $(S)src -name '*.r[sc]' \ $(Q) $(CFG_PYTHON) $(S)src/etc/tidy.py $(S)src/
-and -not -regex '^$(S)src/jemalloc.*' \
-and -not -regex '^$(S)src/libuv.*' \ .PHONY: tidy-binaries
-and -not -regex '^$(S)src/llvm.*' \ tidy-binaries:
-and -not -regex '^$(S)src/gyp.*' \ @$(call E, check: binaries)
-and -not -regex '^$(S)src/libbacktrace.*' \
-print0 \
| xargs -0 -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)find $(S)src/etc -name '*.py' \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)find $(S)src/doc -name '*.js' \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)find $(S)src/etc -name '*.sh' \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)find $(S)src/etc -name '*.pl' \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)find $(S)src/etc -name '*.c' \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)find $(S)src/etc -name '*.h' \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)echo $(ALL_CS) \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)echo $(ALL_HS) \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)find $(S)src -type f -perm +a+x \ $(Q)find $(S)src -type f -perm +a+x \
-not -name '*.rs' -and -not -name '*.py' \ -not -name '*.rs' -and -not -name '*.py' \
-and -not -name '*.sh' \ -and -not -name '*.sh' \
@ -303,8 +270,15 @@ tidy:
| grep '^$(S)src/rust-installer' -v \ | grep '^$(S)src/rust-installer' -v \
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py | xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
.PHONY: tidy-errors
tidy-errors:
@$(call E, check: extended errors)
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
endif .PHONY: tidy-features
tidy-features:
@$(call E, check: feature sanity)
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
###################################################################### ######################################################################
@ -317,6 +291,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
check-stage$(1)-T-$(2)-H-$(3)-rpass-exec \ check-stage$(1)-T-$(2)-H-$(3)-rpass-exec \
check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \ check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \ check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \ check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \ check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \ check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
@ -420,14 +395,14 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
&& touch $$@ && touch $$@
endef endef
define DEF_TEST_CRATE_RULES_arm-linux-androideabi define DEF_TEST_CRATE_RULES_android
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)) check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)) $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
@$$(call E, run: $$< via adb) @$$(call E, run: $$< via adb)
$$(Q)$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR) $$(Q)$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR)
$$(Q)$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=. \ $$(Q)$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=./$(2) \
./$$(notdir $$<) \ ./$$(notdir $$<) \
--logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log \ --logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log \
$$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) $(TESTARGS))' \ $$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) $(TESTARGS))' \
@ -461,9 +436,9 @@ $(foreach host,$(CFG_HOST), \
$(foreach crate, $(TEST_CRATES), \ $(foreach crate, $(TEST_CRATES), \
$(if $(findstring $(target),$(CFG_BUILD)), \ $(if $(findstring $(target),$(CFG_BUILD)), \
$(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))), \ $(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))), \
$(if $(findstring $(target),"arm-linux-androideabi"), \ $(if $(findstring android, $(target)), \
$(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \ $(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \
$(eval $(call DEF_TEST_CRATE_RULES_arm-linux-androideabi,$(stage),$(target),$(host),$(crate))), \ $(eval $(call DEF_TEST_CRATE_RULES_android,$(stage),$(target),$(host),$(crate))), \
$(eval $(call DEF_TEST_CRATE_RULES_null,$(stage),$(target),$(host),$(crate))) \ $(eval $(call DEF_TEST_CRATE_RULES_null,$(stage),$(target),$(host),$(crate))) \
), \ ), \
$(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))) \ $(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))) \
@ -479,6 +454,7 @@ RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs) CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs) RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs) CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
PFAIL_RS := $(wildcard $(S)src/test/parse-fail/*.rs)
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs) BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs) PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs) DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
@ -496,6 +472,7 @@ RPASS_FULL_TESTS := $(RPASS_FULL_RS)
CFAIL_FULL_TESTS := $(CFAIL_FULL_RS) CFAIL_FULL_TESTS := $(CFAIL_FULL_RS)
RFAIL_TESTS := $(RFAIL_RS) RFAIL_TESTS := $(RFAIL_RS)
CFAIL_TESTS := $(CFAIL_RS) CFAIL_TESTS := $(CFAIL_RS)
PFAIL_TESTS := $(PFAIL_RS)
BENCH_TESTS := $(BENCH_RS) BENCH_TESTS := $(BENCH_RS)
PERF_TESTS := $(PERF_RS) PERF_TESTS := $(PERF_RS)
PRETTY_TESTS := $(PRETTY_RS) PRETTY_TESTS := $(PRETTY_RS)
@ -533,6 +510,11 @@ CTEST_BUILD_BASE_cfail = compile-fail
CTEST_MODE_cfail = compile-fail CTEST_MODE_cfail = compile-fail
CTEST_RUNTOOL_cfail = $(CTEST_RUNTOOL) CTEST_RUNTOOL_cfail = $(CTEST_RUNTOOL)
CTEST_SRC_BASE_pfail = parse-fail
CTEST_BUILD_BASE_pfail = parse-fail
CTEST_MODE_pfail = parse-fail
CTEST_RUNTOOL_pfail = $(CTEST_RUNTOOL)
CTEST_SRC_BASE_bench = bench CTEST_SRC_BASE_bench = bench
CTEST_BUILD_BASE_bench = bench CTEST_BUILD_BASE_bench = bench
CTEST_MODE_bench = run-pass CTEST_MODE_bench = run-pass
@ -639,7 +621,6 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
ifdef CFG_VALGRIND_RPASS ifdef CFG_VALGRIND_RPASS
ifdef GOOD_VALGRIND_$(2) ifdef GOOD_VALGRIND_$(2)
$(info cfg: valgrind-path set to $(CFG_VALGRIND_RPASS))
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) += --valgrind-path "$(CFG_VALGRIND_RPASS)" CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) += --valgrind-path "$(CFG_VALGRIND_RPASS)"
endif endif
endif endif
@ -656,6 +637,7 @@ CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$
CTEST_DEPS_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3)) CTEST_DEPS_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS) CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS) CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
CTEST_DEPS_pfail_$(1)-T-$(2)-H-$(3) = $$(PFAIL_TESTS)
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS) CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS) CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS) CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS)
@ -724,7 +706,7 @@ endif
endef endef
CTEST_NAMES = rpass rpass-valgrind rpass-full cfail-full rfail cfail bench perf debuginfo-gdb debuginfo-lldb codegen CTEST_NAMES = rpass rpass-valgrind rpass-full cfail-full rfail cfail pfail bench perf debuginfo-gdb debuginfo-lldb codegen
$(foreach host,$(CFG_HOST), \ $(foreach host,$(CFG_HOST), \
$(eval $(foreach target,$(CFG_TARGET), \ $(eval $(foreach target,$(CFG_TARGET), \
@ -883,6 +865,7 @@ TEST_GROUPS = \
cfail-full \ cfail-full \
rfail \ rfail \
cfail \ cfail \
pfail \
bench \ bench \
perf \ perf \
rmake \ rmake \
@ -1011,7 +994,8 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3)) \ $$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3)) \
"$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3))" \ "$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3))" \
"$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))" \ "$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))" \
$(1) $(1) \
$$(S)
@touch $$@ @touch $$@
else else
# FIXME #11094 - The above rule doesn't work right for multiple targets # FIXME #11094 - The above rule doesn't work right for multiple targets

View File

@ -247,10 +247,10 @@ $(call Set,Tmp.CFLAGS,$(strip \
-mkernel -DKERNEL_USE,)\ -mkernel -DKERNEL_USE,)\
$(call GetCNAVar,CFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call GetCNAVar,CFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch))))
$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.s $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.S $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir
$(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" $(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<"
$(Verb) $(Tmp.CC) $(COMMON_ASMFLAGS) $(Tmp.CFLAGS) -c -o $$@ $$< $(Verb) $(Tmp.CC) $(COMMON_ASMFLAGS) $(Tmp.CFLAGS) -c -o $$@ $$<
$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.S $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.s $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir
$(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" $(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<"
$(Verb) $(Tmp.CC) $(COMMON_ASMFLAGS) $(Tmp.CFLAGS) -c -o $$@ $$< $(Verb) $(Tmp.CC) $(COMMON_ASMFLAGS) $(Tmp.CFLAGS) -c -o $$@ $$<
$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.c $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.c $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir

View File

@ -242,10 +242,13 @@ set(arm_SOURCES
arm/unordsf2vfp.S arm/unordsf2vfp.S
${GENERIC_SOURCES}) ${GENERIC_SOURCES})
set(aarch64_SOURCES
${GENERIC_SOURCES})
add_custom_target(builtins) add_custom_target(builtins)
if (NOT WIN32) if (NOT WIN32)
foreach(arch x86_64 i386 arm) foreach(arch x86_64 i386 arm aarch64)
if(CAN_TARGET_${arch}) if(CAN_TARGET_${arch})
add_compiler_rt_runtime(clang_rt.${arch} ${arch} STATIC add_compiler_rt_runtime(clang_rt.${arch} ${arch} STATIC
SOURCES ${${arch}_SOURCES} SOURCES ${${arch}_SOURCES}

View File

@ -11,7 +11,7 @@ ModuleName := builtins
SubDirs := SubDirs :=
# Add arch specific optimized implementations. # Add arch specific optimized implementations.
SubDirs += i386 ppc x86_64 arm SubDirs += i386 ppc x86_64 arm aarch64
# Define the variables for this specific directory. # Define the variables for this specific directory.
Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file))) Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file)))

View File

@ -0,0 +1,22 @@
#===- lib/builtins/aarch64/Makefile.mk ---------------------*- Makefile -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
ModuleName := builtins
SubDirs :=
OnlyArchs := aarch64
AsmSources := $(foreach file,$(wildcard $(Dir)/*.S),$(notdir $(file)))
Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file)))
ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
Implementation := Optimized
# FIXME: use automatic dependencies?
Dependencies := $(wildcard lib/*.h $(Dir)/*.h)
CFLAGS.builtins := $(CFLAGS) -std=c99

View File

@ -25,6 +25,10 @@
#include <asm/unistd.h> #include <asm/unistd.h>
#endif #endif
#if defined(__aarch64__) && !defined(__APPLE__)
#include <stddef.h>
#endif
/* /*
* The compiler generates calls to __clear_cache() when creating * The compiler generates calls to __clear_cache() when creating
* trampoline functions on the stack for use with nested functions. * trampoline functions on the stack for use with nested functions.

View File

@ -54,7 +54,13 @@ ifeq ($(TargetTriple),arm-linux-androideabi)
sync_fetch_and_umin_8 sync_fetch_and_umin_8
endif endif
# Clear cache is builtin on aarch64-apple-ios
# arm64 and aarch64 are synonims, but iOS targets usually use arm64 (history reasons)
ifeq (aarch64-apple-ios,$(subst arm64,aarch64,$(TargetTriple)))
CommonDisabledFunctions := clear_cache
endif
ArchEnabledFunctions := $(filter-out $(ArchDisabledFunctions),$(value ArchFunctions.$(Arch))) ArchEnabledFunctions := $(filter-out $(ArchDisabledFunctions),$(value ArchFunctions.$(Arch)))
CommonEnabledFunctions := $(filter-out $(CommonDisabledFunctions),$(CommonFunctions_gcc))
FUNCTIONS.builtins := $(CommonFunctions_gcc) $(ArchEnabledFunctions) FUNCTIONS.builtins := $(CommonEnabledFunctions) $(ArchEnabledFunctions)

View File

@ -11,11 +11,11 @@ pub use self::Mode::*;
use std::fmt; use std::fmt;
use std::str::FromStr; use std::str::FromStr;
use regex::Regex;
#[derive(Clone, PartialEq)] #[derive(Clone, Copy, PartialEq, Debug)]
pub enum Mode { pub enum Mode {
CompileFail, CompileFail,
ParseFail,
RunFail, RunFail,
RunPass, RunPass,
RunPassValgrind, RunPassValgrind,
@ -25,28 +25,29 @@ pub enum Mode {
Codegen Codegen
} }
impl Copy for Mode {}
impl FromStr for Mode { impl FromStr for Mode {
fn from_str(s: &str) -> Option<Mode> { type Err = ();
fn from_str(s: &str) -> Result<Mode, ()> {
match s { match s {
"compile-fail" => Some(CompileFail), "compile-fail" => Ok(CompileFail),
"run-fail" => Some(RunFail), "parse-fail" => Ok(ParseFail),
"run-pass" => Some(RunPass), "run-fail" => Ok(RunFail),
"run-pass-valgrind" => Some(RunPassValgrind), "run-pass" => Ok(RunPass),
"pretty" => Some(Pretty), "run-pass-valgrind" => Ok(RunPassValgrind),
"debuginfo-lldb" => Some(DebugInfoLldb), "pretty" => Ok(Pretty),
"debuginfo-gdb" => Some(DebugInfoGdb), "debuginfo-lldb" => Ok(DebugInfoLldb),
"codegen" => Some(Codegen), "debuginfo-gdb" => Ok(DebugInfoGdb),
_ => None, "codegen" => Ok(Codegen),
_ => Err(()),
} }
} }
} }
impl fmt::String for Mode { impl fmt::Display for Mode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(match *self { fmt::Display::fmt(match *self {
CompileFail => "compile-fail", CompileFail => "compile-fail",
ParseFail => "parse-fail",
RunFail => "run-fail", RunFail => "run-fail",
RunPass => "run-pass", RunPass => "run-pass",
RunPassValgrind => "run-pass-valgrind", RunPassValgrind => "run-pass-valgrind",
@ -58,12 +59,6 @@ impl fmt::String for Mode {
} }
} }
impl fmt::Show for Mode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(self, f)
}
}
#[derive(Clone)] #[derive(Clone)]
pub struct Config { pub struct Config {
// The library paths required for running the compiler // The library paths required for running the compiler
@ -107,28 +102,11 @@ pub struct Config {
pub run_ignored: bool, pub run_ignored: bool,
// Only run tests that match this filter // Only run tests that match this filter
pub filter: Option<Regex>, pub filter: Option<String>,
// Precompiled regex for finding expected errors in cfail
pub cfail_regex: Regex,
// Write out a parseable log of tests that were run // Write out a parseable log of tests that were run
pub logfile: Option<Path>, pub logfile: Option<Path>,
// Write out a json file containing any metrics of the run
pub save_metrics: Option<Path>,
// Write and ratchet a metrics file
pub ratchet_metrics: Option<Path>,
// Percent change in metrics to consider noise
pub ratchet_noise_percent: Option<f64>,
// "Shard" of the testsuite to pub run: this has the form of
// two numbers (a,b), and causes only those tests with
// positional order equal to a mod b to run.
pub test_shard: Option<(uint,uint)>,
// A command line to prefix program execution with, // A command line to prefix program execution with,
// for running under valgrind // for running under valgrind
pub runtool: Option<String>, pub runtool: Option<String>,

View File

@ -9,10 +9,19 @@
// except according to those terms. // except according to those terms.
#![crate_type = "bin"] #![crate_type = "bin"]
#![allow(unknown_features)]
#![feature(slicing_syntax, unboxed_closures)]
#![feature(box_syntax)] #![feature(box_syntax)]
#![feature(collections)]
#![feature(int_uint)] #![feature(int_uint)]
#![feature(old_io)]
#![feature(old_path)]
#![feature(rustc_private)]
#![feature(unboxed_closures)]
#![feature(std_misc)]
#![feature(test)]
#![feature(unicode)]
#![feature(env)]
#![feature(core)]
#![deny(warnings)] #![deny(warnings)]
@ -21,18 +30,15 @@ extern crate getopts;
#[macro_use] #[macro_use]
extern crate log; extern crate log;
extern crate regex;
use std::os; use std::env;
use std::io; use std::old_io;
use std::io::fs; use std::old_io::fs;
use std::str::FromStr;
use std::thunk::Thunk; use std::thunk::Thunk;
use getopts::{optopt, optflag, reqopt}; use getopts::{optopt, optflag, reqopt};
use common::Config; use common::Config;
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen}; use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
use util::logv; use util::logv;
use regex::Regex;
pub mod procsrv; pub mod procsrv;
pub mod util; pub mod util;
@ -42,8 +48,7 @@ pub mod common;
pub mod errors; pub mod errors;
pub fn main() { pub fn main() {
let args = os::args(); let config = parse_config(env::args().collect());
let config = parse_config(args);
if config.valgrind_path.is_none() && config.force_valgrind { if config.valgrind_path.is_none() && config.force_valgrind {
panic!("Can't find Valgrind to run Valgrind tests"); panic!("Can't find Valgrind to run Valgrind tests");
@ -68,7 +73,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
reqopt("", "aux-base", "directory to find auxiliary test files", "PATH"), reqopt("", "aux-base", "directory to find auxiliary test files", "PATH"),
reqopt("", "stage-id", "the target-stage identifier", "stageN-TARGET"), reqopt("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
reqopt("", "mode", "which sort of compile tests to run", reqopt("", "mode", "which sort of compile tests to run",
"(compile-fail|run-fail|run-pass|run-pass-valgrind|pretty|debug-info)"), "(compile-fail|parse-fail|run-fail|run-pass|run-pass-valgrind|pretty|debug-info)"),
optflag("", "ignored", "run tests marked as ignored"), optflag("", "ignored", "run tests marked as ignored"),
optopt("", "runtool", "supervisor program to run tests under \ optopt("", "runtool", "supervisor program to run tests under \
(eg. emulator, valgrind)", "PROGRAM"), (eg. emulator, valgrind)", "PROGRAM"),
@ -76,10 +81,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"), optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
optflag("", "verbose", "run tests verbosely, showing all output"), optflag("", "verbose", "run tests verbosely, showing all output"),
optopt("", "logfile", "file to log test execution to", "FILE"), optopt("", "logfile", "file to log test execution to", "FILE"),
optopt("", "save-metrics", "file to save metrics to", "FILE"),
optopt("", "ratchet-metrics", "file to ratchet metrics against", "FILE"),
optopt("", "ratchet-noise-percent",
"percent change in metrics to consider noise", "N"),
optflag("", "jit", "run tests under the JIT"), optflag("", "jit", "run tests under the JIT"),
optopt("", "target", "the target to build for", "TARGET"), optopt("", "target", "the target to build for", "TARGET"),
optopt("", "host", "the host to build for", "HOST"), optopt("", "host", "the host to build for", "HOST"),
@ -89,45 +90,40 @@ pub fn parse_config(args: Vec<String> ) -> Config {
optopt("", "adb-path", "path to the android debugger", "PATH"), optopt("", "adb-path", "path to the android debugger", "PATH"),
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"), optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"), optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"),
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
optflag("h", "help", "show this message")); optflag("h", "help", "show this message"));
assert!(!args.is_empty()); assert!(!args.is_empty());
let argv0 = args[0].clone(); let argv0 = args[0].clone();
let args_ = args.tail(); let args_ = args.tail();
if args[1].as_slice() == "-h" || args[1].as_slice() == "--help" { if args[1] == "-h" || args[1] == "--help" {
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0); let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
println!("{}", getopts::usage(message.as_slice(), groups.as_slice())); println!("{}", getopts::usage(&message, &groups));
println!(""); println!("");
panic!() panic!()
} }
let matches = let matches =
&match getopts::getopts(args_.as_slice(), groups.as_slice()) { &match getopts::getopts(args_, &groups) {
Ok(m) => m, Ok(m) => m,
Err(f) => panic!("{:?}", f) Err(f) => panic!("{:?}", f)
}; };
if matches.opt_present("h") || matches.opt_present("help") { if matches.opt_present("h") || matches.opt_present("help") {
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0); let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
println!("{}", getopts::usage(message.as_slice(), groups.as_slice())); println!("{}", getopts::usage(&message, &groups));
println!(""); println!("");
panic!() panic!()
} }
fn opt_path(m: &getopts::Matches, nm: &str) -> Path { fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
Path::new(m.opt_str(nm).unwrap()) match m.opt_str(nm) {
Some(s) => Path::new(s),
None => panic!("no option (=path) found for {}", nm),
}
} }
let filter = if !matches.free.is_empty() { let filter = if !matches.free.is_empty() {
let s = matches.free[0].as_slice(); Some(matches.free[0].clone())
match regex::Regex::new(s) {
Ok(re) => Some(re),
Err(e) => {
println!("failed to parse filter /{}/: {:?}", s, e);
panic!()
}
}
} else { } else {
None None
}; };
@ -144,19 +140,10 @@ pub fn parse_config(args: Vec<String> ) -> Config {
build_base: opt_path(matches, "build-base"), build_base: opt_path(matches, "build-base"),
aux_base: opt_path(matches, "aux-base"), aux_base: opt_path(matches, "aux-base"),
stage_id: matches.opt_str("stage-id").unwrap(), stage_id: matches.opt_str("stage-id").unwrap(),
mode: FromStr::from_str(matches.opt_str("mode") mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
.unwrap()
.as_slice()).expect("invalid mode"),
run_ignored: matches.opt_present("ignored"), run_ignored: matches.opt_present("ignored"),
filter: filter, filter: filter,
cfail_regex: Regex::new(errors::EXPECTED_PATTERN).unwrap(),
logfile: matches.opt_str("logfile").map(|s| Path::new(s)), logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
save_metrics: matches.opt_str("save-metrics").map(|s| Path::new(s)),
ratchet_metrics:
matches.opt_str("ratchet-metrics").map(|s| Path::new(s)),
ratchet_noise_percent:
matches.opt_str("ratchet-noise-percent")
.and_then(|s| s.as_slice().parse::<f64>()),
runtool: matches.opt_str("runtool"), runtool: matches.opt_str("runtool"),
host_rustcflags: matches.opt_str("host-rustcflags"), host_rustcflags: matches.opt_str("host-rustcflags"),
target_rustcflags: matches.opt_str("target-rustcflags"), target_rustcflags: matches.opt_str("target-rustcflags"),
@ -167,15 +154,14 @@ pub fn parse_config(args: Vec<String> ) -> Config {
lldb_version: extract_lldb_version(matches.opt_str("lldb-version")), lldb_version: extract_lldb_version(matches.opt_str("lldb-version")),
android_cross_path: opt_path(matches, "android-cross-path"), android_cross_path: opt_path(matches, "android-cross-path"),
adb_path: opt_str2(matches.opt_str("adb-path")), adb_path: opt_str2(matches.opt_str("adb-path")),
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")), adb_test_dir: format!("{}/{}",
opt_str2(matches.opt_str("adb-test-dir")),
opt_str2(matches.opt_str("target"))),
adb_device_status: adb_device_status:
"arm-linux-androideabi" == opt_str2(matches.opt_str("target")).contains("android") &&
opt_str2(matches.opt_str("target")).as_slice() && "(none)" != opt_str2(matches.opt_str("adb-test-dir")) &&
"(none)" !=
opt_str2(matches.opt_str("adb-test-dir")).as_slice() &&
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(), !opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
lldb_python_dir: matches.opt_str("lldb-python-dir"), lldb_python_dir: matches.opt_str("lldb-python-dir"),
test_shard: test::opt_shard(matches.opt_str("test-shard")),
verbose: matches.opt_present("verbose"), verbose: matches.opt_present("verbose"),
} }
} }
@ -209,10 +195,6 @@ pub fn log_config(config: &Config) {
logv(c, format!("adb_test_dir: {:?}", config.adb_test_dir)); logv(c, format!("adb_test_dir: {:?}", config.adb_test_dir));
logv(c, format!("adb_device_status: {}", logv(c, format!("adb_device_status: {}",
config.adb_device_status)); config.adb_device_status));
match config.test_shard {
None => logv(c, "test_shard: (all)".to_string()),
Some((a,b)) => logv(c, format!("test_shard: {}.{}", a, b))
}
logv(c, format!("verbose: {}", config.verbose)); logv(c, format!("verbose: {}", config.verbose));
logv(c, format!("\n")); logv(c, format!("\n"));
} }
@ -220,7 +202,7 @@ pub fn log_config(config: &Config) {
pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'a str { pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'a str {
match *maybestr { match *maybestr {
None => "(none)", None => "(none)",
Some(ref s) => s.as_slice(), Some(ref s) => s,
} }
} }
@ -232,19 +214,19 @@ pub fn opt_str2(maybestr: Option<String>) -> String {
} }
pub fn run_tests(config: &Config) { pub fn run_tests(config: &Config) {
if config.target.as_slice() == "arm-linux-androideabi" { if config.target.contains("android") {
match config.mode { match config.mode {
DebugInfoGdb => { DebugInfoGdb => {
println!("arm-linux-androideabi debug-info \ println!("{} debug-info test uses tcp 5039 port.\
test uses tcp 5039 port. please reserve it"); please reserve it", config.target);
} }
_ =>{} _ =>{}
} }
//arm-linux-androideabi debug-info test uses remote debugger // android debug-info test uses remote debugger
// so, we test 1 task at once. // so, we test 1 task at once.
// also trying to isolate problems with adb_run_wrapper.sh ilooping // also trying to isolate problems with adb_run_wrapper.sh ilooping
os::setenv("RUST_TEST_TASKS","1"); env::set_var("RUST_TEST_TASKS","1");
} }
match config.mode { match config.mode {
@ -252,7 +234,7 @@ pub fn run_tests(config: &Config) {
// Some older versions of LLDB seem to have problems with multiple // Some older versions of LLDB seem to have problems with multiple
// instances running in parallel, so only run one test task at a // instances running in parallel, so only run one test task at a
// time. // time.
os::setenv("RUST_TEST_TASKS", "1"); env::set_var("RUST_TEST_TASKS", "1");
} }
_ => { /* proceed */ } _ => { /* proceed */ }
} }
@ -262,7 +244,10 @@ pub fn run_tests(config: &Config) {
// sadly osx needs some file descriptor limits raised for running tests in // sadly osx needs some file descriptor limits raised for running tests in
// parallel (especially when we have lots and lots of child processes). // parallel (especially when we have lots and lots of child processes).
// For context, see #8904 // For context, see #8904
io::test::raise_fd_limit(); old_io::test::raise_fd_limit();
// Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
// If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
env::set_var("__COMPAT_LAYER", "RunAsInvoker");
let res = test::run_tests_console(&opts, tests.into_iter().collect()); let res = test::run_tests_console(&opts, tests.into_iter().collect());
match res { match res {
Ok(true) => {} Ok(true) => {}
@ -283,15 +268,8 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
logfile: config.logfile.clone(), logfile: config.logfile.clone(),
run_tests: true, run_tests: true,
run_benchmarks: true, run_benchmarks: true,
ratchet_metrics: config.ratchet_metrics.clone(),
ratchet_noise_percent: config.ratchet_noise_percent.clone(),
save_metrics: config.save_metrics.clone(),
test_shard: config.test_shard.clone(),
nocapture: false, nocapture: false,
color: test::AutoColor, color: test::AutoColor,
show_boxplot: false,
boxplot_width: 50,
show_all_stats: false,
} }
} }
@ -300,7 +278,7 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
config.src_base.display()); config.src_base.display());
let mut tests = Vec::new(); let mut tests = Vec::new();
let dirs = fs::readdir(&config.src_base).unwrap(); let dirs = fs::readdir(&config.src_base).unwrap();
for file in dirs.iter() { for file in &dirs {
let file = file.clone(); let file = file.clone();
debug!("inspecting file {:?}", file.display()); debug!("inspecting file {:?}", file.display());
if is_test(config, &file) { if is_test(config, &file) {
@ -328,14 +306,14 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
let mut valid = false; let mut valid = false;
for ext in valid_extensions.iter() { for ext in &valid_extensions {
if name.ends_with(ext.as_slice()) { if name.ends_with(ext) {
valid = true; valid = true;
} }
} }
for pre in invalid_prefixes.iter() { for pre in &invalid_prefixes {
if name.starts_with(pre.as_slice()) { if name.starts_with(pre) {
valid = false; valid = false;
} }
} }
@ -382,7 +360,7 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test
let config = (*config).clone(); let config = (*config).clone();
// FIXME (#9639): This needs to handle non-utf8 paths // FIXME (#9639): This needs to handle non-utf8 paths
let testfile = testfile.as_str().unwrap().to_string(); let testfile = testfile.as_str().unwrap().to_string();
test::DynMetricFn(box move |: mm: &mut test::MetricMap| { test::DynMetricFn(box move |mm: &mut test::MetricMap| {
runtest::run_metrics(config, testfile, mm) runtest::run_metrics(config, testfile, mm)
}) })
} }
@ -390,21 +368,27 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test
fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> { fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
match full_version_line { match full_version_line {
Some(ref full_version_line) Some(ref full_version_line)
if full_version_line.as_slice().trim().len() > 0 => { if full_version_line.trim().len() > 0 => {
let full_version_line = full_version_line.as_slice().trim(); let full_version_line = full_version_line.trim();
let re = Regex::new(r"(^|[^0-9])([0-9]\.[0-9])([^0-9]|$)").unwrap(); // used to be a regex "(^|[^0-9])([0-9]\.[0-9])([^0-9]|$)"
for (pos, c) in full_version_line.char_indices() {
match re.captures(full_version_line) { if !c.is_digit(10) { continue }
Some(captures) => { if pos + 2 >= full_version_line.len() { continue }
Some(captures.at(2).unwrap_or("").to_string()) if full_version_line.char_at(pos + 1) != '.' { continue }
if !full_version_line.char_at(pos + 2).is_digit(10) { continue }
if pos > 0 && full_version_line.char_at_reverse(pos).is_digit(10) {
continue
}
if pos + 3 < full_version_line.len() &&
full_version_line.char_at(pos + 3).is_digit(10) {
continue
}
return Some(full_version_line[pos..pos+3].to_string());
} }
None => {
println!("Could not extract GDB version from line '{}'", println!("Could not extract GDB version from line '{}'",
full_version_line); full_version_line);
None None
}
}
}, },
_ => None _ => None
} }
@ -424,21 +408,29 @@ fn extract_lldb_version(full_version_line: Option<String>) -> Option<String> {
match full_version_line { match full_version_line {
Some(ref full_version_line) Some(ref full_version_line)
if full_version_line.as_slice().trim().len() > 0 => { if full_version_line.trim().len() > 0 => {
let full_version_line = full_version_line.as_slice().trim(); let full_version_line = full_version_line.trim();
let re = Regex::new(r"[Ll][Ll][Dd][Bb]-([0-9]+)").unwrap(); for (pos, l) in full_version_line.char_indices() {
if l != 'l' && l != 'L' { continue }
if pos + 5 >= full_version_line.len() { continue }
let l = full_version_line.char_at(pos + 1);
if l != 'l' && l != 'L' { continue }
let d = full_version_line.char_at(pos + 2);
if d != 'd' && d != 'D' { continue }
let b = full_version_line.char_at(pos + 3);
if b != 'b' && b != 'B' { continue }
let dash = full_version_line.char_at(pos + 4);
if dash != '-' { continue }
match re.captures(full_version_line) { let vers = full_version_line[pos + 5..].chars().take_while(|c| {
Some(captures) => { c.is_digit(10)
Some(captures.at(1).unwrap_or("").to_string()) }).collect::<String>();
if vers.len() > 0 { return Some(vers) }
} }
None => {
println!("Could not extract LLDB version from line '{}'", println!("Could not extract LLDB version from line '{}'",
full_version_line); full_version_line);
None None
}
}
}, },
_ => None _ => None
} }

View File

@ -9,9 +9,7 @@
// except according to those terms. // except according to those terms.
use self::WhichLine::*; use self::WhichLine::*;
use std::ascii::AsciiExt; use std::old_io::{BufferedReader, File};
use std::io::{BufferedReader, File};
use regex::Regex;
pub struct ExpectedError { pub struct ExpectedError {
pub line: uint, pub line: uint,
@ -19,6 +17,9 @@ pub struct ExpectedError {
pub msg: String, pub msg: String,
} }
#[derive(PartialEq, Debug)]
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
/// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE" /// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"
/// The former is a "follow" that inherits its target from the preceding line; /// The former is a "follow" that inherits its target from the preceding line;
/// the latter is an "adjusts" that goes that many lines up. /// the latter is an "adjusts" that goes that many lines up.
@ -26,15 +27,8 @@ pub struct ExpectedError {
/// Goal is to enable tests both like: //~^^^ ERROR go up three /// Goal is to enable tests both like: //~^^^ ERROR go up three
/// and also //~^ ERROR message one for the preceding line, and /// and also //~^ ERROR message one for the preceding line, and
/// //~| ERROR message two for that same line. /// //~| ERROR message two for that same line.
pub static EXPECTED_PATTERN : &'static str =
r"//~(?P<follow>\|)?(?P<adjusts>\^*)\s*(?P<kind>\S*)\s*(?P<msg>.*)";
#[derive(PartialEq, Show)]
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
// Load any test directives embedded in the file // Load any test directives embedded in the file
pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> { pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
let mut rdr = BufferedReader::new(File::open(testfile).unwrap()); let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
// `last_nonfollow_error` tracks the most recently seen // `last_nonfollow_error` tracks the most recently seen
@ -50,7 +44,7 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
rdr.lines().enumerate().filter_map(|(line_no, ln)| { rdr.lines().enumerate().filter_map(|(line_no, ln)| {
parse_expected(last_nonfollow_error, parse_expected(last_nonfollow_error,
line_no + 1, line_no + 1,
ln.unwrap().as_slice(), re) &ln.unwrap())
.map(|(which, error)| { .map(|(which, error)| {
match which { match which {
FollowPrevious(_) => {} FollowPrevious(_) => {}
@ -63,13 +57,23 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
fn parse_expected(last_nonfollow_error: Option<uint>, fn parse_expected(last_nonfollow_error: Option<uint>,
line_num: uint, line_num: uint,
line: &str, line: &str) -> Option<(WhichLine, ExpectedError)> {
re: &Regex) -> Option<(WhichLine, ExpectedError)> { let start = match line.find_str("//~") { Some(i) => i, None => return None };
re.captures(line).and_then(|caps| { let (follow, adjusts) = if line.char_at(start + 3) == '|' {
let adjusts = caps.name("adjusts").unwrap_or("").len(); (true, 0)
let kind = caps.name("kind").unwrap_or("").to_ascii_lowercase(); } else {
let msg = caps.name("msg").unwrap_or("").trim().to_string(); (false, line[start + 3..].chars().take_while(|c| *c == '^').count())
let follow = caps.name("follow").unwrap_or("").len() > 0; };
let kind_start = start + 3 + adjusts + (follow as usize);
let letters = line[kind_start..].chars();
let kind = letters.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitespace())
.map(|c| c.to_lowercase())
.collect::<String>();
let letters = line[kind_start..].chars();
let msg = letters.skip_while(|c| c.is_whitespace())
.skip_while(|c| !c.is_whitespace())
.collect::<String>().trim().to_string();
let (which, line) = if follow { let (which, line) = if follow {
assert!(adjusts == 0, "use either //~| or //~^, not both."); assert!(adjusts == 0, "use either //~| or //~^, not both.");
@ -88,5 +92,4 @@ fn parse_expected(last_nonfollow_error: Option<uint>,
Some((which, ExpectedError { line: line, Some((which, ExpectedError { line: line,
kind: kind, kind: kind,
msg: msg, })) msg: msg, }))
})
} }

View File

@ -42,8 +42,6 @@ pub struct TestProps {
pub pretty_compare_only: bool, pub pretty_compare_only: bool,
// Patterns which must not appear in the output of a cfail test. // Patterns which must not appear in the output of a cfail test.
pub forbid_output: Vec<String>, pub forbid_output: Vec<String>,
// Ignore errors which originate from a command line span
pub ignore_command_line: bool,
} }
// Load any test directives embedded in the file // Load any test directives embedded in the file
@ -62,8 +60,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
let mut pretty_mode = None; let mut pretty_mode = None;
let mut pretty_compare_only = false; let mut pretty_compare_only = false;
let mut forbid_output = Vec::new(); let mut forbid_output = Vec::new();
let mut ignore_command_line = false;
iter_header(testfile, |ln| { iter_header(testfile, |ln| {
match parse_error_pattern(ln) { match parse_error_pattern(ln) {
Some(ep) => error_patterns.push(ep), Some(ep) => error_patterns.push(ep),
@ -106,10 +102,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
pretty_compare_only = parse_pretty_compare_only(ln); pretty_compare_only = parse_pretty_compare_only(ln);
} }
if !ignore_command_line {
ignore_command_line = parse_ignore_command_line(ln);
}
match parse_aux_build(ln) { match parse_aux_build(ln) {
Some(ab) => { aux_builds.push(ab); } Some(ab) => { aux_builds.push(ab); }
None => {} None => {}
@ -148,17 +140,16 @@ pub fn load_props(testfile: &Path) -> TestProps {
pretty_mode: pretty_mode.unwrap_or("normal".to_string()), pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
pretty_compare_only: pretty_compare_only, pretty_compare_only: pretty_compare_only,
forbid_output: forbid_output, forbid_output: forbid_output,
ignore_command_line: ignore_command_line,
} }
} }
pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool { pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
fn ignore_target(config: &Config) -> String { fn ignore_target(config: &Config) -> String {
format!("ignore-{}", util::get_os(config.target.as_slice())) format!("ignore-{}", util::get_os(&config.target))
} }
fn ignore_stage(config: &Config) -> String { fn ignore_stage(config: &Config) -> String {
format!("ignore-{}", format!("ignore-{}",
config.stage_id.as_slice().split('-').next().unwrap()) config.stage_id.split('-').next().unwrap())
} }
fn ignore_gdb(config: &Config, line: &str) -> bool { fn ignore_gdb(config: &Config, line: &str) -> bool {
if config.mode != common::DebugInfoGdb { if config.mode != common::DebugInfoGdb {
@ -178,8 +169,8 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
.expect("Malformed GDB version directive"); .expect("Malformed GDB version directive");
// Ignore if actual version is smaller the minimum required // Ignore if actual version is smaller the minimum required
// version // version
gdb_version_to_int(actual_version.as_slice()) < gdb_version_to_int(actual_version) <
gdb_version_to_int(min_version.as_slice()) gdb_version_to_int(min_version)
} else { } else {
false false
} }
@ -206,8 +197,8 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
.expect("Malformed lldb version directive"); .expect("Malformed lldb version directive");
// Ignore if actual version is smaller the minimum required // Ignore if actual version is smaller the minimum required
// version // version
lldb_version_to_int(actual_version.as_slice()) < lldb_version_to_int(actual_version) <
lldb_version_to_int(min_version.as_slice()) lldb_version_to_int(min_version)
} else { } else {
false false
} }
@ -218,8 +209,8 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
let val = iter_header(testfile, |ln| { let val = iter_header(testfile, |ln| {
!parse_name_directive(ln, "ignore-test") && !parse_name_directive(ln, "ignore-test") &&
!parse_name_directive(ln, ignore_target(config).as_slice()) && !parse_name_directive(ln, &ignore_target(config)) &&
!parse_name_directive(ln, ignore_stage(config).as_slice()) && !parse_name_directive(ln, &ignore_stage(config)) &&
!(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) && !(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) &&
!(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) && !(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&
!ignore_gdb(config, ln) && !ignore_gdb(config, ln) &&
@ -232,7 +223,7 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
fn iter_header<F>(testfile: &Path, mut it: F) -> bool where fn iter_header<F>(testfile: &Path, mut it: F) -> bool where
F: FnMut(&str) -> bool, F: FnMut(&str) -> bool,
{ {
use std::io::{BufferedReader, File}; use std::old_io::{BufferedReader, File};
let mut rdr = BufferedReader::new(File::open(testfile).unwrap()); let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
for ln in rdr.lines() { for ln in rdr.lines() {
@ -240,11 +231,11 @@ fn iter_header<F>(testfile: &Path, mut it: F) -> bool where
// module or function. This doesn't seem to be an optimization // module or function. This doesn't seem to be an optimization
// with a warm page cache. Maybe with a cold one. // with a warm page cache. Maybe with a cold one.
let ln = ln.unwrap(); let ln = ln.unwrap();
if ln.as_slice().starts_with("fn") || if ln.starts_with("fn") ||
ln.as_slice().starts_with("mod") { ln.starts_with("mod") {
return true; return true;
} else { } else {
if !(it(ln.as_slice().trim())) { if !(it(ln.trim())) {
return false; return false;
} }
} }
@ -300,21 +291,17 @@ fn parse_pretty_compare_only(line: &str) -> bool {
parse_name_directive(line, "pretty-compare-only") parse_name_directive(line, "pretty-compare-only")
} }
fn parse_ignore_command_line(line: &str) -> bool {
parse_name_directive(line, "ignore-command-line")
}
fn parse_exec_env(line: &str) -> Option<(String, String)> { fn parse_exec_env(line: &str) -> Option<(String, String)> {
parse_name_value_directive(line, "exec-env").map(|nv| { parse_name_value_directive(line, "exec-env").map(|nv| {
// nv is either FOO or FOO=BAR // nv is either FOO or FOO=BAR
let mut strs: Vec<String> = nv.as_slice() let mut strs: Vec<String> = nv
.splitn(1, '=') .splitn(1, '=')
.map(|s| s.to_string()) .map(|s| s.to_string())
.collect(); .collect();
match strs.len() { match strs.len() {
1u => (strs.pop().unwrap(), "".to_string()), 1 => (strs.pop().unwrap(), "".to_string()),
2u => { 2 => {
let end = strs.pop().unwrap(); let end = strs.pop().unwrap();
(strs.pop().unwrap(), end) (strs.pop().unwrap(), end)
} }
@ -343,10 +330,9 @@ fn parse_name_directive(line: &str, directive: &str) -> bool {
pub fn parse_name_value_directive(line: &str, directive: &str) pub fn parse_name_value_directive(line: &str, directive: &str)
-> Option<String> { -> Option<String> {
let keycolon = format!("{}:", directive); let keycolon = format!("{}:", directive);
match line.find_str(keycolon.as_slice()) { match line.find_str(&keycolon) {
Some(colon) => { Some(colon) => {
let value = line.slice(colon + keycolon.len(), let value = line[(colon + keycolon.len()) .. line.len()].to_string();
line.len()).to_string();
debug!("{}: {}", directive, value); debug!("{}: {}", directive, value);
Some(value) Some(value)
} }
@ -358,7 +344,7 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
let error_string = format!( let error_string = format!(
"Encountered GDB version string with unexpected format: {}", "Encountered GDB version string with unexpected format: {}",
version_string); version_string);
let error_string = error_string.as_slice(); let error_string = error_string;
let components: Vec<&str> = version_string.trim().split('.').collect(); let components: Vec<&str> = version_string.trim().split('.').collect();
@ -366,8 +352,8 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
panic!("{}", error_string); panic!("{}", error_string);
} }
let major: int = components[0].parse().expect(error_string); let major: int = components[0].parse().ok().expect(&error_string);
let minor: int = components[1].parse().expect(error_string); let minor: int = components[1].parse().ok().expect(&error_string);
return major * 1000 + minor; return major * 1000 + minor;
} }
@ -376,7 +362,7 @@ pub fn lldb_version_to_int(version_string: &str) -> int {
let error_string = format!( let error_string = format!(
"Encountered LLDB version string with unexpected format: {}", "Encountered LLDB version string with unexpected format: {}",
version_string); version_string);
let error_string = error_string.as_slice(); let error_string = error_string;
let major: int = version_string.parse().expect(error_string); let major: int = version_string.parse().ok().expect(&error_string);
return major; return major;
} }

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use std::io::process::{ProcessExit, Command, Process, ProcessOutput}; use std::old_io::process::{ProcessExit, Command, Process, ProcessOutput};
use std::dynamic_lib::DynamicLibrary; use std::dynamic_lib::DynamicLibrary;
fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) { fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
@ -23,7 +23,7 @@ fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
// Add the new dylib search path var // Add the new dylib search path var
let var = DynamicLibrary::envvar(); let var = DynamicLibrary::envvar();
let newpath = DynamicLibrary::create_path(path.as_slice()); let newpath = DynamicLibrary::create_path(&path);
let newpath = String::from_utf8(newpath).unwrap(); let newpath = String::from_utf8(newpath).unwrap();
cmd.env(var.to_string(), newpath); cmd.env(var.to_string(), newpath);
} }
@ -40,14 +40,14 @@ pub fn run(lib_path: &str,
let mut cmd = Command::new(prog); let mut cmd = Command::new(prog);
cmd.args(args); cmd.args(args);
add_target_env(&mut cmd, lib_path, aux_path); add_target_env(&mut cmd, lib_path, aux_path);
for (key, val) in env.into_iter() { for (key, val) in env {
cmd.env(key, val); cmd.env(key, val);
} }
match cmd.spawn() { match cmd.spawn() {
Ok(mut process) => { Ok(mut process) => {
for input in input.iter() { if let Some(input) = input {
process.stdin.as_mut().unwrap().write(input.as_bytes()).unwrap(); process.stdin.as_mut().unwrap().write_all(input.as_bytes()).unwrap();
} }
let ProcessOutput { status, output, error } = let ProcessOutput { status, output, error } =
process.wait_with_output().unwrap(); process.wait_with_output().unwrap();
@ -72,14 +72,14 @@ pub fn run_background(lib_path: &str,
let mut cmd = Command::new(prog); let mut cmd = Command::new(prog);
cmd.args(args); cmd.args(args);
add_target_env(&mut cmd, lib_path, aux_path); add_target_env(&mut cmd, lib_path, aux_path);
for (key, val) in env.into_iter() { for (key, val) in env {
cmd.env(key, val); cmd.env(key, val);
} }
match cmd.spawn() { match cmd.spawn() {
Ok(mut process) => { Ok(mut process) => {
for input in input.iter() { if let Some(input) = input {
process.stdin.as_mut().unwrap().write(input.as_bytes()).unwrap(); process.stdin.as_mut().unwrap().write_all(input.as_bytes()).unwrap();
} }
Some(process) Some(process)

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //
@ -11,7 +11,7 @@
use common::Config; use common::Config;
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
use std::os::getenv; use std::env;
/// Conversion table from triple OS name to Rust SYSNAME /// Conversion table from triple OS name to Rust SYSNAME
static OS_TABLE: &'static [(&'static str, &'static str)] = &[ static OS_TABLE: &'static [(&'static str, &'static str)] = &[
@ -23,10 +23,11 @@ static OS_TABLE: &'static [(&'static str, &'static str)] = &[
("linux", "linux"), ("linux", "linux"),
("freebsd", "freebsd"), ("freebsd", "freebsd"),
("dragonfly", "dragonfly"), ("dragonfly", "dragonfly"),
("openbsd", "openbsd"),
]; ];
pub fn get_os(triple: &str) -> &'static str { pub fn get_os(triple: &str) -> &'static str {
for &(triple_os, os) in OS_TABLE.iter() { for &(triple_os, os) in OS_TABLE {
if triple.contains(triple_os) { if triple.contains(triple_os) {
return os return os
} }
@ -39,11 +40,11 @@ pub fn make_new_path(path: &str) -> String {
// Windows just uses PATH as the library search path, so we have to // Windows just uses PATH as the library search path, so we have to
// maintain the current value while adding our own // maintain the current value while adding our own
match getenv(lib_path_env_var()) { match env::var(lib_path_env_var()) {
Some(curr) => { Ok(curr) => {
format!("{}{}{}", path, path_div(), curr) format!("{}{}{}", path, path_div(), curr)
} }
None => path.to_string() Err(..) => path.to_string()
} }
} }

View File

@ -1,63 +0,0 @@
% How to submit a Rust bug report
# I think I found a bug in the compiler!
If you see this message: `error: internal compiler error: unexpected panic`,
then you have definitely found a bug in the compiler. It's also possible that
your code is not well-typed, but if you saw this message, it's still a bug in
error reporting.
If you see a message about an LLVM assertion failure, then you have also
definitely found a bug in the compiler. In both of these cases, it's not your
fault and you should report a bug!
If you see a compiler error message that you think is meant for users to see,
but it confuses you, *that's a bug too*. If it wasn't clear to you, then it's
an error message we want to improve, so please report it so that we can try
to make it better.
# How do I know the bug I found isn't a bug that already exists in the issue tracker?
If you don't have enough time for a search, then don't worry about that. Just submit
the bug. If it's a duplicate, somebody will notice that and close it during triage.
If you have the time for it, it would be useful to type the text of the error
message you got [into the issue tracker search box](https://github.com/rust-lang/rust/issues)
to see if there's an existing bug that resembles your problem. If there is,
and it's an open bug, you can comment on that issue and say you are also affected.
This will encourage the devs to fix it. But again, don't let this stop you from
submitting a bug. We'd rather have to do the work of closing duplicates than
miss out on valid bug reports.
# What information should I include in a bug report?
It generally helps our diagnosis to include your specific OS (for example: Mac OS X 10.8.3,
Windows 7, Ubuntu 12.04) and your hardware architecture (for example: i686, x86_64).
It's also helpful to provide the exact version and host by copying the output of
re-running the erroneous rustc command with the `--version --verbose` flags, which will
produce something like this:
```text
rustc 0.12.0 (ba4081a5a 2014-10-07 13:44:41 -0700)
binary: rustc
commit-hash: ba4081a5a8573875fed17545846f6f6902c8ba8d
commit-date: 2014-10-07 13:44:41 -0700
host: i686-apple-darwin
release: 0.12.0
```
Finally, if you can also provide a backtrace, that'd be great. You can get a
backtrace by setting the `RUST_BACKTRACE` environment variable to `1`, like
this:
```bash
$ RUST_BACKTRACE=1 rustc ...
```
# I submitted a bug, but nobody has commented on it!
This is sad, but does happen sometimes, since we're short-staffed. If you
submit a bug and you haven't received a comment on it within 3 business days,
it's entirely reasonable to either ask on the #rust IRC channel,
or post on the [rust-dev mailing list](https://mail.mozilla.org/listinfo/rust-dev)
to ask what the status of the bug is.

View File

@ -10,7 +10,7 @@ There aren't many large programs yet. The Rust [compiler][rustc], 60,000+ lines
A research browser engine called [Servo][servo], currently 30,000+ lines across more than a dozen crates, will be exercising a lot of Rust's distinctive type-system and concurrency features, and integrating many native libraries. A research browser engine called [Servo][servo], currently 30,000+ lines across more than a dozen crates, will be exercising a lot of Rust's distinctive type-system and concurrency features, and integrating many native libraries.
[servo]: https://github.com/mozilla/servo [servo]: https://github.com/servo/servo
Some examples that demonstrate different aspects of the language: Some examples that demonstrate different aspects of the language:

View File

@ -30,7 +30,7 @@ No. It started as a Graydon Hoare's part-time side project in 2006 and remained
# What will Mozilla use Rust for? # What will Mozilla use Rust for?
Mozilla intends to use Rust as a platform for prototyping experimental browser architectures. Specifically, the hope is to develop a browser that is more amenable to parallelization than existing ones, while also being less prone to common C++ coding errors that result in security exploits. The name of that project is _[Servo](http://github.com/mozilla/servo)_. Mozilla intends to use Rust as a platform for prototyping experimental browser architectures. Specifically, the hope is to develop a browser that is more amenable to parallelization than existing ones, while also being less prone to common C++ coding errors that result in security exploits. The name of that project is _[Servo](http://github.com/servo/servo)_.
# Why a BSD-style permissive license rather than MPL or tri-license? # Why a BSD-style permissive license rather than MPL or tri-license?

774
src/doc/grammar.md Normal file
View File

@ -0,0 +1,774 @@
% Grammar
# Introduction
This document is the primary reference for the Rust programming language grammar. It
provides only one kind of material:
- Chapters that formally define the language grammar and, for each
construct.
This document does not serve as an introduction to the language. Background
familiarity with the language is assumed. A separate [guide] is available to
help acquire such background familiarity.
This document also does not serve as a reference to the [standard] library
included in the language distribution. Those libraries are documented
separately by extracting documentation attributes from their source code. Many
of the features that one might expect to be language features are library
features in Rust, so what you're looking for may be there, not here.
[guide]: guide.html
[standard]: std/index.html
# Notation
Rust's grammar is defined over Unicode codepoints, each conventionally denoted
`U+XXXX`, for 4 or more hexadecimal digits `X`. _Most_ of Rust's grammar is
confined to the ASCII range of Unicode, and is described in this document by a
dialect of Extended Backus-Naur Form (EBNF), specifically a dialect of EBNF
supported by common automated LL(k) parsing tools such as `llgen`, rather than
the dialect given in ISO 14977. The dialect can be defined self-referentially
as follows:
```antlr
grammar : rule + ;
rule : nonterminal ':' productionrule ';' ;
productionrule : production [ '|' production ] * ;
production : term * ;
term : element repeats ;
element : LITERAL | IDENTIFIER | '[' productionrule ']' ;
repeats : [ '*' | '+' ] NUMBER ? | NUMBER ? | '?' ;
```
Where:
- Whitespace in the grammar is ignored.
- Square brackets are used to group rules.
- `LITERAL` is a single printable ASCII character, or an escaped hexadecimal
ASCII code of the form `\xQQ`, in single quotes, denoting the corresponding
Unicode codepoint `U+00QQ`.
- `IDENTIFIER` is a nonempty string of ASCII letters and underscores.
- The `repeat` forms apply to the adjacent `element`, and are as follows:
- `?` means zero or one repetition
- `*` means zero or more repetitions
- `+` means one or more repetitions
- NUMBER trailing a repeat symbol gives a maximum repetition count
- NUMBER on its own gives an exact repetition count
This EBNF dialect should hopefully be familiar to many readers.
## Unicode productions
A few productions in Rust's grammar permit Unicode codepoints outside the ASCII
range. We define these productions in terms of character properties specified
in the Unicode standard, rather than in terms of ASCII-range codepoints. The
section [Special Unicode Productions](#special-unicode-productions) lists these
productions.
## String table productions
Some rules in the grammar &mdash; notably [unary
operators](#unary-operator-expressions), [binary
operators](#binary-operator-expressions), and [keywords](#keywords) &mdash; are
given in a simplified form: as a listing of a table of unquoted, printable
whitespace-separated strings. These cases form a subset of the rules regarding
the [token](#tokens) rule, and are assumed to be the result of a
lexical-analysis phase feeding the parser, driven by a DFA, operating over the
disjunction of all such string table entries.
When such a string enclosed in double-quotes (`"`) occurs inside the grammar,
it is an implicit reference to a single member of such a string table
production. See [tokens](#tokens) for more information.
# Lexical structure
## Input format
Rust input is interpreted as a sequence of Unicode codepoints encoded in UTF-8.
Most Rust grammar rules are defined in terms of printable ASCII-range
codepoints, but a small number are defined in terms of Unicode properties or
explicit codepoint lists. [^inputformat]
[^inputformat]: Substitute definitions for the special Unicode productions are
provided to the grammar verifier, restricted to ASCII range, when verifying the
grammar in this document.
## Special Unicode Productions
The following productions in the Rust grammar are defined in terms of Unicode
properties: `ident`, `non_null`, `non_star`, `non_eol`, `non_slash_or_star`,
`non_single_quote` and `non_double_quote`.
### Identifiers
The `ident` production is any nonempty Unicode string of the following form:
- The first character has property `XID_start`
- The remaining characters have property `XID_continue`
that does _not_ occur in the set of [keywords](#keywords).
> **Note**: `XID_start` and `XID_continue` as character properties cover the
> character ranges used to form the more familiar C and Java language-family
> identifiers.
### Delimiter-restricted productions
Some productions are defined by exclusion of particular Unicode characters:
- `non_null` is any single Unicode character aside from `U+0000` (null)
- `non_eol` is `non_null` restricted to exclude `U+000A` (`'\n'`)
- `non_star` is `non_null` restricted to exclude `U+002A` (`*`)
- `non_slash_or_star` is `non_null` restricted to exclude `U+002F` (`/`) and `U+002A` (`*`)
- `non_single_quote` is `non_null` restricted to exclude `U+0027` (`'`)
- `non_double_quote` is `non_null` restricted to exclude `U+0022` (`"`)
## Comments
```antlr
comment : block_comment | line_comment ;
block_comment : "/*" block_comment_body * "*/" ;
block_comment_body : [block_comment | character] * ;
line_comment : "//" non_eol * ;
```
**FIXME:** add doc grammar?
## Whitespace
```antlr
whitespace_char : '\x20' | '\x09' | '\x0a' | '\x0d' ;
whitespace : [ whitespace_char | comment ] + ;
```
## Tokens
```antlr
simple_token : keyword | unop | binop ;
token : simple_token | ident | literal | symbol | whitespace token ;
```
### Keywords
<p id="keyword-table-marker"></p>
| | | | | |
|----------|----------|----------|----------|--------|
| abstract | alignof | as | become | box |
| break | const | continue | crate | do |
| else | enum | extern | false | final |
| fn | for | if | impl | in |
| let | loop | match | mod | move |
| mut | offsetof | once | override | priv |
| proc | pub | pure | ref | return |
| sizeof | static | self | struct | super |
| true | trait | type | typeof | unsafe |
| unsized | use | virtual | where | while |
| yield | | | | |
Each of these keywords has special meaning in its grammar, and all of them are
excluded from the `ident` rule.
### Literals
```antlr
lit_suffix : ident;
literal : [ string_lit | char_lit | byte_string_lit | byte_lit | num_lit ] lit_suffix ?;
```
#### Character and string literals
```antlr
char_lit : '\x27' char_body '\x27' ;
string_lit : '"' string_body * '"' | 'r' raw_string ;
char_body : non_single_quote
| '\x5c' [ '\x27' | common_escape | unicode_escape ] ;
string_body : non_double_quote
| '\x5c' [ '\x22' | common_escape | unicode_escape ] ;
raw_string : '"' raw_string_body '"' | '#' raw_string '#' ;
common_escape : '\x5c'
| 'n' | 'r' | 't' | '0'
| 'x' hex_digit 2
unicode_escape : 'u' '{' hex_digit+ 6 '}';
hex_digit : 'a' | 'b' | 'c' | 'd' | 'e' | 'f'
| 'A' | 'B' | 'C' | 'D' | 'E' | 'F'
| dec_digit ;
oct_digit : '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' ;
dec_digit : '0' | nonzero_dec ;
nonzero_dec: '1' | '2' | '3' | '4'
| '5' | '6' | '7' | '8' | '9' ;
```
#### Byte and byte string literals
```antlr
byte_lit : "b\x27" byte_body '\x27' ;
byte_string_lit : "b\x22" string_body * '\x22' | "br" raw_byte_string ;
byte_body : ascii_non_single_quote
| '\x5c' [ '\x27' | common_escape ] ;
byte_string_body : ascii_non_double_quote
| '\x5c' [ '\x22' | common_escape ] ;
raw_byte_string : '"' raw_byte_string_body '"' | '#' raw_byte_string '#' ;
```
#### Number literals
```antlr
num_lit : nonzero_dec [ dec_digit | '_' ] * float_suffix ?
| '0' [ [ dec_digit | '_' ] * float_suffix ?
| 'b' [ '1' | '0' | '_' ] +
| 'o' [ oct_digit | '_' ] +
| 'x' [ hex_digit | '_' ] + ] ;
float_suffix : [ exponent | '.' dec_lit exponent ? ] ? ;
exponent : ['E' | 'e'] ['-' | '+' ] ? dec_lit ;
dec_lit : [ dec_digit | '_' ] + ;
```
#### Boolean literals
**FIXME:** write grammar
The two values of the boolean type are written `true` and `false`.
### Symbols
```antlr
symbol : "::" "->"
| '#' | '[' | ']' | '(' | ')' | '{' | '}'
| ',' | ';' ;
```
Symbols are a general class of printable [token](#tokens) that play structural
roles in a variety of grammar productions. They are catalogued here for
completeness as the set of remaining miscellaneous printable tokens that do not
otherwise appear as [unary operators](#unary-operator-expressions), [binary
operators](#binary-operator-expressions), or [keywords](#keywords).
## Paths
```antlr
expr_path : [ "::" ] ident [ "::" expr_path_tail ] + ;
expr_path_tail : '<' type_expr [ ',' type_expr ] + '>'
| expr_path ;
type_path : ident [ type_path_tail ] + ;
type_path_tail : '<' type_expr [ ',' type_expr ] + '>'
| "::" type_path ;
```
# Syntax extensions
## Macros
```antlr
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ;
macro_rule : '(' matcher * ')' "=>" '(' transcriber * ')' ';' ;
matcher : '(' matcher * ')' | '[' matcher * ']'
| '{' matcher * '}' | '$' ident ':' ident
| '$' '(' matcher * ')' sep_token? [ '*' | '+' ]
| non_special_token ;
transcriber : '(' transcriber * ')' | '[' transcriber * ']'
| '{' transcriber * '}' | '$' ident
| '$' '(' transcriber * ')' sep_token? [ '*' | '+' ]
| non_special_token ;
```
# Crates and source files
**FIXME:** grammar? What production covers #![crate_id = "foo"] ?
# Items and attributes
**FIXME:** grammar?
## Items
```antlr
item : mod_item | fn_item | type_item | struct_item | enum_item
| static_item | trait_item | impl_item | extern_block ;
```
### Type Parameters
**FIXME:** grammar?
### Modules
```antlr
mod_item : "mod" ident ( ';' | '{' mod '}' );
mod : [ view_item | item ] * ;
```
#### View items
```antlr
view_item : extern_crate_decl | use_decl ;
```
##### Extern crate declarations
```antlr
extern_crate_decl : "extern" "crate" crate_name
crate_name: ident | ( string_lit as ident )
```
##### Use declarations
```antlr
use_decl : "pub" ? "use" [ path "as" ident
| path_glob ] ;
path_glob : ident [ "::" [ path_glob
| '*' ] ] ?
| '{' path_item [ ',' path_item ] * '}' ;
path_item : ident | "mod" ;
```
### Functions
**FIXME:** grammar?
#### Generic functions
**FIXME:** grammar?
#### Unsafety
**FIXME:** grammar?
##### Unsafe functions
**FIXME:** grammar?
##### Unsafe blocks
**FIXME:** grammar?
#### Diverging functions
**FIXME:** grammar?
### Type definitions
**FIXME:** grammar?
### Structures
**FIXME:** grammar?
### Constant items
```antlr
const_item : "const" ident ':' type '=' expr ';' ;
```
### Static items
```antlr
static_item : "static" ident ':' type '=' expr ';' ;
```
#### Mutable statics
**FIXME:** grammar?
### Traits
**FIXME:** grammar?
### Implementations
**FIXME:** grammar?
### External blocks
```antlr
extern_block_item : "extern" '{' extern_block '}' ;
extern_block : [ foreign_fn ] * ;
```
## Visibility and Privacy
**FIXME:** grammar?
### Re-exporting and Visibility
**FIXME:** grammar?
## Attributes
```antlr
attribute : "#!" ? '[' meta_item ']' ;
meta_item : ident [ '=' literal
| '(' meta_seq ')' ] ? ;
meta_seq : meta_item [ ',' meta_seq ] ? ;
```
# Statements and expressions
## Statements
**FIXME:** grammar?
### Declaration statements
**FIXME:** grammar?
A _declaration statement_ is one that introduces one or more *names* into the
enclosing statement block. The declared names may denote new slots or new
items.
#### Item declarations
**FIXME:** grammar?
An _item declaration statement_ has a syntactic form identical to an
[item](#items) declaration within a module. Declaring an item &mdash; a
function, enumeration, structure, type, static, trait, implementation or module
&mdash; locally within a statement block is simply a way of restricting its
scope to a narrow region containing all of its uses; it is otherwise identical
in meaning to declaring the item outside the statement block.
#### Slot declarations
```antlr
let_decl : "let" pat [':' type ] ? [ init ] ? ';' ;
init : [ '=' ] expr ;
```
### Expression statements
**FIXME:** grammar?
## Expressions
**FIXME:** grammar?
#### Lvalues, rvalues and temporaries
**FIXME:** grammar?
#### Moved and copied types
**FIXME:** Do we want to capture this in the grammar as different productions?
### Literal expressions
**FIXME:** grammar?
### Path expressions
**FIXME:** grammar?
### Tuple expressions
**FIXME:** grammar?
### Unit expressions
**FIXME:** grammar?
### Structure expressions
```antlr
struct_expr : expr_path '{' ident ':' expr
[ ',' ident ':' expr ] *
[ ".." expr ] '}' |
expr_path '(' expr
[ ',' expr ] * ')' |
expr_path ;
```
### Block expressions
```antlr
block_expr : '{' [ view_item ] *
[ stmt ';' | item ] *
[ expr ] '}' ;
```
### Method-call expressions
```antlr
method_call_expr : expr '.' ident paren_expr_list ;
```
### Field expressions
```antlr
field_expr : expr '.' ident ;
```
### Array expressions
```antlr
array_expr : '[' "mut" ? vec_elems? ']' ;
array_elems : [expr [',' expr]*] | [expr ',' ".." expr] ;
```
### Index expressions
```antlr
idx_expr : expr '[' expr ']' ;
```
### Unary operator expressions
**FIXME:** grammar?
### Binary operator expressions
```antlr
binop_expr : expr binop expr ;
```
#### Arithmetic operators
**FIXME:** grammar?
#### Bitwise operators
**FIXME:** grammar?
#### Lazy boolean operators
**FIXME:** grammar?
#### Comparison operators
**FIXME:** grammar?
#### Type cast expressions
**FIXME:** grammar?
#### Assignment expressions
**FIXME:** grammar?
#### Compound assignment expressions
**FIXME:** grammar?
#### Operator precedence
The precedence of Rust binary operators is ordered as follows, going from
strong to weak:
```text
* / %
as
+ -
<< >>
&
^
|
< > <= >=
== !=
&&
||
=
```
Operators at the same precedence level are evaluated left-to-right. [Unary
operators](#unary-operator-expressions) have the same precedence level and it
is stronger than any of the binary operators'.
### Grouped expressions
```antlr
paren_expr : '(' expr ')' ;
```
### Call expressions
```antlr
expr_list : [ expr [ ',' expr ]* ] ? ;
paren_expr_list : '(' expr_list ')' ;
call_expr : expr paren_expr_list ;
```
### Lambda expressions
```antlr
ident_list : [ ident [ ',' ident ]* ] ? ;
lambda_expr : '|' ident_list '|' expr ;
```
### While loops
```antlr
while_expr : "while" no_struct_literal_expr '{' block '}' ;
```
### Infinite loops
```antlr
loop_expr : [ lifetime ':' ] "loop" '{' block '}';
```
### Break expressions
```antlr
break_expr : "break" [ lifetime ];
```
### Continue expressions
```antlr
continue_expr : "continue" [ lifetime ];
```
### For expressions
```antlr
for_expr : "for" pat "in" no_struct_literal_expr '{' block '}' ;
```
### If expressions
```antlr
if_expr : "if" no_struct_literal_expr '{' block '}'
else_tail ? ;
else_tail : "else" [ if_expr | if_let_expr
| '{' block '}' ] ;
```
### Match expressions
```antlr
match_expr : "match" no_struct_literal_expr '{' match_arm * '}' ;
match_arm : attribute * match_pat "=>" [ expr "," | '{' block '}' ] ;
match_pat : pat [ '|' pat ] * [ "if" expr ] ? ;
```
### If let expressions
```antlr
if_let_expr : "if" "let" pat '=' expr '{' block '}'
else_tail ? ;
else_tail : "else" [ if_expr | if_let_expr | '{' block '}' ] ;
```
### While let loops
```antlr
while_let_expr : "while" "let" pat '=' expr '{' block '}' ;
```
### Return expressions
```antlr
return_expr : "return" expr ? ;
```
# Type system
**FIXME:** is this entire chapter relevant here? Or should it all have been covered by some production already?
## Types
### Primitive types
**FIXME:** grammar?
#### Machine types
**FIXME:** grammar?
#### Machine-dependent integer types
**FIXME:** grammar?
### Textual types
**FIXME:** grammar?
### Tuple types
**FIXME:** grammar?
### Array, and Slice types
**FIXME:** grammar?
### Structure types
**FIXME:** grammar?
### Enumerated types
**FIXME:** grammar?
### Pointer types
**FIXME:** grammar?
### Function types
**FIXME:** grammar?
### Closure types
```antlr
closure_type := [ 'unsafe' ] [ '<' lifetime-list '>' ] '|' arg-list '|'
[ ':' bound-list ] [ '->' type ]
procedure_type := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')'
[ ':' bound-list ] [ '->' type ]
lifetime-list := lifetime | lifetime ',' lifetime-list
arg-list := ident ':' type | ident ':' type ',' arg-list
bound-list := bound | bound '+' bound-list
bound := path | lifetime
```
### Object types
**FIXME:** grammar?
### Type parameters
**FIXME:** grammar?
### Self types
**FIXME:** grammar?
## Type kinds
**FIXME:** this this probably not relevant to the grammar...
# Memory and concurrency models
**FIXME:** is this entire chapter relevant here? Or should it all have been covered by some production already?
## Memory model
### Memory allocation and lifetime
### Memory ownership
### Memory slots
### Boxes
## Tasks
### Communication between tasks
### Task lifecycle

4
src/doc/guide-crates.md Normal file
View File

@ -0,0 +1,4 @@
% The (old) Rust Crates and Modules Guide
This content has moved into
[the Rust Programming Language book](book/crates-and-modules.html).

View File

@ -0,0 +1,4 @@
% Error Handling in Rust
This content has moved into
[the Rust Programming Language book](book/error-handling.html).

4
src/doc/guide-ffi.md Normal file
View File

@ -0,0 +1,4 @@
% The (old) Rust Foreign Function Interface Guide
This content has moved into
[the Rust Programming Language book](book/ffi.html).

4
src/doc/guide-macros.md Normal file
View File

@ -0,0 +1,4 @@
% The (old) Rust Macros Guide
This content has moved into
[the Rust Programming Language book](book/macros.html).

View File

@ -0,0 +1,4 @@
% The (old) Rust Ownership Guide
This content has moved into
[the Rust Programming Language book](book/ownership.html).

4
src/doc/guide-plugins.md Normal file
View File

@ -0,0 +1,4 @@
% The (old) Rust Compiler Plugins Guide
This content has moved into
[the Rust Programming Language book](book/plugins.html).

View File

@ -0,0 +1,4 @@
% The (old) Rust Pointer Guide
This content has moved into
[the Rust Programming Language book](book/pointers.html).

4
src/doc/guide-strings.md Normal file
View File

@ -0,0 +1,4 @@
% The (old) Guide to Rust Strings
This content has moved into
[the Rust Programming Language book](book/strings.html).

4
src/doc/guide-tasks.md Normal file
View File

@ -0,0 +1,4 @@
% The (old) Rust Threads and Communication Guide
This content has moved into
[the Rust Programming Language book](book/tasks.html).

4
src/doc/guide-testing.md Normal file
View File

@ -0,0 +1,4 @@
% The (old) Rust Testing Guide
This content has moved into
[the Rust Programming Language book](book/testing.html).

4
src/doc/guide-unsafe.md Normal file
View File

@ -0,0 +1,4 @@
% Writing Safe Low-level and Unsafe Code in Rust
This content has moved into
[the Rust Programming Language book](book/unsafe.html).

4
src/doc/guide.md Normal file
View File

@ -0,0 +1,4 @@
% The (old) Rust Guide
This content has moved into
[the Rust Programming Language book](book/README.html).

View File

@ -39,10 +39,12 @@ Overflow](http://stackoverflow.com/questions/tagged/rust). Searching for your
problem might reveal someone who has asked it before! problem might reveal someone who has asked it before!
There is an active [subreddit](http://reddit.com/r/rust) with lots of There is an active [subreddit](http://reddit.com/r/rust) with lots of
discussion about Rust. discussion and news about Rust.
There is also a [developer forum](http://discuss.rust-lang.org/), where the There is also a [user forum](http://users.rust-lang.org), for all
development of Rust itself is discussed. user-oriented discussion, and a [developer
forum](http://internals.rust-lang.org/), where the development of Rust
itself is discussed.
# Specification # Specification
@ -57,8 +59,7 @@ tools we have are really nice.
[Cargo](http://crates.io) is Rust's package manager, and its website contains [Cargo](http://crates.io) is Rust's package manager, and its website contains
lots of good documentation. lots of good documentation.
[The `rustdoc` manual](rustdoc.html) contains information about Rust's [`rustdoc`](book/documentation.html) is used to generate documentation for Rust code.
documentation tool.
# FAQs # FAQs

View File

@ -5,7 +5,7 @@ accomplishes these goals by being memory safe without using garbage collection.
This introduction will give you a rough idea of what Rust is like, eliding many This introduction will give you a rough idea of what Rust is like, eliding many
details. It does not require prior experience with systems programming, but you details. It does not require prior experience with systems programming, but you
may find the syntax easier if you've used a 'curly brace' programming language may find the syntax easier if you've used a "curly brace" programming language
before, like C or JavaScript. The concepts are more important than the syntax, before, like C or JavaScript. The concepts are more important than the syntax,
so don't worry if you don't get every last detail: you can read [The so don't worry if you don't get every last detail: you can read [The
Rust Programming Language](book/index.html) to get a more complete explanation. Rust Programming Language](book/index.html) to get a more complete explanation.
@ -15,7 +15,7 @@ Rust to follow along. If you'd like to anyway, check out [the
homepage](http://rust-lang.org) for explanation. homepage](http://rust-lang.org) for explanation.
To show off Rust, let's talk about how easy it is to get started with Rust. To show off Rust, let's talk about how easy it is to get started with Rust.
Then, we'll talk about Rust's most interesting feature, **ownership**, and Then, we'll talk about Rust's most interesting feature, *ownership*, and
then discuss how it makes concurrency easier to reason about. Finally, then discuss how it makes concurrency easier to reason about. Finally,
we'll talk about how Rust breaks down the perceived dichotomy between speed we'll talk about how Rust breaks down the perceived dichotomy between speed
and safety. and safety.
@ -57,7 +57,7 @@ version = "0.0.1"
authors = ["Your Name <you@example.com>"] authors = ["Your Name <you@example.com>"]
``` ```
This is called a **manifest**, and it contains all of the metadata that Cargo This is called a *manifest*, and it contains all of the metadata that Cargo
needs to compile your project. needs to compile your project.
Here's what's in `src/main.rs`: Here's what's in `src/main.rs`:
@ -68,7 +68,7 @@ fn main() {
} }
``` ```
Cargo generated a 'hello world' for us. We'll talk more about the syntax here Cargo generated a "Hello World" for us. We'll talk more about the syntax here
later, but that's what Rust code looks like! Let's compile and run it: later, but that's what Rust code looks like! Let's compile and run it:
```{bash} ```{bash}
@ -106,9 +106,9 @@ use semver::Version;
fn main() { fn main() {
assert!(Version::parse("1.2.3") == Ok(Version { assert!(Version::parse("1.2.3") == Ok(Version {
major: 1u, major: 1u64,
minor: 2u, minor: 2u64,
patch: 3u, patch: 3u64,
pre: vec!(), pre: vec!(),
build: vec!(), build: vec!(),
})); }));
@ -146,8 +146,8 @@ Enough about tools, let's talk code!
# Ownership # Ownership
Rust's defining feature is 'memory safety without garbage collection.' Let's Rust's defining feature is "memory safety without garbage collection". Let's
take a moment to talk about what that means. **Memory safety** means that the take a moment to talk about what that means. *Memory safety* means that the
programming language eliminates certain kinds of bugs, such as [buffer programming language eliminates certain kinds of bugs, such as [buffer
overflows](http://en.wikipedia.org/wiki/Buffer_overflow) and [dangling overflows](http://en.wikipedia.org/wiki/Buffer_overflow) and [dangling
pointers](http://en.wikipedia.org/wiki/Dangling_pointer). These problems occur pointers](http://en.wikipedia.org/wiki/Dangling_pointer). These problems occur
@ -170,7 +170,7 @@ We make an array, `v`, and then call `push` on it. `push` is a method which
adds an element to the end of an array. adds an element to the end of an array.
Next, we make a new variable, `x`, that's equal to the first element of Next, we make a new variable, `x`, that's equal to the first element of
the array. Simple, but this is where the 'bug' will appear. the array. Simple, but this is where the "bug" will appear.
Let's keep going. We then call `push` again, pushing "world" onto the Let's keep going. We then call `push` again, pushing "world" onto the
end of the array. `v` now is `["Hello", "world"]`. end of the array. `v` now is `["Hello", "world"]`.
@ -222,9 +222,9 @@ its length changes, we may need to allocate more memory. In Ruby, this happens
as well, we just don't think about it very often. So why does the C++ version as well, we just don't think about it very often. So why does the C++ version
segfault when we allocate more memory? segfault when we allocate more memory?
The answer is that in the C++ version, `x` is a **reference** to the memory The answer is that in the C++ version, `x` is a *reference* to the memory
location where the first element of the array is stored. But in Ruby, `x` is a location where the first element of the array is stored. But in Ruby, `x` is a
standalone value, not connected to the underyling array at all. Let's dig into standalone value, not connected to the underlying array at all. Let's dig into
the details for a moment. Your program has access to memory, provided to it by the details for a moment. Your program has access to memory, provided to it by
the operating system. Each location in memory has an address. So when we make the operating system. Each location in memory has an address. So when we make
our vector, `v`, it's stored in a memory location somewhere: our vector, `v`, it's stored in a memory location somewhere:
@ -332,11 +332,11 @@ error: aborting due to previous error
When we try to mutate the array by `push`ing it the second time, Rust throws When we try to mutate the array by `push`ing it the second time, Rust throws
an error. It says that we "cannot borrow v as mutable because it is also an error. It says that we "cannot borrow v as mutable because it is also
borrowed as immutable." What's up with "borrowed"? borrowed as immutable." What does it mean by "borrowed"?
In Rust, the type system encodes the notion of **ownership**. The variable `v` In Rust, the type system encodes the notion of *ownership*. The variable `v`
is an "owner" of the vector. When we make a reference to `v`, we let that is an *owner* of the vector. When we make a reference to `v`, we let that
variable (in this case, `x`) 'borrow' it for a while. Just like if you own a variable (in this case, `x`) *borrow* it for a while. Just like if you own a
book, and you lend it to me, I'm borrowing the book. book, and you lend it to me, I'm borrowing the book.
So, when I try to modify the vector with the second call to `push`, I need So, when I try to modify the vector with the second call to `push`, I need
@ -392,22 +392,23 @@ Here's an example of a concurrent Rust program:
use std::thread::Thread; use std::thread::Thread;
fn main() { fn main() {
for _ in range(0u, 10u) { let guards: Vec<_> = (0..10).map(|_| {
Thread::spawn(move || { Thread::scoped(|| {
println!("Hello, world!"); println!("Hello, world!");
}); })
} }).collect();
} }
``` ```
This program creates ten threads, who all print `Hello, world!`. The This program creates ten threads, which all print `Hello, world!`. The `scoped`
`spawn` function takes one argument, a closure, indicated by the function takes one argument, a closure, indicated by the double bars `||`. This
double bars `||`. (The `move` keyword indicates that the closure takes closure is executed in a new thread created by `scoped`. The method is called
ownership of any data it uses; we'll have more on the significance of `scoped` because it returns a 'join guard', which will automatically join the
this shortly.) This closure is executed in a new thread created by child thread when it goes out of scope. Because we `collect` these guards into
`spawn`. a `Vec<T>`, and that vector goes out of scope at the end of our program, our
program will wait for every thread to finish before finishing.
One common form of problem in concurrent programs is a 'data race.' One common form of problem in concurrent programs is a *data race*.
This occurs when two different threads attempt to access the same This occurs when two different threads attempt to access the same
location in memory in a non-synchronized way, where at least one of location in memory in a non-synchronized way, where at least one of
them is a write. If one thread is attempting to read, and one thread them is a write. If one thread is attempting to read, and one thread
@ -423,11 +424,11 @@ Let's see an example. This Rust code will not compile:
use std::thread::Thread; use std::thread::Thread;
fn main() { fn main() {
let mut numbers = vec![1i, 2i, 3i]; let mut numbers = vec![1, 2, 3];
for i in range(0u, 3u) { for i in 0..3 {
Thread::spawn(move || { Thread::spawn(move || {
for j in range(0, 3) { numbers[j] += 1 } for j in 0..3 { numbers[j] += 1 }
}); });
} }
} }
@ -437,14 +438,14 @@ It gives us this error:
```text ```text
6:71 error: capture of moved value: `numbers` 6:71 error: capture of moved value: `numbers`
for j in range(0, 3) { numbers[j] += 1 } for j in 0..3 { numbers[j] += 1 }
^~~~~~~ ^~~~~~~
7:50 note: `numbers` moved into closure environment here 7:50 note: `numbers` moved into closure environment here
spawn(move || { spawn(move || {
for j in range(0, 3) { numbers[j] += 1 } for j in 0..3 { numbers[j] += 1 }
}); });
6:79 error: cannot assign to immutable dereference (dereference is implicit, due to indexing) 6:79 error: cannot assign to immutable dereference (dereference is implicit, due to indexing)
for j in range(0, 3) { numbers[j] += 1 } for j in 0..3 { numbers[j] += 1 }
^~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~
``` ```
@ -460,9 +461,9 @@ code tries to make three owners. This may cause a safety problem, so
Rust disallows it. Rust disallows it.
What to do here? Rust has two types that helps us: `Arc<T>` and `Mutex<T>`. What to do here? Rust has two types that helps us: `Arc<T>` and `Mutex<T>`.
"Arc" stands for "atomically reference counted." In other words, an Arc will *Arc* stands for "atomically reference counted". In other words, an Arc will
keep track of the number of references to something, and not free the keep track of the number of references to something, and not free the
associated resource until the count is zero. The 'atomic' portion refers to an associated resource until the count is zero. The *atomic* portion refers to an
Arc's usage of concurrency primitives to atomically update the count, making it Arc's usage of concurrency primitives to atomically update the count, making it
safe across threads. If we use an Arc, we can have our three references. But, safe across threads. If we use an Arc, we can have our three references. But,
an Arc does not allow mutable borrows of the data it holds, and we want to an Arc does not allow mutable borrows of the data it holds, and we want to
@ -477,16 +478,14 @@ use std::thread::Thread;
use std::sync::{Arc,Mutex}; use std::sync::{Arc,Mutex};
fn main() { fn main() {
let numbers = Arc::new(Mutex::new(vec![1i, 2i, 3i])); let numbers = Arc::new(Mutex::new(vec![1, 2, 3]));
for i in range(0u, 3u) { for i in 0..3 {
let number = numbers.clone(); let number = numbers.clone();
Thread::spawn(move || { Thread::spawn(move || {
let mut array = number.lock().unwrap(); let mut array = number.lock().unwrap();
array[i] += 1;
(*array)[i] += 1; println!("numbers[{}] is {}", i, array[i]);
println!("numbers[{}] is {}", i, (*array)[i]);
}); });
} }
} }
@ -525,13 +524,13 @@ give us assurance _at compile time_ that we weren't doing something incorrect
with regards to concurrency. In order to share ownership, we were forced to be with regards to concurrency. In order to share ownership, we were forced to be
explicit and use a mechanism to ensure that it would be properly handled. explicit and use a mechanism to ensure that it would be properly handled.
# Safety _and_ speed # Safety _and_ Speed
Safety and speed are always presented as a continuum. On one hand, you have Safety and speed are always presented as a continuum. At one end of the spectrum,
maximum speed, but no safety. On the other, you have absolute safety, with no you have maximum speed, but no safety. On the other end, you have absolute safety
speed. Rust seeks to break out of this mode by introducing safety at compile with no speed. Rust seeks to break out of this paradigm by introducing safety at
time, ensuring that you haven't done anything wrong, while compiling to the compile time, ensuring that you haven't done anything wrong, while compiling to
same low-level code you'd expect without the safety. the same low-level code you'd expect without the safety.
As an example, Rust's ownership system is _entirely_ at compile time. The As an example, Rust's ownership system is _entirely_ at compile time. The
safety check that makes this an error about moved values: safety check that makes this an error about moved values:
@ -540,12 +539,12 @@ safety check that makes this an error about moved values:
use std::thread::Thread; use std::thread::Thread;
fn main() { fn main() {
let vec = vec![1i, 2, 3]; let vec = vec![1, 2, 3];
for i in range(0u, 3) { for i in 0..3 {
Thread::spawn(move || { Thread::spawn(move || {
println!("{}", vec[i]); println!("{}", vec[i]);
}).detach(); });
} }
} }
``` ```
@ -556,9 +555,9 @@ you can remove it. As an example, this is a poor way to iterate through
a vector: a vector:
```{rust} ```{rust}
let vec = vec![1i, 2, 3]; let vec = vec![1, 2, 3];
for i in range(0u, vec.len()) { for i in 0..vec.len() {
println!("{}", vec[i]); println!("{}", vec[i]);
} }
``` ```
@ -568,7 +567,7 @@ that we don't try to access an invalid index. However, we can remove this
while retaining safety. The answer is iterators: while retaining safety. The answer is iterators:
```{rust} ```{rust}
let vec = vec![1i, 2, 3]; let vec = vec![1, 2, 3];
for x in vec.iter() { for x in vec.iter() {
println!("{}", x); println!("{}", x);

View File

@ -12,6 +12,7 @@ Looks like you've taken a wrong turn.
Some things that might be helpful to you though: Some things that might be helpful to you though:
## Search ## Search
* <form action="https://duckduckgo.com/"> * <form action="https://duckduckgo.com/">
<input type="text" id="site-search" name="q" size="80"></input> <input type="text" id="site-search" name="q" size="80"></input>
<input type="submit" value="Search DuckDuckGo"> <input type="submit" value="Search DuckDuckGo">
@ -19,10 +20,12 @@ Some things that might be helpful to you though:
* Rust doc search: <span id="core-search"></span> * Rust doc search: <span id="core-search"></span>
## Reference ## Reference
* [The Rust official site](http://rust-lang.org) * [The Rust official site](http://rust-lang.org)
* [The Rust reference](http://doc.rust-lang.org/reference.html) (* [PDF](http://doc.rust-lang.org/reference.pdf)) * [The Rust reference](http://doc.rust-lang.org/reference.html)
## Docs ## Docs
* [The standard library](http://doc.rust-lang.org/std/) * [The standard library](http://doc.rust-lang.org/std/)
<script> <script>

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@
body { body {
margin: 0 auto; margin: 0 auto;
padding: 0 15px; padding: 0 15px;
font-family: "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-size: 18px; font-size: 18px;
color: #333; color: #333;
line-height: 1.428571429; line-height: 1.428571429;
@ -195,6 +195,7 @@ h5 a:hover {text-decoration: none;}
pre, code { pre, code {
font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
word-wrap: break-word;
} }
pre { pre {
border-left: 2px solid #eee; border-left: 2px solid #eee;
@ -204,7 +205,6 @@ pre {
margin: 20px 0; margin: 20px 0;
font-size: 13px; font-size: 13px;
word-break: break-all; word-break: break-all;
word-wrap: break-word;
} }
code { code {
padding: 0 2px; padding: 0 2px;
@ -315,6 +315,8 @@ hr {
table { table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
overflow-x: auto;
display: block;
} }
table tr.odd { table tr.odd {

View File

@ -1,267 +1,3 @@
% Rust Documentation % Rust Documentation
`rustdoc` is the built-in tool for generating documentation. It integrates This has been moved [into the book](book/documentation.html).
with the compiler to provide accurate hyperlinking between usage of types and
their documentation. Furthermore, by not using a separate parser, it will
never reject your valid Rust code.
# Creating Documentation
Documenting Rust APIs is quite simple. To document a given item, we have "doc
comments":
~~~
# #![allow(unused_attribute)]
// the "link" crate attribute is currently required for rustdoc, but normally
// isn't needed.
#![crate_id = "universe"]
#![crate_type="lib"]
//! Tools for dealing with universes (this is a doc comment, and is shown on
//! the crate index page. The ! makes it apply to the parent of the comment,
//! rather than what follows).
# mod workaround_the_outer_function_rustdoc_inserts {
/// Widgets are very common (this is a doc comment, and will show up on
/// Widget's documentation).
pub struct Widget {
/// All widgets have a purpose (this is a doc comment, and will show up
/// the field's documentation).
purpose: String,
/// Humans are not allowed to understand some widgets
understandable: bool
}
pub fn recalibrate() {
//! Recalibrate a pesky universe (this is also a doc comment, like above,
//! the documentation will be applied to the *parent* item, so
//! `recalibrate`).
/* ... */
}
# }
~~~
Documentation can also be controlled via the `doc` attribute on items. This is
implicitly done by the compiler when using the above form of doc comments
(converting the slash-based comments to `#[doc]` attributes).
~~~
#[doc = "
Calculates the factorial of a number.
Given the input integer `n`, this function will calculate `n!` and return it.
"]
pub fn factorial(n: int) -> int { if n < 2 {1} else {n * factorial(n - 1)} }
# fn main() {}
~~~
The `doc` attribute can also be used to control how rustdoc emits documentation
in some cases.
```
// Rustdoc will inline documentation of a `pub use` into this crate when the
// `pub use` reaches across crates, but this behavior can also be disabled.
#[doc(no_inline)]
pub use std::option::Option;
# fn main() {}
```
Doc comments are markdown, and are currently parsed with the
[hoedown][hoedown] library. rustdoc does not yet do any fanciness such as
referencing other items inline, like javadoc's `@see`. One exception to this
is that the first paragraph will be used as the "summary" of an item in the
generated documentation:
~~~
/// A whizbang. Does stuff. (this line is the summary)
///
/// Whizbangs are ...
struct Whizbang;
~~~
To generate the docs, run `rustdoc universe.rs`. By default, it generates a
directory called `doc`, with the documentation for `universe` being in
`doc/universe/index.html`. If you are using other crates with `extern crate`,
rustdoc will even link to them when you use their types, as long as their
documentation has already been generated by a previous run of rustdoc, or the
crate advertises that its documentation is hosted at a given URL.
The generated output can be controlled with the `doc` crate attribute, which
is how the above advertisement works. An example from the `libstd`
documentation:
~~~
#[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
html_root_url = "http://doc.rust-lang.org/")];
~~~
The `html_root_url` is the prefix that rustdoc will apply to any references to
that crate's types etc.
rustdoc can also generate JSON, for consumption by other tools, with
`rustdoc --output-format json`, and also consume already-generated JSON with
`rustdoc --input-format json`.
rustdoc also supports personalizing the output from crates' documentation,
similar to markdown options.
- `--html-in-header FILE`: includes the contents of `FILE` at the
end of the `<head>...</head>` section.
- `--html-before-content FILE`: includes the contents of `FILE`
directly after `<body>`, before the rendered content (including the
search bar).
- `--html-after-content FILE`: includes the contents of `FILE`
after all the rendered content.
# Using the Documentation
The web pages generated by rustdoc present the same logical hierarchy that one
writes a library with. Every kind of item (function, struct, etc) has its own
color, and one can always click on a colored type to jump to its
documentation. There is a search bar at the top, which is powered by some
JavaScript and a statically-generated search index. No special web server is
required for the search.
[hoedown]: https://github.com/hoedown/hoedown
# Testing the Documentation
`rustdoc` has support for testing code examples which appear in the
documentation. This is helpful for keeping code examples up to date with the
source code.
To test documentation, the `--test` argument is passed to rustdoc:
~~~ {.sh}
rustdoc --test crate.rs
~~~
## Defining tests
Rust documentation currently uses the markdown format, and rustdoc treats all
code blocks as testable-by-default unless they carry a language tag of another
language. In order to not run a test over a block of code, the `ignore` string
can be added to the three-backtick form of markdown code block.
~~~md
```
// This is a testable code block
```
```rust{.example}
// This is rust and also testable
```
```ignore
// This is not a testable code block
```
// This is a testable code block (4-space indent)
```sh
# this is shell code and not tested
```
~~~
You can specify that the test's execution should fail with the `should_fail`
directive.
~~~md
```should_fail
// This code block is expected to generate a panic when run
```
~~~
You can specify that the code block should be compiled but not run with the
`no_run` directive.
~~~md
```no_run
// This code will be compiled but not executed
```
~~~
Lastly, you can specify that a code block be compiled as if `--test`
were passed to the compiler using the `test_harness` directive.
~~~md
```test_harness
#[test]
fn foo() {
panic!("oops! (will run & register as a failed test)")
}
```
~~~
Rustdoc also supplies some extra sugar for helping with some tedious
documentation examples. If a line is prefixed with `# `, then the line
will not show up in the HTML documentation, but it will be used when
testing the code block (NB. the space after the `#` is required, so
that one can still write things like `#[deriving(Eq)]`).
~~~md
```
# /!\ The three following lines are comments, which are usually stripped off by
# the doc-generating tool. In order to display them anyway in this particular
# case, the character following the leading '#' is not a usual space like in
# these first five lines but a non breakable one.
# // showing 'fib' in this documentation would just be tedious and detracts from
# // what's actually being documented.
# fn fib(n: int) { n + 2 }
spawn(move || { fib(200); })
```
~~~
The documentation online would look like `spawn(move || { fib(200); })`, but when
testing this code, the `fib` function will be included (so it can compile).
## Running tests (advanced)
Running tests often requires some special configuration to filter tests, find
libraries, or try running ignored examples. The testing framework that rustdoc
uses is built on crate `test`, which is also used when you compile crates with
rustc's `--test` flag. Extra arguments can be passed to rustdoc's test harness
with the `--test-args` flag.
~~~console
# Only run tests containing 'foo' in their name
$ rustdoc --test lib.rs --test-args 'foo'
# See what's possible when running tests
$ rustdoc --test lib.rs --test-args '--help'
~~~
When testing a library, code examples will often show how functions are used,
and this code often requires `use`-ing paths from the crate. To accommodate this,
rustdoc will implicitly add `extern crate <crate>;` where `<crate>` is the name of
the crate being tested to the top of each code example. This means that rustdoc
must be able to find a compiled version of the library crate being tested. Extra
search paths may be added via the `-L` flag to `rustdoc`.
# Standalone Markdown files
As well as Rust crates, rustdoc supports rendering pure Markdown files
into HTML and testing the code snippets from them. A Markdown file is
detected by a `.md` or `.markdown` extension.
There are 4 options to modify the output that Rustdoc creates.
- `--markdown-css PATH`: adds a `<link rel="stylesheet">` tag pointing to `PATH`.
- `--html-in-header FILE`: includes the contents of `FILE` at the
end of the `<head>...</head>` section.
- `--html-before-content FILE`: includes the contents of `FILE`
directly after `<body>`, before the rendered content (including the
title).
- `--html-after-content FILE`: includes the contents of `FILE`
directly before `</body>`, after all the rendered content.
All of these can be specified multiple times, and they are output in
the order in which they are specified. The first line of the file being rendered must
be the title, prefixed with `%` (e.g. this page has `% Rust
Documentation` on the first line).
Like with a Rust crate, the `--test` argument will run the code
examples to check they compile, and obeys any `--test-args` flags. The
tests are named after the last `#` heading.

64
src/doc/style/README.md Normal file
View File

@ -0,0 +1,64 @@
% Style Guidelines
This document collects the emerging principles, conventions, abstractions, and
best practices for writing Rust code.
Since Rust is evolving at a rapid pace, these guidelines are
preliminary. The hope is that writing them down explicitly will help
drive discussion, consensus and adoption.
Whenever feasible, guidelines provide specific examples from Rust's standard
libraries.
### Guideline statuses
Every guideline has a status:
* **[FIXME]**: Marks places where there is more work to be done. In
some cases, that just means going through the RFC process.
* **[FIXME #NNNNN]**: Like **[FIXME]**, but links to the issue tracker.
* **[RFC #NNNN]**: Marks accepted guidelines, linking to the rust-lang
RFC establishing them.
### Guideline stabilization
One purpose of these guidelines is to reach decisions on a number of
cross-cutting API and stylistic choices. Discussion and development of
the guidelines will happen primarily on http://discuss.rust-lang.org/,
using the Guidelines category. Discussion can also occur on the
[guidelines issue tracker](https://github.com/rust-lang/rust-guidelines).
Guidelines that are under development or discussion will be marked with the
status **[FIXME]**, with a link to the issue tracker when appropriate.
Once a concrete guideline is ready to be proposed, it should be filed
as an [FIXME: needs RFC](https://github.com/rust-lang/rfcs). If the RFC is
accepted, the official guidelines will be updated to match, and will
include the tag **[RFC #NNNN]** linking to the RFC document.
### What's in this document
This document is broken into four parts:
* **[Style](style/README.md)** provides a set of rules governing naming conventions,
whitespace, and other stylistic issues.
* **[Guidelines by Rust feature](features/README.md)** places the focus on each of
Rust's features, starting from expressions and working the way out toward
crates, dispensing guidelines relevant to each.
* **Topical guidelines and patterns**. The rest of the document proceeds by
cross-cutting topic, starting with
[Ownership and resources](ownership/README.md).
* **[APIs for a changing Rust](changing/README.md)**
discusses the forward-compatibility hazards, especially those that interact
with the pre-1.0 library stabilization process.
> **[FIXME]** Add cross-references throughout this document to the tutorial,
> reference manual, and other guides.
> **[FIXME]** What are some _non_-goals, _non_-principles, or _anti_-patterns that
> we should document?

54
src/doc/style/SUMMARY.md Normal file
View File

@ -0,0 +1,54 @@
# Summary
* [Style](style/README.md)
* [Whitespace](style/whitespace.md)
* [Comments](style/comments.md)
* [Braces, semicolons, commas](style/braces.md)
* [Naming](style/naming/README.md)
* [Ownership variants](style/naming/ownership.md)
* [Containers/wrappers](style/naming/containers.md)
* [Conversions](style/naming/conversions.md)
* [Iterators](style/naming/iterators.md)
* [Imports](style/imports.md)
* [Organization](style/organization.md)
* [Guidelines by Rust feature](features/README.md)
* [Let binding](features/let.md)
* [Pattern matching](features/match.md)
* [Loops](features/loops.md)
* [Functions and methods](features/functions-and-methods/README.md)
* [Input](features/functions-and-methods/input.md)
* [Output](features/functions-and-methods/output.md)
* [For convenience](features/functions-and-methods/convenience.md)
* [Types](features/types/README.md)
* [Conversions](features/types/conversions.md)
* [The newtype pattern](features/types/newtype.md)
* [Traits](features/traits/README.md)
* [For generics](features/traits/generics.md)
* [For objects](features/traits/objects.md)
* [For overloading](features/traits/overloading.md)
* [For extensions](features/traits/extensions.md)
* [For reuse](features/traits/reuse.md)
* [Common traits](features/traits/common.md)
* [Modules](features/modules.md)
* [Crates](features/crates.md)
* [Ownership and resources](ownership/README.md)
* [Constructors](ownership/constructors.md)
* [Builders](ownership/builders.md)
* [Destructors](ownership/destructors.md)
* [RAII](ownership/raii.md)
* [Cells and smart pointers](ownership/cell-smart.md)
* [Errors](errors/README.md)
* [Signaling](errors/signaling.md)
* [Handling](errors/handling.md)
* [Propagation](errors/propagation.md)
* [Ergonomics](errors/ergonomics.md)
* [Safety and guarantees](safety/README.md)
* [Using unsafe](safety/unsafe.md)
* [Library guarantees](safety/lib-guarantees.md)
* [Testing](testing/README.md)
* [Unit testing](testing/unit.md)
* [FFI, platform-specific code](platform.md)
* [APIs for a changing Rust](changing/README.md)
* [Pre-1.0 changes](changing/pre-1-0.md)
* [Post-1.0 changes](changing/post-1-0.md)
* [Timing unclear](changing/unclear.md)

View File

@ -0,0 +1,5 @@
% API design for a changing Rust
A number of planned Rust features will drastically affect the API design
story. This section collects some of the biggest features with concrete examples
of how the API will change.

View File

@ -0,0 +1,12 @@
% Post-1.0 changes
### Higher-kinded types
* A trait encompassing both `Iterable<T>` for some fixed `T` and
`FromIterator<U>` for _all_ `U` (where HKT comes in). The train
could provide e.g. a default `map` method producing the same kind of
the container, but with a new type parameter.
* **Monadic-generic programming**? Can we add this without deprecating
huge swaths of the API (including `Option::map`, `option::collect`,
`result::collect`, `try!` etc.

Some files were not shown because too many files have changed in this diff Show More