Any plans for built-in support of Vec2/Vec3/Vec4 in Rust?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • cgmath-rs

    A linear algebra and mathematics library for computer graphics.

  • But I am writing a Vulkan-based game engine and I use https://crates.io/crates/cgmath extensively. It has vector classes, all the math functions I need, and it even supports a version of swizzling if you activate the feature. Maybe this crate can do what you need?

  • regex

    An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

  • In fact, there are a lot of crates in Rust where in other programming languages, it would be included in the standard library. Examples are regex, random number generators, additional iterator methods, macros for other collections, num traits, loggers, HTTP libraries, error handling, async runtimes, serialization and deserialization, date and time, and many more.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • tokio

    A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

  • In fact, there are a lot of crates in Rust where in other programming languages, it would be included in the standard library. Examples are regex, random number generators, additional iterator methods, macros for other collections, num traits, loggers, HTTP libraries, error handling, async runtimes, serialization and deserialization, date and time, and many more.

  • serde

    Serialization framework for Rust

  • In fact, there are a lot of crates in Rust where in other programming languages, it would be included in the standard library. Examples are regex, random number generators, additional iterator methods, macros for other collections, num traits, loggers, HTTP libraries, error handling, async runtimes, serialization and deserialization, date and time, and many more.

  • rand

    A Rust library for random number generation.

  • In fact, there are a lot of crates in Rust where in other programming languages, it would be included in the standard library. Examples are regex, random number generators, additional iterator methods, macros for other collections, num traits, loggers, HTTP libraries, error handling, async runtimes, serialization and deserialization, date and time, and many more.

  • async-std

    Async version of the Rust standard library

  • In fact, there are a lot of crates in Rust where in other programming languages, it would be included in the standard library. Examples are regex, random number generators, additional iterator methods, macros for other collections, num traits, loggers, HTTP libraries, error handling, async runtimes, serialization and deserialization, date and time, and many more.

  • Pandas

    Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more

  • Is this really true? Python do not have first class support for Vec2 etc., but because of Python libraries such as numpy and pandas, a lot of data scientists and engineers use Python for these exact libraries.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • NumPy

    The fundamental package for scientific computing with Python.

  • Is this really true? Python do not have first class support for Vec2 etc., but because of Python libraries such as numpy and pandas, a lot of data scientists and engineers use Python for these exact libraries.

  • rust

    Empowering everyone to build reliable and efficient software.

  • If that were the case then I would see less linear algebra and more of type theory and category theory in stdlib, like monads, etc. In fact, they are adding a bunch of type theory stuff right now!

  • portable-simd

    The testing ground for the future of portable SIMD in Rust

  • See: https://github.com/rust-lang/portable-simd

  • rust-gpu

    🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧

  • Isn't std::simd (nightly) what you're looking for? (Swizzling primitives, vectorized arithmetic, etc) Regardless, GPU and SIMD don't use the same abstractions because it's not a clean fit. There would need to be a rather clever innovation to make optimal code for both from a single abstraction. But rust-gpu is another project that might interest you.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts