xasm-rs

Crates.ioxasm-rs
lib.rsxasm-rs
version0.1.138
created_at2025-02-23 06:29:23.527434+00
updated_at2025-02-25 04:00:03.778635+00
descriptionA rust crate for generating linux 32/64 bit assembly easily
homepage
repositoryhttps://github.com/skubed0007/xasm-rs
max_upload_size
id1566092
size56,187
Skub (skubed0007)

documentation

https://docs.rs/xasm-rs

README

Xasm : assembly code generator for rust

NOTE: Xasm only support linux 64/32 bit though we do have plans for windows and mac in future


Installation

add the crate to your Cargo.toml file by running the following command:

cargo add xasm-rs

Using Xasm

first create a mutable xasm class in folllowing way:

let mut xasm = init::Xasm::new();

and now start adding tokens,vars,functions to xasm here is a sample stuff you can do

//add a string type variable called "mystring"
xasm.vars.push(Vars::String("mystring".to_string(),"Hello world!".to_string())); 
// print the varible to STDOUT using print token
xasm.tokens.push(init::Tokens::print(init::FileDescriptor::STDOUT, "%mystring \\n".chars().collect()));

Check out the full documentation for xasm to know more on how to use it!

License

Xasm is licensed under the Joay-License which in short says that:

The Joay License allows non-commercial use, modification, and distribution of the software with proper attribution. Commercial use and converting the software to closed-source are prohibited

Commit count: 4

cargo fmt