Skip to content

Commit

Permalink
Merge pull request #47019 from vercel/jrl-next-crates
Browse files Browse the repository at this point in the history
Move `next-*` crates from Turbopack
  • Loading branch information
ijjk authored Mar 13, 2023
2 parents 7457be0 + 39e240b commit 9af72fa
Show file tree
Hide file tree
Showing 669 changed files with 34,343 additions and 2,286 deletions.
1 change: 1 addition & 0 deletions .alexignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CODE_OF_CONDUCT.md
examples/
**/*/LICENSE.md
2 changes: 1 addition & 1 deletion .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ jobs:
toolchain: ${{ env.RUST_TOOLCHAIN }}
profile: minimal

- run: cd packages/next-swc && cargo test
- run: cd packages/next-swc && cargo test --workspace --exclude next-dev-tests
if: ${{ steps.swc-change.outputs.SWC_CHANGE == 'yup' }}

test-wasm:
Expand Down
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,16 @@
"explorer.fileNesting.patterns": {
"*.ts": "$(capture).test.ts, $(capture).test.tsx",
"*.tsx": "$(capture).test.ts, $(capture).test.tsx"
},

// Allow to find the cargo project for rust-analyzer.
"rust-analyzer.linkedProjects": ["packages/next-swc/Cargo.toml"],
// Compile rust-analyzer in a separate directory to avoid conflicts with the main project.
"rust-analyzer.checkOnSave.extraEnv": {
"CARGO_TARGET_DIR": "target/rust-analyzer"
},
"rust-analyzer.server.extraEnv": {
"CARGO_TARGET_DIR": "target/rust-analyzer",
"RUST_BACKTRACE": "0"
}
}
22 changes: 18 additions & 4 deletions packages/next-swc/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
[env]
CARGO_WORKSPACE_DIR = { value = "", relative = true }

[build]

rustdocflags = []

[target.x86_64-pc-windows-msvc]
linker = "rust-lld"

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"

[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
rustflags = [
"-C",
"target-feature=-crt-static",
"-C",
"link-arg=-lgcc",
"--cfg",
"tokio_unstable",
"-Csymbol-mangling-version=v0",
"-Ctarget-feature=-crt-static",
"-Clink-arg=-lgcc",
]

[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

[target.'cfg(all())']
rustflags = [
"--cfg",
"tokio_unstable",
"-Csymbol-mangling-version=v0",
"-Aclippy::too_many_arguments"
]
Loading

0 comments on commit 9af72fa

Please sign in to comment.