Skip to content

Commit

Permalink
chore(types) Add correct attributions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Mar 18, 2021
1 parent 896f865 commit 805a637
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lib/wasmer-types/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# `wasmer-types` [![Build Status](https://github.com/wasmerio/wasmer/workflows/build/badge.svg?style=flat-square)](https://github.com/wasmerio/wasmer/actions?query=workflow%3Abuild) [![Join Wasmer Slack](https://img.shields.io/static/v1?label=Slack&message=join%20chat&color=brighgreen&style=flat-square)](https://slack.wasmer.io) [![MIT License](https://img.shields.io/github/license/wasmerio/wasmer.svg?style=flat-square)](https://github.com/wasmerio/wasmer/blob/master/LICENSE)

This crate provides the basic structures to use WebAssembly easily anywhere.

### Acknowledgments

This project borrowed some of the code for the entity structure from [cranelift-entity](https://crates.io/crates/cranelift-entity).
We decided to move it here to help on serialization/deserialization and also to ease the integration with other tools like `loupe`.

Please check [Wasmer ATTRIBUTIONS](https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md) to further see licenses and other attributions of the project.
3 changes: 3 additions & 0 deletions lib/wasmer-types/src/entity/boxed_slice.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This file contains code from external sources.
// Attributions: https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md

//! Boxed slices for `PrimaryMap`.
use crate::entity::iter::{Iter, IterMut};
Expand Down
3 changes: 3 additions & 0 deletions lib/wasmer-types/src/entity/iter.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This file contains code from external sources.
// Attributions: https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md

//! A double-ended iterator over entity references and entities.
use crate::entity::EntityRef;
Expand Down
3 changes: 3 additions & 0 deletions lib/wasmer-types/src/entity/keys.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This file contains code from external sources.
// Attributions: https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md

//! A double-ended iterator over entity references.
//!
//! When `core::iter::Step` is stabilized, `Keys` could be implemented as a wrapper around
Expand Down
3 changes: 3 additions & 0 deletions lib/wasmer-types/src/entity/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This file contains code from external sources.
// Attributions: https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md

/// A type wrapping a small integer index should implement `EntityRef` so it can be used as the key
/// of an `SecondaryMap` or `SparseMap`.
pub trait EntityRef: Copy + Eq {
Expand Down
7 changes: 5 additions & 2 deletions lib/wasmer-types/src/entity/packed_option.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// This file contains code from external sources.
// Attributions: https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md

//! Compact representation of `Option<T>` for types with a reserved value.
//!
//! Small Cranelift types like the 32-bit entity references are often used in tables and linked
//! lists where an `Option<T>` is needed. Unfortunately, that would double the size of the tables
//! Small types are often used in tables and linked lists where an
//! `Option<T>` is needed. Unfortunately, that would double the size of the tables
//! because `Option<T>` is twice as big as `T`.
//!
//! This module provides a `PackedOption<T>` for types that have a reserved value that can be used
Expand Down
3 changes: 3 additions & 0 deletions lib/wasmer-types/src/entity/primary_map.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This file contains code from external sources.
// Attributions: https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md

//! Densely numbered entity references as mapping keys.
use crate::entity::boxed_slice::BoxedSlice;
use crate::entity::iter::{IntoIter, Iter, IterMut};
Expand Down
3 changes: 3 additions & 0 deletions lib/wasmer-types/src/entity/secondary_map.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This file contains code from external sources.
// Attributions: https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md

//! Densely numbered entity references as mapping keys.
use crate::entity::iter::{Iter, IterMut};
Expand Down

0 comments on commit 805a637

Please sign in to comment.