swamp-types

Crates.ioswamp-types
lib.rsswamp-types
version0.2.29
created_at2025-03-29 14:38:30.769267+00
updated_at2025-09-08 08:44:16.252335+00
descriptiontypes used in Swamp
homepage
repositoryhttps://github.com/swamp/types
max_upload_size
id1611363
size89,342
Peter Bjorklund (piot)

documentation

README

Swamp Types

Core data structures for the Swamp compiler and tooling, defining the language’s type system.

Supported Types

Primitives

  • Byte
  • Int
  • Float
  • Bool
  • String
  • Unit (empty)
  • Never

Strings & Storage

  • StringStorage(TypeRef, capacity)

Aggregates & Containers

  • Tuple(Vec<TypeRef>)
  • Range(TypeRef)
  • FixedCapacityAndLengthArray(TypeRef, len)
  • SliceView(TypeRef)

User-Defined

  • NamedStruct(NamedStructType)
  • AnonymousStruct(AnonymousStructType)
  • Enum(EnumType)

Functions & Signatures

  • Function(Signature)
  • Optional(TypeRef)

Collections & Views

  • VecStorage(TypeRef, capacity) / DynamicLengthVecView(TypeRef)
  • StackStorage(TypeRef, cap) / StackView(TypeRef)
  • QueueStorage(TypeRef, cap) / QueueView(TypeRef)
  • MapStorage(Rc<Key>, Rc<Value>, cap) / DynamicLengthMapView(Rc<Key>, Rc<Value>)
  • SparseStorage(TypeRef, cap) / SparseView(TypeRef)
  • GridStorage(TypeRef, rows, cols) / GridView(TypeRef)

License

MIT — see LICENSE for details.

Copyright Peter Bjorklund. All rights reserved. https://github.com/swamp/swamp

Commit count: 0

cargo fmt