asmpeach

Crates.ioasmpeach
lib.rsasmpeach
version0.1.47
sourcesrc
created_at2020-10-10 04:28:08.18399
updated_at2020-10-15 03:51:27.221563
descriptionx86_64 assembler
homepagehttps://github.com/Drumato/asmpeach
repositoryhttps://github.com/Drumato/asmpeach
max_upload_size
id297897
size131,392
Drumato (Drumato)

documentation

https://docs.rs/asmpeach

README

asmpeach at crates.io asmpeach at docs.rs

asmpeach

x86_64 assembler

Get Started

How to use as an assembler command

cargo build
./target/debug/asmpeach <assembly-file in AT&T syntax>

How to use as a Rust crate

See documentation

use asmpeach;

fn main() -> Result<(), Box<dyn std::error::Error>>{
    // you can pass a file(or string).
    let elf_builder = asmpeach::assemble_file("asm.s", asmpeach::Syntax::ATANDT)?;
    
    elf_builder.generate_elf_file("obj.o", 0o644)?;

    Ok(())
}

Test

cargo test
cargo test --features sample

Dependencies

Commit count: 66

cargo fmt