Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
962c9897
Commit
962c9897
authored
Jan 05, 2026
by
Niklas Mischkulnig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: enable AVIF
parent
40a4c11b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
Cargo.toml
crates/napi/Cargo.toml
+1
-3
package.json
packages/next-swc/package.json
+2
-2
mod.rs
turbopack/crates/turbopack-image/src/process/mod.rs
+2
-1
No files found.
crates/napi/Cargo.toml
View file @
962c9897
...
@@ -27,9 +27,7 @@ plugin = [
...
@@ -27,9 +27,7 @@ plugin = [
image-webp
=
["next-core/image-webp"]
image-webp
=
["next-core/image-webp"]
image-avif
=
["next-core/image-avif"]
image-avif
=
["next-core/image-avif"]
# Enable all the available image codec support.
# Enable all the available image codec support.
# Currently this is identical to `image-webp`, as we are not able to build
image-extended
=
[
"image-webp"
,
"image-avif"
]
# other codecs easily yet.
image-extended
=
["image-webp"]
# Enable dhat profiling allocator for heap profiling.
# Enable dhat profiling allocator for heap profiling.
__internal_dhat-heap
=
["dhat"]
__internal_dhat-heap
=
["dhat"]
...
...
packages/next-swc/package.json
View file @
962c9897
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
"build-native"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features plugin,image-extended --js false native"
,
"build-native"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features plugin,image-extended --js false native"
,
"build-native-release"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --features plugin,image-extended,tracing/release_max_level_trace --js false native"
,
"build-native-release"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --features plugin,image-extended,tracing/release_max_level_trace --js false native"
,
"build-native-release-with-assertions"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --profile release-with-assertions --features plugin,image-extended,tracing/release_max_level_trace --js false native"
,
"build-native-release-with-assertions"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --profile release-with-assertions --features plugin,image-extended,tracing/release_max_level_trace --js false native"
,
"build-native-no-plugin"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features image-
webp
--js false native"
,
"build-native-no-plugin"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features image-
extended
--js false native"
,
"build-native-no-plugin-release"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --features image-
webp
,tracing/release_max_level_trace --js false native"
,
"build-native-no-plugin-release"
:
"napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --features image-
extended
,tracing/release_max_level_trace --js false native"
,
"build-native-wasi"
:
"npx --package=@napi-rs/cli@3.0.0-alpha.45 napi build --platform --target wasm32-wasip1-threads -p next-swc-napi --cwd ../../ --output-dir packages/next-swc/native --no-default-features"
,
"build-native-wasi"
:
"npx --package=@napi-rs/cli@3.0.0-alpha.45 napi build --platform --target wasm32-wasip1-threads -p next-swc-napi --cwd ../../ --output-dir packages/next-swc/native --no-default-features"
,
"build-wasm"
:
"wasm-pack build ../../crates/wasm --scope=next"
,
"build-wasm"
:
"wasm-pack build ../../crates/wasm --scope=next"
,
"cache-build-native"
:
"[ -d native ] && echo $(ls native)"
,
"cache-build-native"
:
"[ -d native ] && echo $(ls native)"
,
...
...
turbopack/crates/turbopack-image/src/process/mod.rs
View file @
962c9897
...
@@ -132,12 +132,13 @@ fn load_image(
...
@@ -132,12 +132,13 @@ fn load_image(
/// Type of raw image buffer read by reader from `load_image`.
/// Type of raw image buffer read by reader from `load_image`.
/// If the image could not be decoded, the raw bytes are returned.
/// If the image could not be decoded, the raw bytes are returned.
enum
ImageBuffer
{
enum
ImageBuffer
{
#[allow(unused)]
Raw
(
Vec
<
u8
>
),
Raw
(
Vec
<
u8
>
),
Decoded
(
image
::
DynamicImage
),
Decoded
(
image
::
DynamicImage
),
}
}
fn
load_image_internal
(
fn
load_image_internal
(
image
:
ResolvedVc
<
Box
<
dyn
Source
>>
,
#[allow(unused_variables)]
image
:
ResolvedVc
<
Box
<
dyn
Source
>>
,
bytes
:
&
[
u8
],
bytes
:
&
[
u8
],
extension
:
&
str
,
extension
:
&
str
,
)
->
Result
<
(
ImageBuffer
,
Option
<
ImageFormat
>
)
>
{
)
->
Result
<
(
ImageBuffer
,
Option
<
ImageFormat
>
)
>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment