Skip to content

Commit

Permalink
Release v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed May 28, 2021
1 parent 389d1e0 commit 79cfefc
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 99 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
std:
features:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature: [ std, all, secp256k1, curve25519 ]
steps:
- uses: actions/checkout@v2
- name: Install rust stable
Expand All @@ -36,7 +40,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
args: --features std
args: --features ${{ matrix.feature }}
platforms:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -76,22 +80,6 @@ jobs:
with:
command: check
args: --workspace --all-targets --all-features
ancient:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rust 1.36.0
uses: actions-rs/toolchain@v1
with:
toolchain: 1.36.0
override: true
- name: Clean Cargo.lock
run: rm -f Cargo.lock
- name: 1.36.0
uses: actions-rs/cargo@v1
with:
command: build
args: --all --all-targets --no-default-features --features std
dependency:
runs-on: ubuntu-latest
steps:
Expand Down
120 changes: 60 additions & 60 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
license = "MIT"
repository = "https://github.com/internet2-org/alure"
homepage = "https://lnp-bp.org"
keywords = ["virtual-machine", "eemulator", "functional-programming", "risc"]
keywords = ["virtual-machine", "emulator", "declarative", "risc"]
categories = ["no-std", "embedded", "compilers", "cryptography", "emulators"]
readme = "README.md"
exclude = [".github", "test"]
Expand All @@ -24,7 +24,7 @@ secp256k1 = { version = "0.20.2", optional = true }
curve25519-dalek = { version = "3.1", optional = true }

[features]
default = ["secp256k1", "curve25519"]
default = []
all = ["std", "secp256k1", "curve25519"]
std = ["amplify_num/std", "amplify_num/hex"]
curve25519 = ["curve25519-dalek"]
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Alure: AluVM runtime environment

Rust implementation of AluVM (arithmetic logic unit virtual machine) and compiler from Alu assembly into bytecode
Rust implementation of AluVM (arithmetic logic unit virtual machine) and
compiler from Alu assembly into bytecode. See [AluVM] specification on
more details on AluVM.

[AluVM]: https://github.com/internet2-org/aluvm-spec
5 changes: 1 addition & 4 deletions examples/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
// You should have received a copy of the MIT License along with this software.
// If not, see <https://opensource.org/licenses/MIT>.

#![feature(trace_macros)]
#![feature(log_syntax)]
extern crate alloc;

#[macro_use]
extern crate alure;
Expand All @@ -28,8 +27,6 @@ use amplify_num::hex::ToHex;
use amplify_num::u4;
use core::convert::TryFrom;

trace_macros!(true);

fn main() {
let code = aluasm! {
zero a8[1] ;
Expand Down
7 changes: 2 additions & 5 deletions src/instr/bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// You should have received a copy of the MIT License along with this software.
// If not, see <https://opensource.org/licenses/MIT>.

use alloc::boxed::Box;
use alloc::vec::Vec;
use bitcoin_hashes::Hash;
use core::ops::RangeInclusive;
Expand Down Expand Up @@ -204,9 +203,7 @@ where
instr if ControlFlowOp::instr_range().contains(&instr) => {
Instr::ControlFlow(ControlFlowOp::read(reader)?)
}
instr if PutOp::instr_range().contains(&instr) => {
Instr::Put(Box::new(PutOp::read(reader)?))
}
instr if PutOp::instr_range().contains(&instr) => Instr::Put(PutOp::read(reader)?),
instr if MoveOp::instr_range().contains(&instr) => Instr::Move(MoveOp::read(reader)?),
instr if CmpOp::instr_range().contains(&instr) => Instr::Cmp(CmpOp::read(reader)?),
instr if ArithmeticOp::instr_range().contains(&instr) => {
Expand All @@ -216,7 +213,7 @@ where
Instr::Bitwise(BitwiseOp::read(reader)?)
}
instr if BytesOp::instr_range().contains(&instr) => {
Instr::Bytes(Box::new(BytesOp::read(reader)?))
Instr::Bytes(BytesOp::read(reader)?)
}
instr if DigestOp::instr_range().contains(&instr) => {
Instr::Digest(DigestOp::read(reader)?)
Expand Down
Loading

0 comments on commit 79cfefc

Please sign in to comment.