Skip to content

Commit

Permalink
Add Opcode struct (#2)
Browse files Browse the repository at this point in the history
The Opcode must represent a full instruction for the VM and comply with
the specification:
https://github.com/FuelLabs/fuel-specs/blob/master/specs/vm/opcodes.md

[`std::io`] is used for serialization/deserialization targetting
compatibility.

Resolves #1
  • Loading branch information
vlopes11 authored and xgreenx committed Dec 20, 2022
1 parent c2b0ba5 commit 1755b26
Show file tree
Hide file tree
Showing 7 changed files with 1,713 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fuel-asm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "fuel-asm"
description = "Defines all opcodes available in the FuelVM."
version = "0.1.0"
authors = ["Victor Lopez <victor.lopez@fuel.sh>"]
edition = "2018"
repository = "https://github.com/FuelLabs/fuel-asm"
license = "Apache-2.0"
keywords = ["blockchain", "cryptocurrencies", "fuel-vm", "vm"]
categories = ["cryptography::cryptocurrencies", "data-structures", "parsing"]

[dependencies]
2 changes: 2 additions & 0 deletions fuel-asm/rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
max_width = 120
wrap_comments = true
10 changes: 10 additions & 0 deletions fuel-asm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![feature(arbitrary_enum_discriminant)]
#![feature(external_doc)]
#![warn(missing_docs)]
#![doc(include = "../README.md")]

mod opcode;
mod types;

pub use opcode::Opcode;
pub use types::{Immediate06, Immediate12, Immediate18, Immediate24, RegisterId, Word};
Loading

0 comments on commit 1755b26

Please sign in to comment.