hex logo Hex
Packages Pricing Docs
Log In
Packages Pricing Docs Log In
Packages

torque

0.1.2
0.2.4 0.2.3 0.2.2 0.2.1 0.2.0 0.1.10 0.1.9 0.1.8 0.1.7 0.1.6 0.1.5 0.1.4 0.1.3 0.1.2 0.1.1 0.1.0

High-performance JSON library for Elixir via Rustler NIFs (sonic-rs)

HexDocs

Current section

Files

Jump to
Readme
16 Versions
3 Dependencies
0 Dependants
Files
Activity
Readme 16 Versions 3 Dependencies 0 Dependants Files Activity
torque native torque_nif src nif_util.rs
Raw

18 files

  • lib
    • torque
      • native.ex
    • torque.ex
  • native
    • torque_nif
      • .cargo
        • config.toml
      • src
        • atoms.rs
        • decoder.rs
        • encoder.rs
        • lib.rs
        • nif_util.rs
        • types.rs
      • Cargo.toml
  • .formatter.exs
  • Cargo.lock
  • Cargo.toml
  • Cross.toml
  • LICENSE
  • README.md
  • checksum-Elixir.Torque.Native.exs
  • mix.exs

native/torque_nif/src/nif_util.rs

use rustler::sys::{enif_make_tuple_from_array, ERL_NIF_TERM};
use rustler::{Env, Term};
/// Build a 2-tuple from two raw NIF terms.
#[inline]
pub fn make_tuple2<'a>(env: Env<'a>, a: ERL_NIF_TERM, b: ERL_NIF_TERM) -> Term<'a> {
let arr: [ERL_NIF_TERM; 2] = [a, b];
unsafe {
Term::new(
env,
enif_make_tuple_from_array(env.as_c_arg(), arr.as_ptr(), 2),
)
}
}

Package files

  • .formatter.exs
  • Cargo.lock
  • Cargo.toml
  • Cross.toml
  • LICENSE
  • README.md
  • checksum-Elixir.Torque.Native.exs
  • lib/torque.ex
  • lib/torque/native.ex
  • mix.exs
  • native/torque_nif/.cargo/config.toml
  • native/torque_nif/Cargo.toml
  • native/torque_nif/src/atoms.rs
  • native/torque_nif/src/decoder.rs
  • native/torque_nif/src/encoder.rs
  • native/torque_nif/src/lib.rs
  • native/torque_nif/src/nif_util.rs
  • native/torque_nif/src/types.rs
hex logo Hex
About Blog Sponsors Status Advisories
Documentation FAQ Specifications Report Client Issue Report General Issue Report Security Issue Contact Support
Code of Conduct Terms of Service Privacy Policy Copyright Policy Dispute Policy

Copyright 2015. Six Colors AB.

Powered by the Erlang VM and the Elixir Programming Language

Search filters

Type any of these into the search box. They can be combined with free text which searches package names and descriptions.

Operator Description Example
name: Match package name. Supports * wildcards and repo/package form name:phx* or name:hexpm/phoenix
description: Full-text search of package descriptions description:auth
depends: Packages depending on a given package. Supports repo:package form depends:ecto or depends:hexpm:ecto
build_tool: Filter by build tool build_tool:mix
updated_after: Packages updated after an ISO8601 datetime updated_after:2025-01-01T00:00:00Z
extra: Match custom metadata (key,value). Nested keys are separated by commas extra:license,MIT

Wrap values in double quotes to include spaces, e.g. name:"my package".