2013-07-07 14:15:45 -05:00
|
|
|
# SOME DESCRIPTIVE TITLE
|
2013-07-16 17:18:42 -05:00
|
|
|
# Copyright (C) YEAR The Rust Project Developers
|
|
|
|
# This file is distributed under the same license as the Rust package.
|
2013-07-07 14:15:45 -05:00
|
|
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
|
|
#
|
|
|
|
#, fuzzy
|
|
|
|
msgid ""
|
|
|
|
msgstr ""
|
2013-07-16 17:18:42 -05:00
|
|
|
"Project-Id-Version: Rust 0.8-pre\n"
|
|
|
|
"POT-Creation-Date: 2013-07-17 07:18+0900\n"
|
2013-07-07 14:15:45 -05:00
|
|
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
|
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
|
|
"Language: \n"
|
|
|
|
"MIME-Version: 1.0\n"
|
|
|
|
"Content-Type: text/plain; charset=CHARSET\n"
|
|
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rust.md:4 doc/rustpkg.md:4 doc/tutorial.md:4
|
|
|
|
#: doc/tutorial-borrowed-ptr.md:4 doc/tutorial-ffi.md:4
|
2013-07-16 17:18:42 -05:00
|
|
|
#: doc/tutorial-macros.md:4 doc/tutorial-tasks.md:4
|
2013-07-07 14:15:45 -05:00
|
|
|
msgid "# Introduction"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rust.md:30 doc/rustpkg.md:8
|
|
|
|
msgid "## Disclaimer"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:2
|
|
|
|
msgid "% Rustpkg Reference Manual"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:6
|
|
|
|
msgid ""
|
|
|
|
"This document is the reference manual for the Rustpkg packaging and build "
|
|
|
|
"tool for the Rust programming language."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:12
|
|
|
|
msgid ""
|
|
|
|
"Rustpkg is a work in progress, as is this reference manual. If the actual "
|
|
|
|
"behavior of rustpkg differs from the behavior described in this reference, "
|
|
|
|
"that reflects either an incompleteness or a bug in rustpkg."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:14
|
|
|
|
msgid "# Package searching"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:17
|
|
|
|
msgid ""
|
|
|
|
"rustpkg searches for packages using the `RUST_PATH` environment variable, "
|
|
|
|
"which is a colon-separated list (semicolon-separated on Windows) of "
|
|
|
|
"directories."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:19
|
|
|
|
msgid "Each directory in this list is a *workspace* for rustpkg."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:30
|
|
|
|
msgid ""
|
|
|
|
"`RUST_PATH` implicitly contains an entry for `./.rust` (as well as `../."
|
|
|
|
"rust`, `../../.rust`, and so on for every parent of `.` up to the filesystem "
|
|
|
|
"root). That means that if `RUST_PATH` is not set, then rustpkg will still "
|
|
|
|
"search for workspaces in `./.rust` and so on. `RUST_PATH` also implicitly "
|
|
|
|
"contains an entry for the system path: `/usr/local` or the equivalent on "
|
|
|
|
"Windows. This entry comes after the implicit entries for `./.rust` and so "
|
|
|
|
"on. Finally, the last implicit entry in `RUST_PATH` is `~/.rust` or the "
|
|
|
|
"equivalent on Windows."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:32
|
|
|
|
msgid "Each workspace may contain one or more packages."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:38
|
|
|
|
msgid ""
|
|
|
|
"When building code that contains one or more directives of the form `extern "
|
|
|
|
"mod P`, rustpkg automatically searches for packages named `P` in the "
|
|
|
|
"`RUST_PATH` (as described above). It builds those dependencies if "
|
|
|
|
"necessary. Thus, when using rustpkg, there is no need for `-L` flags to "
|
|
|
|
"tell the linker where to find libraries for external crates."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:40
|
|
|
|
msgid "# Package structure"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:42
|
|
|
|
msgid "A valid workspace must contain each of the following subdirectories:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Bullet: '* '
|
|
|
|
#: doc/rustpkg.md:44
|
|
|
|
msgid ""
|
|
|
|
"'src/': contains one subdirectory per package. Each subdirectory contains "
|
|
|
|
"source files for a given package."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:49
|
|
|
|
#, no-wrap
|
|
|
|
msgid ""
|
|
|
|
" For example, if `foo` is a workspace containing the package `bar`,\n"
|
|
|
|
" then `foo/src/bar/main.rs` could be the `main` entry point for\n"
|
|
|
|
" building a `bar` executable.\n"
|
|
|
|
"* 'lib/': `rustpkg install` installs libraries into a target-specific subdirectory of this directory.\n"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:56
|
|
|
|
#, no-wrap
|
|
|
|
msgid ""
|
|
|
|
" For example, on a 64-bit machine running Mac OS X,\n"
|
|
|
|
" if `foo` is a workspace containing the package `bar`,\n"
|
|
|
|
" rustpkg will install libraries for bar to `foo/lib/x86_64-apple-darwin/`.\n"
|
|
|
|
" The libraries will have names of the form `foo/lib/x86_64-apple-darwin/libbar-[hash].dylib`,\n"
|
|
|
|
" where [hash] is a hash of the package ID.\n"
|
|
|
|
"* 'bin/': `rustpkg install` installs executable binaries into a target-specific subdirectory of this directory.\n"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:63
|
|
|
|
#, no-wrap
|
|
|
|
msgid ""
|
|
|
|
" For example, on a 64-bit machine running Mac OS X,\n"
|
|
|
|
" if `foo` is a workspace, containing the package `bar`,\n"
|
|
|
|
" rustpkg will install executables for `bar` to\n"
|
|
|
|
" `foo/bin/x86_64-apple-darwin/`.\n"
|
|
|
|
" The executables will have names of the form `foo/bin/x86_64-apple-darwin/bar`.\n"
|
|
|
|
"* 'build/': `rustpkg build` stores temporary build artifacts in a target-specific subdirectory of this directory.\n"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:67
|
|
|
|
#, no-wrap
|
|
|
|
msgid ""
|
|
|
|
" For example, on a 64-bit machine running Mac OS X,\n"
|
|
|
|
" if `foo` is a workspace containing the package `bar` and `foo/src/bar/main.rs` exists,\n"
|
|
|
|
" then `rustpkg build` will create `foo/build/x86_64-apple-darwin/bar/main.o`.\n"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:69
|
|
|
|
msgid "# Package identifiers"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:79
|
|
|
|
msgid ""
|
|
|
|
"A package identifier identifies a package uniquely. A package can be stored "
|
|
|
|
"in a workspace on the local file system, or on a remote Web server, in which "
|
|
|
|
"case the package ID resembles a URL. For example, `github.com/mozilla/rust` "
|
|
|
|
"is a package ID that would refer to the git repository browsable at `http://"
|
|
|
|
"github.com/mozilla/rust`. A package ID can also specify a version, like: "
|
|
|
|
"`github.com/mozilla/rust#0.3`. In this case, `rustpkg` will check that the "
|
|
|
|
"repository `github.com/mozilla/rust` has a tag named `0.3`, and report an "
|
|
|
|
"error otherwise."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:81
|
|
|
|
msgid "## Source files"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:83
|
|
|
|
msgid ""
|
|
|
|
"rustpkg searches for four different fixed filenames in order to determine "
|
|
|
|
"the crates to build:"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Bullet: '* '
|
|
|
|
#: doc/rustpkg.md:88
|
|
|
|
msgid "`main.rs`: Assumed to be a main entry point for building an executable."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Bullet: '* '
|
|
|
|
#: doc/rustpkg.md:88
|
|
|
|
msgid "`lib.rs`: Assumed to be a library crate."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Bullet: '* '
|
|
|
|
#: doc/rustpkg.md:88
|
|
|
|
msgid ""
|
|
|
|
"`test.rs`: Assumed to contain tests declared with the `#[test]` attribute."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Bullet: '* '
|
|
|
|
#: doc/rustpkg.md:88
|
|
|
|
msgid ""
|
|
|
|
"`bench.rs`: Assumed to contain benchmarks declared with the `#[bench]` "
|
|
|
|
"attribute."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:90
|
|
|
|
msgid "## Versions"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:97
|
|
|
|
msgid ""
|
|
|
|
"`rustpkg` packages do not need to declare their versions with an attribute "
|
|
|
|
"inside one of the source files, because `rustpkg` infers it from the version "
|
|
|
|
"control system. When building a package that is in a `git` repository, "
|
|
|
|
"`rustpkg` assumes that the most recent tag specifies the current version. "
|
|
|
|
"When building a package that is not under version control, or that has no "
|
|
|
|
"tags, `rustpkg` assumes the intended version is 0.1."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:99
|
|
|
|
msgid "# Dependencies"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:103
|
|
|
|
msgid ""
|
|
|
|
"rustpkg infers dependencies from `extern mod` directives. Thus, there "
|
|
|
|
"should be no need to pass a `-L` flag to rustpkg to tell it where to find a "
|
|
|
|
"library. (In the future, it will also be possible to write an `extern mod` "
|
|
|
|
"directive referring to a remote package.)"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:105
|
|
|
|
msgid "# Custom build scripts"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:109
|
|
|
|
msgid ""
|
|
|
|
"A file called `pkg.rs` at the root level in a workspace is called a *package "
|
|
|
|
"script*. If a package script exists, rustpkg executes it to build the "
|
|
|
|
"package rather than inferring crates as described previously."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:113
|
|
|
|
msgid ""
|
|
|
|
"Inside `pkg.rs`, it's possible to call back into rustpkg to finish up the "
|
|
|
|
"build. `rustpkg::api` contains functions to build, install, or clean "
|
|
|
|
"libraries and executables in the way rustpkg normally would without custom "
|
|
|
|
"build logic."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:115
|
|
|
|
msgid "# Command reference"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:117
|
|
|
|
msgid "## build"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:123
|
|
|
|
msgid ""
|
|
|
|
"`rustpkg build foo` searches for a package with ID `foo` and builds it in "
|
|
|
|
"any workspace(s) where it finds one. Supposing such packages are found in "
|
|
|
|
"workspaces X, Y, and Z, the command leaves behind files in `X`'s, `Y`'s, and "
|
|
|
|
"`Z`'s `build` directories, but not in their `lib` or `bin` directories."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:125
|
|
|
|
msgid "## clean"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:127
|
|
|
|
msgid "`rustpkg clean foo` deletes the contents of `foo`'s `build` directory."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:129
|
|
|
|
msgid "## install"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:133
|
|
|
|
msgid ""
|
|
|
|
"`rustpkg install foo` builds the libraries and/or executables that are "
|
|
|
|
"targets for `foo`, and then installs them either into `foo`'s `lib` and "
|
|
|
|
"`bin` directories, or into the `lib` and `bin` subdirectories of the first "
|
|
|
|
"entry in `RUST_PATH`."
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:135
|
|
|
|
msgid "## test"
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
#. type: Plain text
|
|
|
|
#: doc/rustpkg.md:137
|
|
|
|
msgid ""
|
|
|
|
"`rustpkg test foo` builds `foo`'s `test.rs` file if necessary, then runs the "
|
|
|
|
"resulting test executable."
|
|
|
|
msgstr ""
|