Skip to content

Releases: aspect-build/rules_swc

v1.0.0

27 Mar 16:51
Compare
Choose a tag to compare

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_swc", version = "1.0.0")

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "6ee206f7aa7f6aa75e7c3dbfc9b66c2e759851e49690b26154c86465d4e7f859",
    strip_prefix = "rules_swc-1.0.0",
    url = "https://github.com/aspect-build/rules_swc/releases/download/v1.0.0/rules_swc-v1.0.0.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a SWC cli from
# https://github.com/swc-project/swc/releases
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

What's Changed

New Contributors

Full Changelog: v0.21.3...v1.0.0

v1.0.0-rc3

20 Mar 19:36
Compare
Choose a tag to compare
v1.0.0-rc3 Pre-release
Pre-release

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_swc", version = "1.0.0-rc3")

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "28915ffc08776e19d6d81ac84593ddaad8d11480898058704bf59c25740fd66d",
    strip_prefix = "rules_swc-1.0.0-rc3",
    url = "https://github.com/aspect-build/rules_swc/releases/download/v1.0.0-rc3/rules_swc-v1.0.0-rc3.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a SWC cli from
# https://github.com/swc-project/swc/releases
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

What's Changed

Full Changelog: v1.0.0-rc2...v1.0.0-rc3

v1.0.0-rc2

06 Mar 15:45
0db4ce9
Compare
Choose a tag to compare
v1.0.0-rc2 Pre-release
Pre-release

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_swc", version = "1.0.0-rc2")

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "84567d61fca690884c08adc44c9f72d0cc4b65dd6d705baf3e447a4d0a020856",
    strip_prefix = "rules_swc-1.0.0-rc2",
    url = "https://github.com/aspect-build/rules_swc/releases/download/v1.0.0-rc2/rules_swc-v1.0.0-rc2.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a SWC cli from
# https://github.com/swc-project/swc/releases
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

What's Changed

Full Changelog: v1.0.0-rc1...v1.0.0-rc2

v1.0.0-rc1

28 Feb 18:38
Compare
Choose a tag to compare
v1.0.0-rc1 Pre-release
Pre-release

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_swc", version = "1.0.0-rc1")

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "d8b59d2addcddfaff8736f56fb663638129ccaec92481266e2e6c7fb4a5b68a4",
    strip_prefix = "rules_swc-1.0.0-rc1",
    url = "https://github.com/aspect-build/rules_swc/releases/download/v1.0.0-rc1/rules_swc-v1.0.0-rc1.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a SWC cli from
# https://github.com/swc-project/swc/releases
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

What's Changed

Full Changelog: v1.0.0-rc0...v1.0.0-rc1

v1.0.0-rc0

09 Feb 18:17
Compare
Choose a tag to compare
v1.0.0-rc0 Pre-release
Pre-release

BREAKING CHANGES

The srcs attribute on the swc macro is now required.

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_swc", version = "1.0.0-rc0")

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "5d13b0123d91d4297f60d8da0ab5771615f6ad6829bdfe69e7dcda9e5c01bc54",
    strip_prefix = "rules_swc-1.0.0-rc0",
    url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v1.0.0-rc0.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a SWC cli from
# https://github.com/swc-project/swc/releases
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

What's Changed

New Contributors

Full Changelog: v0.21.3...v1.0.0-rc0

v0.21.3

19 Jan 13:55
018975c
Compare
Choose a tag to compare
v0.21.3 Pre-release
Pre-release

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_swc", version = "0.21.3")

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "c35e633c2c90a4cd6796e66d66bcf37d31a81737afc76030201a9ef8599abc58",
    strip_prefix = "rules_swc-0.21.3",
    url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.21.3.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a SWC cli from
# https://github.com/swc-project/swc/releases
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

What's Changed

New Contributors

Full Changelog: v0.21.2...v0.21.3

v0.21.2

09 Jan 18:31
Compare
Choose a tag to compare
v0.21.2 Pre-release
Pre-release

Using Bzlmod with Bazel 6:

Add to your MODULE.bazel file:

bazel_dep(name = "aspect_rules_swc", version = "0.21.2")

Using WORKSPACE

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "decabe9351859bc36f0b8952bab977ecbf976b59a6bc4c28f5b8624c1fd1e3a8",
    strip_prefix = "rules_swc-0.21.2",
    url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.21.2.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a SWC cli from
# https://github.com/swc-project/swc/releases
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

What's Changed

New Contributors

Full Changelog: v0.21.1...v0.21.2

v0.21.0

07 Jan 05:00
Compare
Choose a tag to compare
v0.21.0 Pre-release
Pre-release

This release uses the "swcx" CLI: https://github.com/swc-project/swc/discussions/3859

Thanks to help from @realtimetodie, the latest release of swc (v1.3.25) has fixes needed for us to run the "pure-rust" CLI, and avoid any node.js process running. This makes it much faster to launch many small processes. Note, our TS benchmarks in https://blog.aspect.dev/rules-ts-benchmarks already used this patch, now that it's released you should get similar performance.

BREAKING CHANGES:

We are getting close to 1.0, so this is the chance to make disruptive changes before entering a semver guarantee.

  • Minimum version of swc is now v1.3.25
  • An explicit version now has to be given to swc_register_toolchains; we don't silently default to latest
  • the term "transpile" is not typically used in swc, so the underlying rule swc_transpile has been renamed swc_compile matching the "compile" command

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "71bff4030067e3898a98a60918745a168b166256393d1ea566f72b118460d4ef",
    strip_prefix = "rules_swc-0.21.0",
    url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.21.0.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a SWC cli from
# https://github.com/swc-project/swc/releases
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

What's Changed

Full Changelog: v0.20.2...v0.21.0

v0.20.2

04 Jan 08:08
ecb0e01
Compare
Choose a tag to compare
v0.20.2 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "814bc08efbbe4d5e238579c9b0cded519b199486fbc26709fcf6d4d47de08f50",
    strip_prefix = "rules_swc-0.20.2",
    url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.20.2.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

What's Changed

Full Changelog: v0.20.1...v0.20.2

v0.20.1

17 Dec 11:04
6dc37cc
Compare
Choose a tag to compare
v0.20.1 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "aspect_rules_swc",
    sha256 = "9a68901c258b8a91ce721df1f9b1dc62c9dd6b2822143e31a0280396b98db543",
    strip_prefix = "rules_swc-0.20.1",
    url = "https://github.com/aspect-build/rules_swc/archive/refs/tags/v0.20.1.tar.gz",
)

###################
# rules_swc setup #
###################

# Fetches the rules_swc dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")

rules_swc_dependencies()

# Fetches a pre-built Rust-node binding from
# https://github.com/swc-project/swc/releases.
# If you'd rather compile it from source, you can use rules_rust, fetch the project,
# then register the toolchain yourself. (Note, this is not yet documented)
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_VERSION", "swc_register_toolchains")

swc_register_toolchains(
    name = "swc",
    swc_version = LATEST_VERSION,
)

# Fetches a NodeJS interpreter, needed to run the swc CLI.
# You can skip this if you already register a nodejs toolchain.
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

What's Changed

New Contributors

Full Changelog: v0.20.0...v0.20.1