libm/README.md

52 lines
1.4 KiB
Markdown
Raw Normal View History

2018-07-12 00:44:28 -05:00
# `libm`
A port of [MUSL]'s libm to Rust.
2021-07-09 09:52:08 +05:30
[MUSL]: https://musl.libc.org/
2018-07-12 00:44:28 -05:00
2018-07-12 18:43:59 -05:00
## Goals
2018-07-13 19:38:51 -05:00
The short term goal of this library is to [enable math support (e.g. `sin`, `atan2`) for the
2019-09-25 11:20:49 -07:00
`wasm32-unknown-unknown` target][wasm] (cf. [rust-lang/compiler-builtins][pr]). The longer
2018-07-13 19:38:51 -05:00
term goal is to enable [math support in the `core` crate][core].
2019-09-25 11:20:49 -07:00
[wasm]: https://github.com/rust-lang/libm/milestone/1
[pr]: https://github.com/rust-lang/compiler-builtins/pull/248
[core]: https://github.com/rust-lang/libm/milestone/2
2018-07-12 18:43:59 -05:00
## Already usable
2019-07-03 23:53:35 +02:00
This crate is [on crates.io] and can be used today in stable `#![no_std]` programs.
The API documentation can be found [here](https://docs.rs/libm).
2019-08-10 15:30:43 +03:00
[on crates.io]: https://crates.io/crates/libm
## Benchmark
[benchmark]: #benchmark
The benchmarks are located in `crates/libm-bench` and require a nightly Rust toolchain.
2019-07-02 08:22:03 +02:00
To run all benchmarks:
> cargo +nightly bench --all
2018-07-12 00:44:28 -05:00
## Contributing
Please check [CONTRIBUTING.md](CONTRIBUTING.md)
2018-07-12 00:44:28 -05:00
## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the
work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.