diff --git a/.gitmodules b/.gitmodules
index 2ca84d342b..2dd1e55e80 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -47,3 +47,6 @@
[submodule "ext/rcheevos"]
path = ext/rcheevos
url = https://github.com/RetroAchievements/rcheevos.git
+[submodule "ext/naett"]
+ path = ext/naett
+ url = https://github.com/erkkah/naett.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f11a7d71cb..701f56b746 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2222,7 +2222,7 @@ else()
include_directories(ext/zstd/lib)
endif()
-target_link_libraries(${CoreLibName} Common native kirk cityhash sfmt19937 xbrz xxhash rcheevos ${GlslangLibs}
+target_link_libraries(${CoreLibName} Common native kirk cityhash sfmt19937 xbrz xxhash rcheevos naett ${GlslangLibs}
${CoreExtraLibs} ${OPENGL_LIBRARIES} ${X11_LIBRARIES} ${CMAKE_DL_LIBS})
target_compile_features(${CoreLibName} PUBLIC cxx_std_17)
diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj
index c26c2295a3..27910492ae 100644
--- a/Common/Common.vcxproj
+++ b/Common/Common.vcxproj
@@ -399,6 +399,7 @@
+
@@ -848,6 +849,7 @@
+
diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters
index 8c8aedeb5f..5653148c98 100644
--- a/Common/Common.vcxproj.filters
+++ b/Common/Common.vcxproj.filters
@@ -515,6 +515,9 @@
Net
+
+ ext\naett
+
@@ -965,6 +968,9 @@
Net
+
+ ext\naett
+
@@ -1075,6 +1081,9 @@
{d6d5f6e0-1c72-496b-af11-6d52d5123033}
+
+ {34f45db9-5c08-49cb-b349-b9e760ce3213}
+
diff --git a/android/jni/Android.mk b/android/jni/Android.mk
index cffe34f588..1df74552df 100644
--- a/android/jni/Android.mk
+++ b/android/jni/Android.mk
@@ -79,7 +79,10 @@ SPIRV_CROSS_FILES := \
$(SRC)/ext/SPIRV-Cross/spirv_glsl.cpp \
$(SRC)/ext/SPIRV-Cross/spirv_parser.cpp \
$(SRC)/ext/SPIRV-Cross/spirv_cross_parsed_ir.cpp
-
+
+NAETT_FILES := \
+ ${SRC}/ext/naett/naett.c
+
RCHEEVOS_FILES := \
${SRC}/ext/rcheevos/src/rapi/rc_api_common.c \
${SRC}/ext/rcheevos/src/rapi/rc_api_editor.c \
@@ -178,6 +181,7 @@ EXEC_AND_LIB_FILES := \
$(VMA_FILES) \
$(SPIRV_CROSS_FILES) \
$(RCHEEVOS_FILES) \
+ $(NAETT_FILES) \
$(EXT_FILES) \
$(NATIVE_FILES) \
$(SRC)/Common/Buffer.cpp \
diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
index 8fc0581d45..d87af41ca4 100644
--- a/ext/CMakeLists.txt
+++ b/ext/CMakeLists.txt
@@ -31,6 +31,7 @@ add_subdirectory(snappy)
add_subdirectory(udis86)
add_subdirectory(SPIRV-Cross-build)
add_subdirectory(rcheevos-build)
+add_subdirectory(naett-build)
if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO)
add_subdirectory(discord-rpc-build)
endif()
diff --git a/ext/naett b/ext/naett
new file mode 160000
index 0000000000..cad8664cf2
--- /dev/null
+++ b/ext/naett
@@ -0,0 +1 @@
+Subproject commit cad8664cf236cdcf3df09c044ed0bf9e83d52555
diff --git a/ext/naett-build/CMakeLists.txt b/ext/naett-build/CMakeLists.txt
new file mode 100644
index 0000000000..84d15860cc
--- /dev/null
+++ b/ext/naett-build/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required (VERSION 3.2.0)
+project (naett)
+
+set(SRC_DIR ../naett/src)
+
+set(ALL_SOURCE_FILES
+ ${SRC_DIR}/naett/naett.c
+ )
+
+add_library(naett STATIC ${ALL_SOURCE_FILES})
diff --git a/libretro/Makefile.common b/libretro/Makefile.common
index bad6f6c73c..b94d6387d5 100644
--- a/libretro/Makefile.common
+++ b/libretro/Makefile.common
@@ -223,6 +223,9 @@ SOURCES_C += \
$(EXTDIR)/rcheevos/src/rhash/hash.c \
$(EXTDIR)/rcheevos/src/rhash/md5.c
+SOURCES_C +=
+ $(EXTDIR)/naett/naett.c
+
COREFLAGS += -DSTACK_LINE_READER_BUFFER_SIZE=1024
ifeq ($(PLATFORM_EXT), android)
COREFLAGS += -DHAVE_DLFCN_H