Files
carbon-lang/core/io.carbon
T
Lucile Rose Nihlen 625f2ca629 precompile and cache Carbon prelude (#7432)
Refactors the link driver to automatically compile and cache the carbon
prelude for use in linking.

Implements a `carbon_library` rule for compiling the Core library
dependencies in the examples.
2026-07-16 18:02:14 +00:00

22 lines
723 B
Plaintext

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// TODO: This library is not part of the design. Either write a matching
// proposal or remove this.
package Core library "io";
// TODO: Support printing other types.
// TODO: Consider rewriting using native support once library support exists.
fn Print(x: i32) = "print.int";
fn PrintChar(x: char) -> i32 = "print.char";
fn PrintStr(msg: str);
// TODO: Return an `Optional(char)` instead of `i32`.
fn ReadChar() -> i32 = "read.char";
// TODO: Change this to a global constant once they are fully supported.
fn EOF() -> i32;