Skip to main content

Module types

Module types 

Source
Expand description

Portable-core types.

Numeric types keep their source semantics apart: nat and int are unbounded, fixed is a Rust machine integer whose arithmetic aborts on overflow, and float is a JavaScript Number, an IEEE-754 binary64. Data types are named by their qualified path.

Mirrors js/src/translation/types.js; the serialised form is the same JSON object ({ "kind": "fixed", "bits": 32, "signed": true }).

Enums§

Type
A portable-core type, or a surface type reference before resolution.

Constants§

BOOL
FLOAT
INT
NAT
STRING
UNIT

Functions§

array
data
fixed
fixed_bounds
Inclusive bounds of a machine-integer type.
rust_fixed_type
u8 … i128, usize, isize (the pointer-sized types are 64 bits).