Rust implementation of the H3 geospatial indexing system.

Related tags

Security tools h3o
Overview

h3o

Crates.io Docs.rs CI Status Coverage License

Rust implementation of the H3 geospatial indexing system.

Design

This is not a binding of the reference implementation, but a reimplementation from scratch.

The goals are:

  • To be safer/harder to misuse by leveraging the strong typing of Rust.
  • To be 100% Rust (no C deps): painless compilation to WASM, easier LTO, …
  • To be as fast (or even faster when possible) than the reference library.

Installation

Cargo

  • Install the rust toolchain in order to have cargo installed by following this guide.
  • run cargo install h3o

Usage

use h3o::{LatLng, Resolution};

let coord = LatLng::new(37.769377, -122.388903).expect("valid coord");
let cell = coord.to_cell(Resolution::Nine);

Why this name?

Rust is an iron oxide. A Rust version of H3 is an H3 oxide, in other word $H_3O$ (a.k.a hydronium). Chemically speaking this is wrong ( $H_3O$ is produced by protonation of $H_2O$ , not oxidation of $H_3$ ), but ¯\(ツ)

License

BSD 3-Clause

You might also like...
OpenSK is an open-source implementation for security keys written in Rust that supports both FIDO U2F and FIDO2 standards.

OpenSK This repository contains a Rust implementation of a FIDO2 authenticator. We developed OpenSK as a Tock OS application. We intend to bring a ful

Userspace WireGuard® Implementation in Rust
Userspace WireGuard® Implementation in Rust

BoringTun BoringTun is an implementation of the WireGuard® protocol designed for portability and speed. BoringTun is successfully deployed on millions

Rust implementation of The Update Framework (TUF)

rust-tuf A Rust implementation of The Update Framework (TUF). Full documentation is hosted at docs.rs. Warning: Beta Software This is under active dev

A pure-Rust implementation of various threshold secret sharing schemes

Threshold Secret Sharing Efficient pure-Rust library for secret sharing, offering efficient share generation and reconstruction for both traditional S

A Rust implementation of the Message Layer Security group messaging protocol

Molasses An extremely early implementation of the Message Layer Security group messaging protocol. This repo is based on draft 4 of the MLS protocol s

Fast, Concurrent, Rust based Tidal-Media-Downloader implementation.

tdl tdl is a rust implementation of the Python Script Tidal-Media-Downloader. Overview tdl offers significant performance improvements over the origin

An implementation of webauthn components for Rustlang servers

Webauthn-rs Webauthn is a modern approach to hardware based authentication, consisting of a user with an authenticator device, a browser or client tha

A simple port sniffer(scanner) implementation with 🦀

A simple port sniffer(scanner) implementation with 🦀 Install from crates.io crago install ports-sniffer From aur: yay -S ports-sniffer Arguments Argu

A Trojan implementation from SSPanel-Uim group

TrojanX A Trojan-based proxy implementation. Attention Early Version This is an early version. Security, features, and potential bugs may be insuffici

Comments
  • Support for arbitrary planet sizes

    Support for arbitrary planet sizes

    Thank you for this library! Impressive work.

    Currently the library is hard coded to Earth. It would be nice to support arbitrary planets.

    To support this the area calculations could no longer be hard coded and would need to be converted to const functions to calculate, see https://github.com/uber/h3/issues/350.

    There is a similar request in h3 at https://github.com/uber/h3/issues/218.

    opened by LegNeato 6
  • Marking `new_unchecked` functions as unsafe

    Marking `new_unchecked` functions as unsafe

    There are new_unchecked functions in that expect some form of invariant to be upheld by the caller. I think it is a good idea to mark them as unsafe to make it explicit at the call site (see: *_unchecked in std).

    Example

    Currently the following code is not marked as unsafe and results in undefined behavior:

    let dir = h3o::direction::Direction::new_unchecked(7);
    

    Locations

    BaseCell, CellIndex, Direction, DirectedEdgeIndex, Face, LatLng, LocalIJ, Resolution, Vertex and VertexIndex

    See locations

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/base_cell.rs#L27-L30

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/index/cell.rs#L1228-L1231

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/direction.rs#L111-L115

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/index/edge.rs#L39-L42

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/face.rs#L24-L27

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/coord/latlng.rs#L367-L371

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/coord/localij.rs#L254-L258

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/resolution.rs#L333-L337

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/index/vertex.rs#L43-L46

    https://github.com/HydroniumLabs/h3o/blob/129e80b1b33e4c3847a1a5dd65dadad11e00803f/src/index/vertex.rs#L185-L190

    opened by jonasspinner 3
  • [Nonsense] About the meaning of project name

    [Nonsense] About the meaning of project name

    Feel free to close this issue, this issue just contains some nonsense thinking about the project names. :)

    Chemically (or physically) speaking, protons ( $H^{+}$ ) in acid solutions will produce oxonium with water: $$H^{+} + H_{2}O \rightarrow H_{3}O^{+}$$

    https://pubchem.ncbi.nlm.nih.gov/compound/Oxonium

    So you can announce that the project's name means oxonium proudly in the README.md.

    opened by ClSlaid 1
Owner
Hydronium Labs
Hydronium Labs
A cryptographically verifiable code review system for the cargo (Rust) package manager.

image credit cargo-crev A cryptographically verifiable code review system for the cargo (Rust) package manager. Introduction Crev is a language and ec

crev - Code REView system 1.8k Jan 5, 2023
Secure sandboxing system for untrusted code execution

Godbox Secure sandboxing system for untrusted code execution. It uses isolate which uses specific functionnalities of the Linux kernel, thus godbox no

Nathanael Demacon 19 Dec 14, 2022
A private network system that uses WireGuard under the hood.

innernet A private network system that uses WireGuard under the hood. See the announcement blog post for a longer-winded explanation. innernet is simi

Tonari, Inc 4.1k Jan 6, 2023
Cover your tracks during Linux Exploitation by leaving zero traces on system logs and filesystem timestamps. 👻🐚

moonwalk Cover your tracks during Linux Exploitation / Penetration Testing by leaving zero traces on system logs and filesystem timestamps. ?? Table o

Mufeed VH 1.1k Jan 6, 2023
Cross-platform async library for system information fetching 🦀

heim Cross-platform library for system information fetching heim is an ongoing attempt to create the best tool for system information fetching (ex., C

null 782 Jan 2, 2023
Bottlerocket - An operating system designed for hosting containers

Bottlerocket OS Welcome to Bottlerocket! Bottlerocket is a free and open-source Linux-based operating system meant for hosting containers. If you’re r

null 7k Dec 31, 2022
Crate for calling NT System Calls easily

ntcall-rs Easily call NT System Calls from rust. All System Call ID’s are dumped at compile-time. To get started just import the function you would li

joshuа 7 Sep 14, 2022
cert_installer - a utility that adds a CA certificate to Android's System Trust Store

cert_installer is a utility that adds a CA certificate to Android's System Trust Store by overwriting the /system/etc/security/cacerts directory with a tmpfs mount. Changes made to the System Trust Store is not persistant across reboots.

Terry Chia 5 Apr 11, 2022
Lightweight slowloris (HTTP DoS) implementation in Rust.

slowlorust Lightweight slowloris (HTTP DoS) implementation in Rust. Slowloris is a denial-of-service attack program which allows an attacker to overwh

Michael Van Leeuwen 6 Sep 29, 2022
A paseto implementation in rust.

Paseto Rust Paseto is everything you love about JOSE (JWT, JWE, JWS) without any of the many design deficits that plague the JOSE standards. This is d

Instructure, Inc. 145 Nov 7, 2022