Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: amaranth-lang/amaranth-yosys
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d8bbaada12c2^
Choose a base ref
...
head repository: amaranth-lang/amaranth-yosys
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dd501feaefb8
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jun 24, 2020

  1. Handle the WASI exit trap.

    whitequark committed Jun 24, 2020
    Copy the full SHA
    d8bbaad View commit details
  2. Update default branch name.

    To match YoWASP.
    whitequark committed Jun 24, 2020
    Copy the full SHA
    dd501fe View commit details
Showing with 8 additions and 4 deletions.
  1. +1 −1 .github/workflows/main.yml
  2. +6 −2 nmigen_yosys/__main__.py
  3. +1 −1 setup.py
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:
name: wheel
path: dist/
- name: Publish wheels to Test PyPI
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.event.ref == 'refs/heads/develop'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
8 changes: 6 additions & 2 deletions nmigen_yosys/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys
import wasmtime
try:
@@ -10,7 +11,7 @@
wasm_cfg.cache = True

wasi_cfg = wasmtime.WasiConfig()
wasi_cfg.argv = ["yosys", *sys.argv[1:]]
wasi_cfg.argv = (os.path.basename(sys.argv[0]), *sys.argv[1:])
wasi_cfg.preopen_dir(".", ".")
wasi_cfg.inherit_stdin()
wasi_cfg.inherit_stdout()
@@ -22,4 +23,7 @@
"wasi_snapshot_preview1", wasi_cfg))
yosys = linker.instantiate(wasmtime.Module(store,
importlib_resources.read_binary(__package__, "yosys.wasm")))
yosys.exports["_start"]()
try:
yosys.exports["_start"]()
except wasmtime.ExitTrap as trap:
sys.exit(trap.code)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ def long_description():
setup_requires=["setuptools_scm", "wheel"],
install_requires=[
"importlib_resources; python_version<'3.7'",
"wasmtime~=0.18.0"
"wasmtime~=0.18.1"
],
packages=["nmigen_yosys"],
package_data={"nmigen_yosys": ["yosys.wasm", "share/**/**/**/*"]},