38 releases

Uses new Rust 2024

new 0.2.29 Sep 8, 2025
0.2.28 Sep 8, 2025
0.2.26 Aug 18, 2025
0.2.19 Jul 30, 2025
0.0.14 Apr 1, 2025

#484 in Caching

Download history 1/week @ 2025-05-31 7/week @ 2025-06-14 13/week @ 2025-06-21 351/week @ 2025-06-28 957/week @ 2025-07-05 787/week @ 2025-07-12 750/week @ 2025-07-19 547/week @ 2025-07-26 527/week @ 2025-08-02 128/week @ 2025-08-09 419/week @ 2025-08-16 73/week @ 2025-08-23 143/week @ 2025-08-30 350/week @ 2025-09-06

995 downloads per month
Used in 21 crates (14 directly)

MIT license

70KB
1.5K SLoC

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

Dependencies

~28KB