Skip to content

Commit

Permalink
oxc bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
topheman committed Oct 28, 2024
1 parent 242fe2f commit c527913
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/oxc/explore-js-bundling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,51 @@

First, read [napi / Build](../napi/build.md).

You can install the following from npm, which include a pre-built binary - let's talk about how they are bundled.

## oxlint

It doesn't need bundling, the binary is directly used.

> `oxlint` does not require Node.js, the binaries can be downloaded from the [latest GitHub releases](https://github.com/oxc-project/oxc/releases/latest).
<https://www.npmjs.com/package/oxlint>

<https://oxc.rs/docs/guide/usage/linter.html#installation>

## oxc-parser

```sh
cd napi/parser
pnpm build
```

Will generate:

- `napi/parser/index.d.ts`: TypeScript definition of the objects exposed by Rust
- `napi/parser/index.js`: glue code that handles requiring the binary
- `napi/parser/parser.darwin-x64.node` (according to your os/arch)

<https://www.npmjs.com/package/oxc-parser>

<https://oxc.rs/docs/guide/usage/parser.html#installation>

## oxc-transform

```sh
cd napi/transform
pnpm build
```

Will generate:

- `napi/transform/index.d.ts`: TypeScript definition of the objects exposed by Rust
- `napi/partransformser/index.js`: glue code that handles requiring the binary
- `napi/transform/transform.darwin-x64.node` (according to your os/arch)

<https://www.npmjs.com/package/oxc-transform>

<https://oxc.rs/docs/guide/usage/transformer.html#installation>



0 comments on commit c527913

Please sign in to comment.