# thinbox
`thinbox` provides an alternative implementation of the standard Rust [`Box`] container which has a
pointer-sized representation in all cases.
This property is mainly useful in niche foreign-function-interface use-cases. You should probably
not use `thinbox` unless you wish to use unsized types as opaque data crossing an FFI boundary.
In particular, the author has found this crate useful in passing around Rust closure types as
*userdata* pointers in several C-language FFI projects.
# Documentation
Inline rustdoc documentation is available. A mirror of this documentation is available at
<https://docs.rs/thinbox>.
# Contributing
`thinbox` is developed at [GitLab].
Reasonable performance, correctness, documentation, and ease-of-use contributions are always
welcome. [Bug reports][Issues] are accepted through GitLab, but feature requests are not.
## Pull Requests
Please ensure pull requests match the existing coding style and are formatted with rustfmt.
Spelling and grammatical errors are considered bugs, so please use spell-checking facilities prior
to submitting a contribution.
## Testing
`thinbox` has been tested with [Miri], which has revealed no violations of [Stacked Borrows].
## Contribution Agreement
By contributing, you grant all contributors a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly
display, publicly perform, relicense, sublicense, and distribute your contributions.
Additionally, you affirm that you are legally entitled to grant such license and that your
contributions are not and will not become patent-encumbered. In the event that you discover that
such affirmation was made in error, you agree to post notice of such error in a conspicuous place
(such as a [GitLab Issue][Issues]) within three days.
# License
`thinbox` is licensed under the terms of the [Mozilla Public License, v. 2.0][MPL]. All Source Code
Forms are "Incompatible With Secondary Licenses", as described in *ยง3.3* of the license.
The corresponding SPDX license identifier is [`MPL-2.0-no-copyleft-exception`][SPDX].
# Copyright
This document is Copyright (C) 2020 Nathan Sharp.
Permission is granted to reproduce this document, in any form, free of charge. The source code form
of this document is subject to the terms of the Mozilla Public License, v. 2.0.
[`Box`]: https://doc.rust-lang.org/stable/std/boxed/struct.Box.html
[GitLab]: https://gitlab.com/nwsharp/thinbox
[Issues]: https://gitlab.com/nwsharp/thinbox/-/issues
[MPL]: https://mozilla.org/MPL/2.0
[Miri]: https://github.com/rust-lang/miri
[Stacked Borrows]: https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md
[SPDX]: https://spdx.org/licenses/MPL-2.0-no-copyleft-exception.html