branchrust_reboot/main/hackweek_unsafescriptingaccesscancel
25 Commits over 0 Days - Infinitycph!
Bugfix: grab latest binaries for Rust.Native
One of them was stale, breaking the feature
Tests: booted into craggy on windows - no more exception
Update: grab binaries from the merged PR
- addesses review feedback, functionality is same
Tests: ran unit tests on Win
Update: mark UseMultithreadedScripting explicitly defaulted to enabled
It kept disabling it despite underlying var being enabled
Tests: booted into craggy, looked at var state in console
Update: codegen
Tests: none
Clean: unify style, add comments
Tests: none, trivial changes
Clean: missed meta file deletion
Tests: none, trivial change
Update: move UnsafeScriptingAccess to Facepunch.Unity
- add unit tests
- delete old TLStest and it's scene
Tests: ran unit tests
Update: re-enable the feature for clients as well
- add editor only RustNative_Editor
- rewrapped the code behind UNITY_ASSERTIONS
Tests: built all flavors of Rust locally (win, linux, mac | client,server | debug,dev,release) and ran them, got passes everywhere
Bugfix: make sure we modify EnsureMainThread in release builds
That check is always active
Tests: booted TLS scene
Update: integrate TLSTest into client bootstrap and server boot routines
- copied over linux rustnative.so, to be tested
Temp measure to test standalone builds
Tests: booted both bootstrap and craggy in win editor - saw output (disabled in client, enabled in server)
Update: replacing with a remotely built dylib
Surprisingly, it works
Tests: ran TLS test scene
Update: add MacOS support for UnsafeScriptingAccess
- using locally built debug dylib for now
Need to figure out if remotely built dylib is going to work or not (didn't when I broke sig locally)
Tests: using locally built dylib was able to run TLSTest setup
Update: consolidate OS specific calls to RustNative
Still gotta build and test linux and mac, gonna do that tomorrow
Tests: ran temp scene
Update: disable Unsafe.UseMultithreadedScripting on CLIENT
- codegen
Need to figure out how to better patch out the managed check when doing an IL2CPP build, will leave that for later
Tests: tested booting test scene both in CLIENT(ran on main thread) and SERVER(ran on thread pool) modes
Update: implement UnsafeScriptingAcccess.SwitchToMultithreading awaitable
Works with ConVar.Unsafe.UseMultithreadedScripting to either keep task on main thread of offload it to thread pool
Tests: TLSTest script, with covnar being in both states after system runs
Clean: do TLS search after assemblies loaded, not after domain reload
- add comments
- add temp scene and TLS test script (will remove later)
Tests: ran temp scene
Update: rewrite UnsafeScriptingAccess to search for TLS slot dynamically
- ran codegen
Weirdly SwitchToMultithreading doesn't work, might be my UniTask todo
Tests: on windows, using local scripts was able to get and read transform pos
Update: add SwitchToMultithreading helper
- added ConVar.Unsafe.UseMultithreadedScripting to disable experimental multithreading
Tests: compiles
Update: added standalone win TLS slot to allow
- also wrapped into OS & config dependent compile guards
Tests: built all flavors of standalone and checked that code succesfully executes in other project
add unsafe scripting access scope