Skip to content

ecoricemon/rust-example

Repository files navigation

rust-patterns

Rust patterns

Generic trait object

Source code

Trait object from trait with generic methods

When to use

  • Want to make a trait obejct from a trait having some generic methods.
  • Generic methods require 'static lifetime such as foo<T: 'static>().

Heterogeneous functions in a list

Source code

When to use

  • When you want to manager functions that have different signatures from each other.
  • You need to call them in your code.

ECS: System and Query

Source code

When to use

  • When you want to see how to implement ECS in terms of system and query.

WASM web worker with Webpack

Source code

When to use

  • When you want to use web worker and bundle your JS and wasm with Webpack.

About

Rust or Wasm examples

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published