Skip to main content

kohebi_core/
lib.rs

1//! Values, shapes, collections, allocator, and garbage collector for the kohebi Python runtime
2//!
3//! Status: what is here is the shape of a Python value and the arithmetic and
4//! printing that go with it, which is what M1 needs to run a program. The
5//! representation is not the one in `docs/spec/03-object-model.md`: that is a
6//! tagged 64-bit word over shaped heap objects, and it is what the memory
7//! target depends on. M1 is correctness, so [`Object`] is an enum for now and
8//! the swap is a job for the crate rather than for its callers. The allocator
9//! and collector in `docs/spec/04-memory-and-gc.md` do not exist yet.
10
11#![doc(html_root_url = "https://docs.rs/kohebi-core/0.0.0")]
12
13pub mod casing;
14pub mod classify;
15pub mod dict;
16pub mod error;
17pub mod exception;
18pub mod float;
19pub mod hash;
20pub mod int;
21pub mod native;
22pub mod object;
23pub mod ops;
24pub mod printable;
25pub(crate) mod ranges;
26pub mod slice;
27pub mod text;
28
29pub use dict::{Dict, Set};
30pub use error::{Error, Kind, Result};
31pub use exception::Exception;
32pub use float::{DotZero, float_repr};
33pub use hash::{Key, Unhashable};
34pub use int::{DivideByZero, Int};
35pub use native::Native;
36pub use object::Object;
37pub use ops::Compare;
38pub use printable::is_printable;
39pub use slice::{Indices, Slice};
40pub use text::{Str, StrBuf, bytes_repr, str_repr};
41
42/// The design documents that govern this crate.
43pub const SPEC: &[&str] = &[
44    "docs/spec/03-object-model.md",
45    "docs/spec/04-memory-and-gc.md",
46];