chore: Bump core runtime to C++17 (#11946) 235eba5b6b
Looks like C++17 should be supported now on all our targets, so bumping
from C++11. This also allows us to remove the "rivestd" polyfills.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
diff --git a/.rive_head b/.rive_head
index dd38bb4..9e9b1ac 100644
--- a/.rive_head
+++ b/.rive_head
@@ -1 +1 @@
-76c7232fa1bd2fc719cf1bb240f373bb2693fae7
+235eba5b6be67890cc222da38fb73f5d56ccc987
diff --git a/decoders/build/premake5.lua b/decoders/build/premake5.lua
index 3f24da4..5f8d3f9 100644
--- a/decoders/build/premake5.lua
+++ b/decoders/build/premake5.lua
@@ -1,17 +1,13 @@
-workspace('rive')
-configurations({ 'debug', 'release' })
-
-require('setup_compiler')
+dofile('rive_build_config.lua')
 
 rive = path.getabsolute('../../')
 
-dofile(rive .. '/dependencies/premake5_libpng.lua')
+dofile(rive .. '/dependencies/premake5_libpng_v2.lua')
 
 project('rive_decoders')
 dependson('libpng')
 kind('StaticLib')
 language('C++')
-cppdialect('C++17')
 targetdir('%{cfg.buildcfg}')
 objdir('obj/%{cfg.buildcfg}')
 fatalwarnings { "All" }
diff --git a/dependencies/premake5_libpng.lua b/dependencies/premake5_libpng.lua
deleted file mode 100644
index fdf1c4e..0000000
--- a/dependencies/premake5_libpng.lua
+++ /dev/null
@@ -1,86 +0,0 @@
-require('setup_compiler')
-local dependency = require('dependency')
-libpng = dependency.github('glennrp/libpng', 'libpng16')
-zlib = dependency.github('madler/zlib', '04f42ceca40f73e2978b50e93806c2a18c1281fc')
-
-includedirs({ './' })
-forceincludes({ 'rive_png_renames.h' })
-
-project('libpng')
-do
-    kind('StaticLib')
-    language('C++')
-    cppdialect('C++17')
-    targetdir('%{cfg.system}/cache/bin/%{cfg.buildcfg}/')
-    objdir('%{cfg.system}/cache/obj/%{cfg.buildcfg}/')
-    os.copyfile(libpng .. '/scripts/pnglibconf.h.prebuilt', libpng .. '/pnglibconf.h')
-    includedirs({ libpng, zlib })
-    files({
-        libpng .. '/png.c',
-        libpng .. '/pngerror.c',
-        libpng .. '/pngget.c',
-        libpng .. '/pngmem.c',
-        libpng .. '/pngpread.c',
-        libpng .. '/pngread.c',
-        libpng .. '/pngrio.c',
-        libpng .. '/pngrtran.c',
-        libpng .. '/pngrutil.c',
-        libpng .. '/pngset.c',
-        libpng .. '/pngtrans.c',
-        libpng .. '/pngwio.c',
-        libpng .. '/pngwrite.c',
-        libpng .. '/pngwtran.c',
-        libpng .. '/pngwutil.c',
-    })
-
-    do
-        files({
-            libpng .. '/arm/arm_init.c',
-            libpng .. '/arm/filter_neon_intrinsics.c',
-            libpng .. '/arm/palette_neon_intrinsics.c',
-        })
-    end
-
-    filter('system:windows')
-    do
-        architecture('x64')
-    end
-end
-
-project('zlib')
-do
-    kind('StaticLib')
-    language('C++')
-    cppdialect('C++17')
-    targetdir('%{cfg.system}/cache/bin/%{cfg.buildcfg}/')
-    objdir('%{cfg.system}/cache/obj/%{cfg.buildcfg}/')
-    defines({ 'ZLIB_IMPLEMENTATION' })
-    includedirs({ zlib })
-    files({
-        zlib .. '/adler32.c',
-        zlib .. '/compress.c',
-        zlib .. '/crc32.c',
-        zlib .. '/deflate.c',
-        zlib .. '/gzclose.c',
-        zlib .. '/gzlib.c',
-        zlib .. '/gzread.c',
-        zlib .. '/gzwrite.c',
-        zlib .. '/infback.c',
-        zlib .. '/inffast.c',
-        zlib .. '/inftrees.c',
-        zlib .. '/trees.c',
-        zlib .. '/uncompr.c',
-        zlib .. '/zutil.c',
-        zlib .. '/inflate.c',
-    })
-
-    filter('system:windows')
-    do
-        architecture('x64')
-    end
-
-    filter('system:not windows')
-    do
-        defines({ 'HAVE_UNISTD_H' })
-    end
-end
diff --git a/include/rive/rive_types.hpp b/include/rive/rive_types.hpp
index 00f7d8f..d68ff7f 100644
--- a/include/rive/rive_types.hpp
+++ b/include/rive/rive_types.hpp
@@ -121,18 +121,4 @@
 #define RIVE_DEBUG_CODE(CODE)
 #endif
 
-// Backports of later stl functions.
-namespace rivestd
-{
-template <class T, class... Args> std::unique_ptr<T> make_unique(Args&&... args)
-{
-    return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
-}
-
-template <typename T> static std::unique_ptr<T> adopt_unique(T* window)
-{
-    return std::unique_ptr<T>(window);
-}
-} // namespace rivestd
-
 #endif // rive_types
diff --git a/premake5_v2.lua b/premake5_v2.lua
index 5808ca2..6d655c4 100644
--- a/premake5_v2.lua
+++ b/premake5_v2.lua
@@ -97,13 +97,11 @@
 
     filter('options:not for_unreal')
     do
-        cppdialect('C++11')
         fatalwarnings({ 'All' })
     end
 
     filter({ 'options:for_unreal' })
     do
-        cppdialect('C++17')
         defines({ '_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR' })
     end
 
diff --git a/skia/renderer/build/premake5.lua b/skia/renderer/build/premake5.lua
index b917f1e..c7fe3f5 100644
--- a/skia/renderer/build/premake5.lua
+++ b/skia/renderer/build/premake5.lua
@@ -1,7 +1,4 @@
-workspace('rive')
-configurations({ 'debug', 'release' })
-
-require('setup_compiler')
+dofile('rive_build_config.lua')
 
 SKIA_DIR = os.getenv('SKIA_DIR')
 dependencies = os.getenv('DEPENDENCIES')
@@ -19,7 +16,6 @@
 do
     kind('StaticLib')
     language('C++')
-    cppdialect('C++17')
     targetdir('%{cfg.system}/bin/%{cfg.buildcfg}')
     objdir('%{cfg.system}/obj/%{cfg.buildcfg}')
     includedirs({
diff --git a/src/animation/animation_reset_factory.cpp b/src/animation/animation_reset_factory.cpp
index ace9919..b9aaf59 100644
--- a/src/animation/animation_reset_factory.cpp
+++ b/src/animation/animation_reset_factory.cpp
@@ -67,7 +67,7 @@
         }
 
         auto keyedObjectData =
-            rivestd::make_unique<KeyedObjectData>(keyedObject->objectId());
+            std::make_unique<KeyedObjectData>(keyedObject->objectId());
         auto ref = keyedObjectData.get();
         keyedObjectsData.push_back(std::move(keyedObjectData));
         return ref;
@@ -181,7 +181,7 @@
         m_resources.pop_back();
         return instance;
     }
-    auto instance = rivestd::make_unique<AnimationReset>();
+    auto instance = std::make_unique<AnimationReset>();
     return instance;
 }
 
diff --git a/src/animation/animation_state.cpp b/src/animation/animation_state.cpp
index c037ca0..7e5da82 100644
--- a/src/animation/animation_state.cpp
+++ b/src/animation/animation_state.cpp
@@ -9,7 +9,7 @@
 std::unique_ptr<StateInstance> AnimationState::makeInstance(
     ArtboardInstance* instance) const
 {
-    return rivestd::make_unique<AnimationStateInstance>(this, instance);
+    return std::make_unique<AnimationStateInstance>(this, instance);
 }
 
 #ifdef TESTING
diff --git a/src/animation/blend_state_1d.cpp b/src/animation/blend_state_1d.cpp
index ddfab5d..7365b26 100644
--- a/src/animation/blend_state_1d.cpp
+++ b/src/animation/blend_state_1d.cpp
@@ -6,5 +6,5 @@
 std::unique_ptr<StateInstance> BlendState1D::makeInstance(
     ArtboardInstance* instance) const
 {
-    return rivestd::make_unique<BlendState1DInstance>(this, instance);
+    return std::make_unique<BlendState1DInstance>(this, instance);
 }
diff --git a/src/animation/blend_state_direct.cpp b/src/animation/blend_state_direct.cpp
index 82db10b..a3a635c 100644
--- a/src/animation/blend_state_direct.cpp
+++ b/src/animation/blend_state_direct.cpp
@@ -8,5 +8,5 @@
 std::unique_ptr<StateInstance> BlendStateDirect::makeInstance(
     ArtboardInstance* instance) const
 {
-    return rivestd::make_unique<BlendStateDirectInstance>(this, instance);
+    return std::make_unique<BlendStateDirectInstance>(this, instance);
 }
\ No newline at end of file
diff --git a/src/animation/layer_state.cpp b/src/animation/layer_state.cpp
index 2d6d034..9b2aa36 100644
--- a/src/animation/layer_state.cpp
+++ b/src/animation/layer_state.cpp
@@ -62,5 +62,5 @@
 std::unique_ptr<StateInstance> LayerState::makeInstance(
     ArtboardInstance* instance) const
 {
-    return rivestd::make_unique<SystemStateInstance>(this, instance);
+    return std::make_unique<SystemStateInstance>(this, instance);
 }
\ No newline at end of file
diff --git a/src/animation/nested_linear_animation.cpp b/src/animation/nested_linear_animation.cpp
index 42d904d..07ddb53 100644
--- a/src/animation/nested_linear_animation.cpp
+++ b/src/animation/nested_linear_animation.cpp
@@ -8,7 +8,7 @@
 
 void NestedLinearAnimation::initializeAnimation(ArtboardInstance* artboard)
 {
-    m_AnimationInstance = rivestd::make_unique<LinearAnimationInstance>(
+    m_AnimationInstance = std::make_unique<LinearAnimationInstance>(
         artboard->animation(animationId()),
         artboard);
 }
\ No newline at end of file
diff --git a/src/animation/property_recorder.cpp b/src/animation/property_recorder.cpp
index abebbd8..cc84ba8 100644
--- a/src/animation/property_recorder.cpp
+++ b/src/animation/property_recorder.cpp
@@ -236,7 +236,7 @@
         }
     }
 
-    auto newCoreObjectData = rivestd::make_unique<CoreObjectData>(id);
+    auto newCoreObjectData = std::make_unique<CoreObjectData>(id);
     auto ref = newCoreObjectData.get();
     m_coreObjectsData.push_back(std::move(newCoreObjectData));
     return ref;
diff --git a/src/animation/state_machine_instance.cpp b/src/animation/state_machine_instance.cpp
index 90bbb90..0fed447 100644
--- a/src/animation/state_machine_instance.cpp
+++ b/src/animation/state_machine_instance.cpp
@@ -1089,8 +1089,7 @@
             if (vmProp != nullptr)
             {
                 m_propertyBindings.push_back(
-                    rivestd::make_unique<
-                        ListenerViewModelPropertyBindingListener>(
+                    std::make_unique<ListenerViewModelPropertyBindingListener>(
                         this,
                         vmProp,
                         m_listener->as<StateMachineListenerSingle>()));
@@ -1111,7 +1110,7 @@
                     if (vmProp != nullptr)
                     {
                         m_propertyBindings.push_back(
-                            rivestd::make_unique<
+                            std::make_unique<
                                 ListenerViewModelPropertyBindingInput>(
                                 this,
                                 vmProp,
@@ -1381,9 +1380,9 @@
         auto itr = hitLookup.find(target);
         if (itr == hitLookup.end())
         {
-            auto hs = rivestd::make_unique<HitLayout>(target->as<Drawable>(),
-                                                      this,
-                                                      isOpaque);
+            auto hs = std::make_unique<HitLayout>(target->as<Drawable>(),
+                                                  this,
+                                                  isOpaque);
             hitLookup[target] = hitLayout = hs.get();
             m_hitComponents.push_back(std::move(hs));
         }
@@ -1408,7 +1407,7 @@
             Shape* shape = target->as<Shape>();
             shape->addFlags(PathFlags::neverDeferUpdate);
             shape->addDirt(ComponentDirt::Path, true);
-            auto hs = rivestd::make_unique<HitExpandable>(shape, shape, this);
+            auto hs = std::make_unique<HitExpandable>(shape, shape, this);
             hitLookup[target] = hitShape = hs.get();
             m_hitComponents.push_back(std::move(hs));
         }
@@ -1428,9 +1427,8 @@
         {
             TextValueRun* run = target->as<TextValueRun>();
             run->textComponent()->addDirt(ComponentDirt::Path, true);
-            auto hs = rivestd::make_unique<HitTextRun>(run->textComponent(),
-                                                       run,
-                                                       this);
+            auto hs =
+                std::make_unique<HitTextRun>(run->textComponent(), run, this);
             hitLookup[target] = hitTextRun = hs.get();
             m_hitComponents.push_back(std::move(hs));
         }
@@ -1596,9 +1594,9 @@
                 if (focusData != nullptr)
                 {
                     auto focusGroup =
-                        rivestd::make_unique<FocusListenerGroup>(focusData,
-                                                                 listener,
-                                                                 this);
+                        std::make_unique<FocusListenerGroup>(focusData,
+                                                             listener,
+                                                             this);
                     m_focusListenerGroups.push_back(std::move(focusGroup));
                 }
             }
@@ -1623,16 +1621,16 @@
                 if (focusData != nullptr)
                 {
                     auto keyboardGroup =
-                        rivestd::make_unique<KeyboardListenerGroup>(focusData,
-                                                                    listener,
-                                                                    this);
+                        std::make_unique<KeyboardListenerGroup>(focusData,
+                                                                listener,
+                                                                this);
                     m_keyboardListenerGroups.push_back(
                         std::move(keyboardGroup));
                 }
             }
             continue;
         }
-        auto listenerGroup = rivestd::make_unique<ListenerGroup>(listener);
+        auto listenerGroup = std::make_unique<ListenerGroup>(listener);
         auto target = m_artboardInstance->resolve(listener->targetId());
         if (target != nullptr && target->is<Component>())
         {
@@ -1703,9 +1701,9 @@
         // TODO: @hernan as an optimization only create a HitNestedArtboard if
         // the nested artboard has state machines or if it is bound via data
         // binding
-        auto hn = rivestd::make_unique<HitNestedArtboard>(
-            nestedArtboard->as<Component>(),
-            this);
+        auto hn =
+            std::make_unique<HitNestedArtboard>(nestedArtboard->as<Component>(),
+                                                this);
         m_hitComponents.push_back(std::move(hn));
         for (auto animation : nestedArtboard->nestedAnimations())
         {
@@ -1731,9 +1729,9 @@
     }
     for (auto componentList : instance->artboardComponentLists())
     {
-        auto hc = rivestd::make_unique<HitComponentList>(
-            componentList->as<Component>(),
-            this);
+        auto hc =
+            std::make_unique<HitComponentList>(componentList->as<Component>(),
+                                               this);
         m_hitComponents.push_back(std::move(hc));
     }
 
@@ -1742,8 +1740,8 @@
     for (auto textInput : instance->objects<TextInput>())
     {
         auto textInputGroup =
-            rivestd::make_unique<TextInputListenerGroup>(textInput, this);
-        auto hitExpandable = rivestd::make_unique<HitExpandable>(
+            std::make_unique<TextInputListenerGroup>(textInput, this);
+        auto hitExpandable = std::make_unique<HitExpandable>(
             textInput->as<Drawable>(),
             textInput->as<Component>(),
             this,
diff --git a/src/artboard.cpp b/src/artboard.cpp
index cd8c035..a642d02 100644
--- a/src/artboard.cpp
+++ b/src/artboard.cpp
@@ -2361,30 +2361,28 @@
     size_t index)
 {
     auto la = this->animation(index);
-    return la ? rivestd::make_unique<LinearAnimationInstance>(la, this)
-              : nullptr;
+    return la ? std::make_unique<LinearAnimationInstance>(la, this) : nullptr;
 }
 
 std::unique_ptr<LinearAnimationInstance> ArtboardInstance::animationNamed(
     const std::string& name)
 {
     auto la = this->animation(name);
-    return la ? rivestd::make_unique<LinearAnimationInstance>(la, this)
-              : nullptr;
+    return la ? std::make_unique<LinearAnimationInstance>(la, this) : nullptr;
 }
 
 std::unique_ptr<StateMachineInstance> ArtboardInstance::stateMachineAt(
     size_t index)
 {
     auto sm = this->stateMachine(index);
-    return sm ? rivestd::make_unique<StateMachineInstance>(sm, this) : nullptr;
+    return sm ? std::make_unique<StateMachineInstance>(sm, this) : nullptr;
 }
 
 std::unique_ptr<StateMachineInstance> ArtboardInstance::stateMachineNamed(
     const std::string& name)
 {
     auto sm = this->stateMachine(name);
-    return sm ? rivestd::make_unique<StateMachineInstance>(sm, this) : nullptr;
+    return sm ? std::make_unique<StateMachineInstance>(sm, this) : nullptr;
 }
 
 std::unique_ptr<StateMachineInstance> ArtboardInstance::defaultStateMachine()
diff --git a/src/artboard_component_list.cpp b/src/artboard_component_list.cpp
index a82b28f..8c78f46 100644
--- a/src/artboard_component_list.cpp
+++ b/src/artboard_component_list.cpp
@@ -1019,7 +1019,7 @@
     auto recorderIt = m_propertyRecordersMap.find(artboard);
     if (recorderIt == m_propertyRecordersMap.end())
     {
-        auto propertyRecorder = rivestd::make_unique<PropertyRecorder>();
+        auto propertyRecorder = std::make_unique<PropertyRecorder>();
         propertyRecorder->recordArtboard(artboard);
         m_propertyRecordersMap[artboard] = std::move(propertyRecorder);
         for (auto& nestedArtboard : artboard->nestedArtboards())
diff --git a/src/file.cpp b/src/file.cpp
index 01e0894..3f410d5 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -379,24 +379,24 @@
         switch (stackType)
         {
             case Backboard::typeKey:
-                stackObject = rivestd::make_unique<BackboardImporter>(
+                stackObject = std::make_unique<BackboardImporter>(
                     object->as<Backboard>());
                 static_cast<BackboardImporter*>(stackObject.get())->file(this);
                 break;
             case Artboard::typeKey:
-                stackObject = rivestd::make_unique<ArtboardImporter>(
-                    object->as<Artboard>());
+                stackObject =
+                    std::make_unique<ArtboardImporter>(object->as<Artboard>());
                 break;
             case DataEnumCustom::typeKey:
-                stackObject = rivestd::make_unique<EnumImporter>(
+                stackObject = std::make_unique<EnumImporter>(
                     object->as<DataEnumCustom>());
                 break;
             case LinearAnimation::typeKey:
-                stackObject = rivestd::make_unique<LinearAnimationImporter>(
+                stackObject = std::make_unique<LinearAnimationImporter>(
                     object->as<LinearAnimation>());
                 break;
             case KeyedObject::typeKey:
-                stackObject = rivestd::make_unique<KeyedObjectImporter>(
+                stackObject = std::make_unique<KeyedObjectImporter>(
                     object->as<KeyedObject>());
                 break;
             case KeyedProperty::typeKey:
@@ -407,13 +407,13 @@
                 {
                     return ImportResult::malformed;
                 }
-                stackObject = rivestd::make_unique<KeyedPropertyImporter>(
+                stackObject = std::make_unique<KeyedPropertyImporter>(
                     importer->animation(),
                     object->as<KeyedProperty>());
                 break;
             }
             case StateMachine::typeKey:
-                stackObject = rivestd::make_unique<StateMachineImporter>(
+                stackObject = std::make_unique<StateMachineImporter>(
                     object->as<StateMachine>());
                 break;
             case StateMachineLayer::typeKey:
@@ -425,7 +425,7 @@
                     return ImportResult::malformed;
                 }
 
-                stackObject = rivestd::make_unique<StateMachineLayerImporter>(
+                stackObject = std::make_unique<StateMachineLayerImporter>(
                     object->as<StateMachineLayer>(),
                     artboardImporter->artboard());
 
@@ -438,30 +438,29 @@
             case BlendState1DViewModel::typeKey:
             case BlendState1DInput::typeKey:
             case BlendStateDirect::typeKey:
-                stackObject = rivestd::make_unique<LayerStateImporter>(
+                stackObject = std::make_unique<LayerStateImporter>(
                     object->as<LayerState>());
                 stackType = LayerState::typeKey;
                 break;
             case StateTransition::typeKey:
             case BlendStateTransition::typeKey:
-                stackObject = rivestd::make_unique<StateTransitionImporter>(
+                stackObject = std::make_unique<StateTransitionImporter>(
                     object->as<StateTransition>());
                 stackType = StateTransition::typeKey;
                 break;
             case StateMachineListener::typeKey:
             case StateMachineListenerSingle::typeKey:
-                stackObject =
-                    rivestd::make_unique<StateMachineListenerImporter>(
-                        object->as<StateMachineListener>());
+                stackObject = std::make_unique<StateMachineListenerImporter>(
+                    object->as<StateMachineListener>());
                 stackType = StateMachineListener::typeKey;
                 break;
             case ImageAsset::typeKey:
             case FontAsset::typeKey:
             case AudioAsset::typeKey:
-                stackObject = rivestd::make_unique<FileAssetImporter>(
-                    object->as<FileAsset>(),
-                    m_assetLoader,
-                    m_factory);
+                stackObject =
+                    std::make_unique<FileAssetImporter>(object->as<FileAsset>(),
+                                                        m_assetLoader,
+                                                        m_factory);
                 stackType = FileAsset::typeKey;
                 break;
 #ifdef WITH_RIVE_SCRIPTING
@@ -469,26 +468,26 @@
             {
                 auto scriptAsset = object->as<ScriptAsset>();
                 stackObject =
-                    rivestd::make_unique<ScriptAssetImporter>(scriptAsset,
-                                                              m_assetLoader,
-                                                              m_factory,
-                                                              &inBandBytecode);
+                    std::make_unique<ScriptAssetImporter>(scriptAsset,
+                                                          m_assetLoader,
+                                                          m_factory,
+                                                          &inBandBytecode);
                 stackType = FileAsset::typeKey;
                 scriptAsset->file(this);
                 break;
             }
 #endif
             case ManifestAsset::typeKey:
-                stackObject = rivestd::make_unique<FileAssetImporter>(
-                    object->as<FileAsset>(),
-                    m_assetLoader,
-                    m_factory);
+                stackObject =
+                    std::make_unique<FileAssetImporter>(object->as<FileAsset>(),
+                                                        m_assetLoader,
+                                                        m_factory);
                 stackType = FileAsset::typeKey;
                 m_manifest = rcp<FileAsset>(object->as<ManifestAsset>());
                 break;
             case ViewModel::typeKey:
             {
-                stackObject = rivestd::make_unique<ViewModelImporter>(
+                stackObject = std::make_unique<ViewModelImporter>(
                     object->as<ViewModel>());
                 static_cast<ViewModelImporter*>(stackObject.get())->file(this);
                 stackType = ViewModel::typeKey;
@@ -496,20 +495,19 @@
                 break;
             }
             case ViewModelInstance::typeKey:
-                stackObject = rivestd::make_unique<ViewModelInstanceImporter>(
+                stackObject = std::make_unique<ViewModelInstanceImporter>(
                     object->as<ViewModelInstance>());
                 stackType = ViewModelInstance::typeKey;
                 break;
             case ViewModelInstanceList::typeKey:
-                stackObject =
-                    rivestd::make_unique<ViewModelInstanceListImporter>(
-                        object->as<ViewModelInstanceList>());
+                stackObject = std::make_unique<ViewModelInstanceListImporter>(
+                    object->as<ViewModelInstanceList>());
                 stackType = ViewModelInstanceList::typeKey;
                 break;
             case TransitionViewModelCondition::typeKey:
             case TransitionArtboardCondition::typeKey:
                 stackObject =
-                    rivestd::make_unique<TransitionViewModelConditionImporter>(
+                    std::make_unique<TransitionViewModelConditionImporter>(
                         object->as<TransitionViewModelCondition>());
                 stackType = TransitionViewModelCondition::typeKey;
                 break;
@@ -524,19 +522,18 @@
             case BindablePropertyTrigger::typeKey:
             case BindablePropertyInteger::typeKey:
             case BindablePropertyList::typeKey:
-                stackObject = rivestd::make_unique<BindablePropertyImporter>(
+                stackObject = std::make_unique<BindablePropertyImporter>(
                     object->as<BindableProperty>());
                 stackType = BindablePropertyBase::typeKey;
                 break;
             case DataConverterGroupBase::typeKey:
-                stackObject = rivestd::make_unique<DataConverterGroupImporter>(
+                stackObject = std::make_unique<DataConverterGroupImporter>(
                     object->as<DataConverterGroup>());
                 stackType = DataConverterGroupBase::typeKey;
                 break;
             case DataConverterFormulaBase::typeKey:
-                stackObject =
-                    rivestd::make_unique<DataConverterFormulaImporter>(
-                        object->as<DataConverterFormula>());
+                stackObject = std::make_unique<DataConverterFormulaImporter>(
+                    object->as<DataConverterFormula>());
                 stackType = DataConverterFormulaBase::typeKey;
                 break;
             case DataConverterNumberToList::typeKey:
@@ -560,14 +557,14 @@
                 auto scriptedObject = ScriptedObject::from(object);
                 if (scriptedObject != nullptr)
                 {
-                    stackObject = rivestd::make_unique<ScriptedObjectImporter>(
+                    stackObject = std::make_unique<ScriptedObjectImporter>(
                         scriptedObject);
                     stackType = ScriptedDrawable::typeKey;
                 }
                 break;
             }
             case DataBindPathBase::typeKey:
-                stackObject = rivestd::make_unique<DataBindPathImporter>(
+                stackObject = std::make_unique<DataBindPathImporter>(
                     object->as<DataBindPath>());
                 stackType = DataBindPathBase::typeKey;
                 break;
@@ -584,7 +581,7 @@
         if (object->is<StateMachineLayerComponent>() &&
             importStack.makeLatest(
                 StateMachineLayerComponent::typeKey,
-                rivestd::make_unique<StateMachineLayerComponentImporter>(
+                std::make_unique<StateMachineLayerComponentImporter>(
                     object->as<StateMachineLayerComponent>())) !=
                 StatusCode::Ok)
         {
@@ -675,7 +672,7 @@
 void File::makeScriptingVM()
 {
     cleanupScriptingVM();
-    auto context = rivestd::make_unique<CPPRuntimeScriptingContext>(m_factory);
+    auto context = std::make_unique<CPPRuntimeScriptingContext>(m_factory);
     m_scriptingVM = make_rcp<ScriptingVM>(std::move(context));
     initializeLuaData(m_scriptingVM->state(), m_ViewModels);
 }
diff --git a/src/layout/n_slicer.cpp b/src/layout/n_slicer.cpp
index 2fcaafe..2b7d89a 100644
--- a/src/layout/n_slicer.cpp
+++ b/src/layout/n_slicer.cpp
@@ -6,7 +6,7 @@
 
 using namespace rive;
 
-NSlicer::NSlicer() { m_sliceMesh = rivestd::make_unique<SliceMesh>(this); }
+NSlicer::NSlicer() { m_sliceMesh = std::make_unique<SliceMesh>(this); }
 
 Image* NSlicer::image()
 {
diff --git a/src/text/raw_text_input.cpp b/src/text/raw_text_input.cpp
index 54f625e..3c6a7b8 100644
--- a/src/text/raw_text_input.cpp
+++ b/src/text/raw_text_input.cpp
@@ -915,7 +915,7 @@
     if (!m_measuringShape)
     {
         force = true;
-        m_measuringShape = rivestd::make_unique<FullyShapedText>();
+        m_measuringShape = std::make_unique<FullyShapedText>();
     }
     if (unflag(Flags::measureDirty) || force)
     {
diff --git a/src/text/text_style.cpp b/src/text/text_style.cpp
index 6472da2..4d6f4e4 100644
--- a/src/text/text_style.cpp
+++ b/src/text/text_style.cpp
@@ -55,7 +55,7 @@
     // This ensures context propagates to variation helper too.
     if (!m_variations.empty() || !m_styleFeatures.empty())
     {
-        m_variationHelper = rivestd::make_unique<TextVariationHelper>(this);
+        m_variationHelper = std::make_unique<TextVariationHelper>(this);
     }
     if (m_variationHelper != nullptr)
     {
diff --git a/src/text/text_value_run.cpp b/src/text/text_value_run.cpp
index 7c833b6..d1ba4fd 100644
--- a/src/text/text_value_run.cpp
+++ b/src/text/text_value_run.cpp
@@ -111,7 +111,7 @@
 {
     if (!m_rectanglesToContour)
     {
-        m_rectanglesToContour = rivestd::make_unique<RectanglesToContour>();
+        m_rectanglesToContour = std::make_unique<RectanglesToContour>();
     }
     else
     {
diff --git a/tess/src/sokol/sokol_tess_renderer.cpp b/tess/src/sokol/sokol_tess_renderer.cpp
index 6005bc9..45e6dff 100644
--- a/tess/src/sokol/sokol_tess_renderer.cpp
+++ b/tess/src/sokol/sokol_tess_renderer.cpp
@@ -813,7 +813,7 @@
                 m_strokeDirty = false;
                 break;
             case RenderPaintStyle::stroke:
-                m_stroke = rivestd::make_unique<ContourStroke>();
+                m_stroke = std::make_unique<ContourStroke>();
                 m_strokeDirty = true;
                 break;
         }
diff --git a/tests/unit_tests/renderer/rendering_tests.cpp b/tests/unit_tests/renderer/rendering_tests.cpp
index 28e18e5..8796f2e 100644
--- a/tests/unit_tests/renderer/rendering_tests.cpp
+++ b/tests/unit_tests/renderer/rendering_tests.cpp
@@ -19,27 +19,29 @@
 static FactoryWrapper testingWindowFactories[] = {
     {"Vulkan",
      []() {
-         return rivestd::adopt_unique(TestingWindow::MakeVulkanTexture({
+         return std::unique_ptr<TestingWindow>(
+             TestingWindow::MakeVulkanTexture({
 #ifdef RIVE_ANDROID
-             // Android doesn't support validation layers for command line
-             // apps like the unit_tests.
-             .disableValidationLayers = true,
-             // The OnePlus7 doesn't support debug callbacks either for
-             // command line apps.
-             .disableDebugCallbacks = true,
+                 // Android doesn't support validation layers for command line
+                 // apps like the unit_tests.
+                 .disableValidationLayers = true,
+                 // The OnePlus7 doesn't support debug callbacks either for
+                 // command line apps.
+                 .disableDebugCallbacks = true,
 #endif
-         }));
+             }));
      }},
 #if defined(__APPLE__)
     {"Metal",
      []() {
-         return rivestd::adopt_unique(TestingWindow::MakeMetalTexture({}));
+         return std::unique_ptr<TestingWindow>(
+             TestingWindow::MakeMetalTexture({}));
      }},
 #endif
 #ifdef _WIN32
     {"D3D12",
      []() {
-         return rivestd::adopt_unique(TestingWindow::MakeFiddleContext(
+         return std::unique_ptr<TestingWindow>(TestingWindow::MakeFiddleContext(
              TestingWindow::Backend::d3d12,
              {},
              TestingWindow::Visibility::headless,
@@ -47,7 +49,7 @@
      }},
     {"D3D12 atomic",
      []() {
-         return rivestd::adopt_unique(TestingWindow::MakeFiddleContext(
+         return std::unique_ptr<TestingWindow>(TestingWindow::MakeFiddleContext(
              TestingWindow::Backend::d3d12,
              {.atomic = true},
              TestingWindow::Visibility::headless,
@@ -55,7 +57,7 @@
      }},
     {"D3D11",
      []() {
-         return rivestd::adopt_unique(TestingWindow::MakeFiddleContext(
+         return std::unique_ptr<TestingWindow>(TestingWindow::MakeFiddleContext(
              TestingWindow::Backend::d3d,
              {},
              TestingWindow::Visibility::headless,
@@ -63,7 +65,7 @@
      }},
     {"D3D11 atomic",
      []() {
-         return rivestd::adopt_unique(TestingWindow::MakeFiddleContext(
+         return std::unique_ptr<TestingWindow>(TestingWindow::MakeFiddleContext(
              TestingWindow::Backend::d3d,
              {.atomic = true},
              TestingWindow::Visibility::headless,
@@ -71,7 +73,7 @@
      }},
     {"OpenGL",
      []() {
-         return rivestd::adopt_unique(TestingWindow::MakeFiddleContext(
+         return std::unique_ptr<TestingWindow>(TestingWindow::MakeFiddleContext(
              TestingWindow::Backend::gl,
              {},
              TestingWindow::Visibility::headless,
@@ -79,7 +81,7 @@
      }},
     {"OpenGL atomic",
      []() {
-         return rivestd::adopt_unique(TestingWindow::MakeFiddleContext(
+         return std::unique_ptr<TestingWindow>(TestingWindow::MakeFiddleContext(
              TestingWindow::Backend::gl,
              {.atomic = true},
              TestingWindow::Visibility::headless,
@@ -89,7 +91,7 @@
 #ifdef RIVE_ANDROID
     {"EGL (GL backend)",
      []() {
-         return rivestd::adopt_unique(
+         return std::unique_ptr<TestingWindow>(
              TestingWindow::MakeEGL(TestingWindow::Backend::gl, {}, nullptr));
      }},
 #endif
diff --git a/tests/unit_tests/runtime/scripting/scripting_test_utilities.hpp b/tests/unit_tests/runtime/scripting/scripting_test_utilities.hpp
index 56c6374..80efaa3 100644
--- a/tests/unit_tests/runtime/scripting/scripting_test_utilities.hpp
+++ b/tests/unit_tests/runtime/scripting/scripting_test_utilities.hpp
@@ -45,8 +45,7 @@
     {
         m_numResults = numResults;
         m_errorOk = errorOk;
-        auto context =
-            rivestd::make_unique<TestScriptingContext>(&m_factory, this);
+        auto context = std::make_unique<TestScriptingContext>(&m_factory, this);
         m_vm = make_rcp<ScriptingVM>(std::move(context));
 
         for (const auto& pair : modules)
diff --git a/utils/serializing_factory.cpp b/utils/serializing_factory.cpp
index a08ce09..3cb4f10 100644
--- a/utils/serializing_factory.cpp
+++ b/utils/serializing_factory.cpp
@@ -628,7 +628,7 @@
 
 std::unique_ptr<Renderer> SerializingFactory::makeRenderer()
 {
-    return rivestd::make_unique<SerializingRenderer>(&m_writer);
+    return std::make_unique<SerializingRenderer>(&m_writer);
 }
 
 void SerializingFactory::addFrame()