diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index e18ca7a..9e0b076 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -12,9 +12,9 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-11.0, ubuntu-latest, windows-latest] include: - - os: macos-latest + - os: macos-11.0 ARCH: macos-x86_64 - os: ubuntu-latest ARCH: linux-x86_64 diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index f8afcbb..b11a9d2 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-11.0, ubuntu-latest, windows-latest] python: [3.5, 3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v1 diff --git a/gen/attrs.ts b/gen/attrs.ts index 4d09f2a..071dbb9 100644 --- a/gen/attrs.ts +++ b/gen/attrs.ts @@ -83,9 +83,10 @@ ${(['html', 'svg'] as const).map(ns => ` ${ns}: ` + (() => { if (globalAttr) { return `Some(AttrMapEntry::AllNamespaceElements(${rsTagAttr(globalAttr)}))`; } + const entries = Object.entries(tagsMap); return `Some({ - let mut m = HashMap::<&'static [u8], AttributeMinification>::new(); -${Object.entries(tagsMap).map(([tagName, tagAttr]) => ` m.insert(b\"${tagName}\", ${rsTagAttr(tagAttr)});`).join('\n')} + let ${entries.length ? 'mut' : ''} m = HashMap::<&'static [u8], AttributeMinification>::new(); +${entries.map(([tagName, tagAttr]) => ` m.insert(b\"${tagName}\", ${rsTagAttr(tagAttr)});`).join('\n')} AttrMapEntry::SpecificNamespaceElements(m) })`; })() + ',').join('\n')} diff --git a/python/.cargo/config b/python/.cargo/config index 15d5d32..d47f983 100644 --- a/python/.cargo/config +++ b/python/.cargo/config @@ -3,3 +3,9 @@ rustflags = [ "-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup", ] + +[target.aarch64-apple-darwin] +rustflags = [ + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", +]