An `abilists` parser crate for Rust

Overview

abilists

This repo is a Rust crate that parses abilists generated by the Zig project's glibc-abi-tool repository.

This repo is a 🚧 WIP 🚧 nerdsnipe from this tweet by Andrew Kelley.

Getting started

  1. Generate the abilists file in deps/glibc-abi-tool.
    1. Install the latest Zig toolchain.
    2. Change your working directory to deps/glibc-abi-tool.
    3. Run zig run consolidate.zig.
  2. 🎉 Congrats, you're ready to start hacking on this project!
You might also like...
A Rust proc-macro crate which derives functions to compile and parse back enums and structs to and from a bytecode representation

Bytecode A simple way to derive bytecode for you Enums and Structs. What is this This is a crate that provides a proc macro which will derive bytecode

This crate converts Rust compatible regex-syntax to Vim's NFA engine compatible regex.

This crate converts Rust compatible regex-syntax to Vim's NFA engine compatible regex.

Chains - a bot written in Rust using the serenity crate

Chains (Rusty) Chains is a bot written in Rust using the serenity crate. Chains primarily focuses on easy to set up, easy to use moderation tools such

A Rust crate to expressively declare bitfield-like structs

proc-bitfield A Rust crate to expressively declare bitfield-like structs, automatically ensuring their correctness at compile time and declaring acces

This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you specified.

prae This crate provides a convenient macro that allows you to generate type wrappers that promise to always uphold arbitrary invariants that you spec

This crate defines a single macro that is a brainfunct compile-time interpreter.

Compile Protection This crate defines a single macro that is a brainfunct compile-time interpreter. One example is as follows #![recursion_limit = "18

secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process.

secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process. More specifically, the crate disables core dumps and tries to disable tracing on unix-like OSes.

Example of structuring a proc macro crate for testability

testing-proc-macros Example of structuring a proc macro crate for testability. See accompanying blog post for details. License Licensed under either o

🥳Yet another crate to create native nodejs addons :)

nodex Yet another crate to create native nodejs addons :) This crate aims to make creating native nodejs addons very easy and comfortable. It is in a

Comments
  • full picture of cross-compiling

    full picture of cross-compiling

    I love the idea of Rust cross-compiling to arbitrary glibc versions as easily as Zig does. Seems like parsing Zig's abilists is one part of that goal. Are you working on the complete picture? Is anyone?

    My understanding (which could be way off) is that in general terms, Zig uses these abilists to represent the ABI (exported symbols, some with versioning/weak definition or something) of all versions of glibc. You can select one and the linker essentially assumes the existence of a matching .so somehow.

    So how can this work for Rust out of the box? My thoughts below but perhaps yours are more fleshed out...

    Short-term: maybe a linker script that can be dropped in via target.<triple>.linker (see docs) and actually constructs a dummy .so file (a .so with the correct definitions and non-functioning implementations) and somehow sets up linker arguments to assume it's installed in the system search path (i.e., not adding an rpath entry to a tempdir or some such).

    Long-term: it'd be nice if you could just add glibc-version to a [target.<arch>-unknown-linux-gnu] section of your .cargo/config.toml and cargo plumbed along the option to rustc, which took care of the rest for you. Maybe it does what that linker script does, or maybe the linker does/should provide some more abstract interface than an existing .so file.

    opened by scottlamb 1
  • Move to type-state API

    Move to type-state API

    Dump: I think this crate would be most performant if we could move from a "parse all the things" to "every step of parsing is a separate type, and you must manually choose state transitions".

    enhancement 
    opened by ErichDonGubler 0
Releases(v0.1.0)
Owner
Erich Gubler
Dedicated to software that humans love. Experienced Rustacean and proud of it.
Erich Gubler
lightweight and customizable rust s-expression (s-expr) parser and printer

s-expr Rust library for S-expression like parsing and printing parser keeps track of spans, and representation (e.g. number base) number and decimal d

Vincent Hanquez 5 Oct 26, 2022
A cross platform forensic parser written in Rust!

artemis artemis is a powerful command line digital forensic and incident response (DFIR) tool that collects forensic data from Windows and macOS endpo

null 12 Jun 4, 2023
A zero-copy parser for the contents of the __unwind_info section of a mach-O binary.

A parser for Apple's Compact Unwinding Format, which is used in the __unwind_info section of mach-O binaries.

Markus Stange 10 May 31, 2022
Rust crate for parsing stivale and stivale 2 structures.

stivale-rs Rust crate for parsing stivale and stivale 2 structures. Resources Stivale v2 Specification Stivale Specification License Licensed under ei

Anhad Singh 12 Dec 20, 2022
A simple entity-component-system crate for rust with serialization support

Gallium A simple entity-component-system crate for rust with serialization support Usage You can include the library using carge: [dependencies] galli

null 7 Aug 31, 2021
Rust crate to generate, manipulate and traverse trees.

SOCAREL Rust crate to generate, manipulate and traverse trees. It provides iterators for eight different traversal algorithms. Add and remove nodes in

Andreu 8 Nov 14, 2021
Jonathan Kelley 33 Dec 6, 2022
A translation of Brendan Galea's Vulkan tutorial into Rust using the ash crate

Rust Light Vulkan Engine This is a translation of Brendan Galea's Vulkan tutorial into rust using the Ash crate. Original tutorial: Brendan Galea's Yo

Mot 6 Dec 25, 2022
Community SVD file, peripheral access crate in embedde Rust for WinnerMicro W800, W801 & W806 chip

Community SVD file, peripheral access crate in embedde Rust for WinnerMicro W800, W801 & W806 chip

Luo Jia 37 Jul 31, 2022
A high-level Rust crate around the Discord API, aimed to be easy and straight-forward to use.

rs-cord A high-level Rust crate around the Discord API, aimed to be easy and straight-forward to use. Documentation • Crates.io • Discord Navigation M

Jay3332 4 Sep 24, 2022