docs

您正在閱讀 v0.1.2 的文件。Nabi 0.1.2 已停止支援。 最新版本:v0.1.3 →

本頁尚未翻譯,以下為英文原文。

#0. Standard library meta

本頁內容

This chapter collects in one place the policies and tables that apply across the standard library specification.

#Contents

#Role of this chapter

This chapter does not directly define individual traits or types. Instead, it gathers the rules and policies that the library as a whole must follow consistently.

The 3-tier model prescribes the direction of dependencies: std may use core and bare, and core may use bare, but dependencies in the opposite direction are not allowed. The import policy specifies the prelude, core::prelude, that every user file imports implicitly, and lists its names. The intrinsic entry that follows covers how standard library methods are connected to the compiler backend (PrimOp, etc.), and finally the lang slot entry shows how the 100 slots the compiler looks up through the #[lang(...)] attribute map to standard library items.

Only once these policies are defined can the trait definitions of 200-core/ follow.

Found a mistake? Edit this page on GitHub. Last updated