diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..0cdad5e690 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,66 @@ +# Runs build related jobs. + +name: build + +on: + push: + branches: [main, next] + pull_request: + types: [opened, reopened, synchronize] + +jobs: + metal: + name: Build for metal + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + toolchain: [stable, nightly] + steps: + - uses: actions/checkout@main + - name: Build for metal + run: | + rustup update --no-self-update ${{ matrix.toolchain }} + make exec-metal + + sve: + name: Build for sve + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + toolchain: [stable, nightly] + steps: + - uses: actions/checkout@main + - name: Build for sve + run: | + rustup update --no-self-update ${{ matrix.toolchain }} + make exec-sve + avx2: + name: Build for avx2 + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + toolchain: [stable, nightly] + steps: + - uses: actions/checkout@main + - name: Build for avx2 + run: | + rustup update --no-self-update ${{ matrix.toolchain }} + make exec-avx2 + + no-std: + name: Build for no-std + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + toolchain: [stable, nightly] + steps: + - uses: actions/checkout@main + - name: Build for no-std + run: | + rustup update --no-self-update ${{ matrix.toolchain }} + rustup target add wasm32-unknown-unknown + make build-no-std diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c31f5f54c3..f8dd0c4a42 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: toolchain: [stable, nightly] - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] timeout-minutes: 30 steps: - uses: actions/checkout@main diff --git a/Makefile b/Makefile index fa9a265a51..ede6fea4b2 100644 --- a/Makefile +++ b/Makefile @@ -49,38 +49,48 @@ test: ## Runs all tests doc: ## Generates & checks documentation $(WARNINGS) cargo doc --all-features --keep-going --release +.PHONY: mdbook +mdbook: ## Generates mdbook + mdbook exec docs/ + # --- building ------------------------------------------------------------------------------------ .PHONY: build -build: ## Builds VM with optimized profile and features +build: ## Builds with default parameters + cargo build --release --features concurrent + +.PHONY: build-no-std +build-no-std: ## Builds without the standard library + cargo build --no-default-features --target wasm32-unknown-unknown --workspace + +# --- executing ------------------------------------------------------------------------------------ + +.PHONY: exec +exec: ## Builds with optimized profile and features cargo build --profile optimized $(FEATURES_CONCURRENT_EXEC) -.PHONY: build-single -build-single: ## Builds VM in single-threaded mode +.PHONY: exec-single +exec-single: ## Builds in single-threaded mode cargo build --profile optimized --features executable -.PHONY: build-release -build-release: ## Builds VM with release mode and no optimizations - cargo build --release $(FEATURES_CONCURRENT_EXEC) - -.PHONY: build-metal -build-metal: ## Builds VM for metal +.PHONY: exec-metal +exec-metal: ## Builds for metal cargo build --profile optimized $(FEATURES_METAL_EXEC) -.PHONY: build-avx2 -build-avx2: ## Builds VM for avx2 +.PHONY: exec-avx2 +exec-avx2: ## Builds for avx2 RUSTFLAGS="-C target-feature=+avx2" cargo build --profile optimized $(FEATURES_CONCURRENT_EXEC) -.PHONY: build-sve -build-sve: ## Builds VM for sve +.PHONY: exec-sve +exec-sve: ## Builds for sve RUSTFLAGS="-C target-feature=+sve" cargo build --profile optimized $(FEATURES_CONCURRENT_EXEC) -.PHONY: build-info -build-info: ## Builds VM with log tree +.PHONY: exec-info +exec-info: ## Builds with log tree cargo build --profile optimized $(FEATURES_LOG_TREE) # --- benchmarking -------------------------------------------------------------------------------- .PHONY: bench -bench: ## Runs VM benchmarks +bench: ## Runs benchmarks cargo bench --profile optimized diff --git a/assembly/src/ast/module.rs b/assembly/src/ast/module.rs index 47d6ce4265..31dc0886c3 100644 --- a/assembly/src/ast/module.rs +++ b/assembly/src/ast/module.rs @@ -10,8 +10,8 @@ use super::{Export, Import, LocalNameResolver, ProcedureIndex, ProcedureName, Re use crate::{ ast::{AliasTarget, AstSerdeOptions, Ident}, diagnostics::{Report, SourceFile}, - sema::SemanticAnalysisError, parser::ModuleParser, + sema::SemanticAnalysisError, ByteReader, ByteWriter, Deserializable, DeserializationError, LibraryNamespace, LibraryPath, Serializable, SourceSpan, Span, Spanned, }; diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index 8e95c75dac..0000000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -1.78