https://github.com/multiformats/rust-multiaddr
multiaddr implementation in rust
https://github.com/multiformats/rust-multiaddr
Last synced: about 1 year ago
JSON representation
multiaddr implementation in rust
- Host: GitHub
- URL: https://github.com/multiformats/rust-multiaddr
- Owner: multiformats
- License: other
- Created: 2015-12-12T12:08:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-04-28T16:04:13.000Z (about 1 year ago)
- Last Synced: 2025-04-28T17:23:09.250Z (about 1 year ago)
- Language: Rust
- Homepage: https://crates.io/crates/multiaddr
- Size: 5.23 MB
- Stars: 93
- Watchers: 11
- Forks: 51
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-multiaddr
[](http://ipn.io)
[](https://github.com/multiformats/multiformats)
[](https://webchat.freenode.net/?channels=%23ipfs)
[](https://travis-ci.org/multiformats/rust-multiaddr)
[](https://codecov.io/github/multiformats/rust-multiaddr?branch=master)
[](https://docs.rs/crate/multiaddr)
[](https://crates.io/crates/multiaddr)
[](https://github.com/RichardLitt/standard-readme)
> [multiaddr](https://github.com/multiformats/multiaddr) implementation in Rust.
## Table of Contents
- [Install](#install)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [Contribute](#contribute)
- [License](#license)
## Install
First add this to your `Cargo.toml`
```toml
[dependencies]
multiaddr = "*"
```
then run `cargo build`.
## Usage
```rust
extern crate multiaddr;
use multiaddr::{Multiaddr, multiaddr};
let address = "/ip4/127.0.0.1/tcp/1234".parse::().unwrap();
// or with a macro
let other = multiaddr!(Ip4([127, 0, 0, 1]), Udp(10500u16), QuicV1);
assert_eq!(address.to_string(), "/ip4/127.0.0.1/tcp/1234");
assert_eq!(other.to_string(), "/ip4/127.0.0.1/udp/10500/quic-v1");
```
## Maintainers
Captain: [@dignifiedquire](https://github.com/dignifiedquire).
## Contribute
Contributions welcome. Please check out [the issues](https://github.com/multiformats/rust-multiaddr/issues).
Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
## License
[MIT](LICENSE) © 2015-2017 Friedel Ziegelmeyer