Commit graph

263 commits

Author SHA1 Message Date
e2aef015fa
Implement DateTime Built-in Library (#94) 2023-09-11 12:52:07 -05:00
Filip Tibell
a3feece9d4
Add back variadic CFrame methods 2023-08-24 19:13:56 -05:00
Filip Tibell
b79d3ce4e2
Make clippy happy 2023-08-24 19:09:05 -05:00
Kenneth Loeffler
bcfc7d2f55
Implement Terrain:GetMaterialColor and Terrain:SetMaterialColor (#93) 2023-08-24 18:39:13 -05:00
Filip Tibell
64b152e34b
Enable sorting of keys during serde serialization 2023-08-23 15:11:12 -05:00
Filip Tibell
de0f017540
Refactor export tables for roblox builtin library 2023-08-23 14:53:52 -05:00
Filip Tibell
52a6c4f4da
Revert #85 to fix SIGSEGV 2023-08-23 12:07:16 -05:00
Filip Tibell
83db30496d Add notes for future scheduler improvements, add wrapper structs for messaging 2023-08-22 20:00:58 -05:00
Filip Tibell
5ae8f662b9 Wait, context already works, what the heck 2023-08-22 20:00:58 -05:00
Filip Tibell
fc90630781 Implement context preservation for Lune struct 2023-08-22 20:00:58 -05:00
Filip Tibell
b18e1ed519 Add new test for require while a background task is running 2023-08-22 20:00:58 -05:00
Filip Tibell
58d64fc0c8 Use default env filter for tracing 2023-08-22 20:00:58 -05:00
Filip Tibell
1cb8ea99a3 Raise tracing max level 2023-08-22 20:00:58 -05:00
Filip Tibell
e5ed668a33 Improvements to scheduler futures resumption 2023-08-22 20:00:58 -05:00
Filip Tibell
38a91a3dc3 Implement tracing for scheduler, set to debug for now 2023-08-22 20:00:58 -05:00
Filip Tibell
1f11ceb91a Finish implementation of serve 2023-08-22 20:00:58 -05:00
Filip Tibell
609eba08a8 Implement handler calling for serve again, now with extra multithreading 2023-08-22 20:00:58 -05:00
Filip Tibell
851589c695 Add test for error global 2023-08-22 20:00:58 -05:00
Filip Tibell
2f3fb07b7c New net.serve implementation 2023-08-22 20:00:58 -05:00
Filip Tibell
b4b119cf42 Rip out old net.serve implementation 2023-08-22 20:00:58 -05:00
Filip Tibell
acae6a6369 Get rid of lua lifetime in scheduler, add scheduler documentation 2023-08-22 20:00:58 -05:00
Filip Tibell
8e4fc4b65e Add descriptive error messages for lua registry and oom 2023-08-22 20:00:58 -05:00
Filip Tibell
30dc027e3e Clean up interrupt listener 2023-08-22 20:00:58 -05:00
Filip Tibell
888f00dd8b Rename scheduler methods to be consistent with tokio, more obvious 2023-08-22 20:00:58 -05:00
Filip Tibell
3f5371a7c1 Figure out how to solve background tasks in new scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
70caf89295 Fix typeof function registry key not being unique 2023-08-22 20:00:58 -05:00
Filip Tibell
d7404679c7 More robust task.spawn implementation 2023-08-22 20:00:58 -05:00
Filip Tibell
ecf5c9db44 Replace result with expect for process.spawn 2023-08-22 20:00:58 -05:00
Filip Tibell
5dd5fb2ad1 Remove unnecessary static lifetime from process.spawn 2023-08-22 20:00:58 -05:00
Filip Tibell
e3449e7fd9 Run process.spawn on separate thread, if possible 2023-08-22 20:00:58 -05:00
Filip Tibell
6db01d7b94 Clean up process spawn options 2023-08-22 20:00:58 -05:00
Filip Tibell
1baf10fa87 Fix custom typeof function being recursivve 2023-08-22 20:00:58 -05:00
Filip Tibell
02c9bce645 Add test to ensure warn global exists and is a function 2023-08-22 20:00:58 -05:00
Filip Tibell
4412d02b34 Add back typeof global 2023-08-22 20:00:58 -05:00
Filip Tibell
9b4ca94c13 Add back print and warn globals 2023-08-22 20:00:58 -05:00
Filip Tibell
029873fd5f Store net client in registry instead of app data, remove require context from registry 2023-08-22 20:00:58 -05:00
Filip Tibell
616846c316 Fix web sockets using old registry values 2023-08-22 20:00:58 -05:00
Filip Tibell
ebdc8a6261 Remove old lune lib 2023-08-22 20:00:58 -05:00
Filip Tibell
90fce384d0 Fix net client app data 2023-08-22 20:00:58 -05:00
Filip Tibell
59788d9116 Use app data for net builtin client 2023-08-22 20:00:58 -05:00
Filip Tibell
59aef5c170 Split scheduler futures into lua & background, improve async tests 2023-08-22 20:00:58 -05:00
Filip Tibell
9bb3854554 Net serve test improvements, add some impl notes to scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
a3b364ae23 Start work on background tasks 2023-08-22 20:00:58 -05:00
Filip Tibell
f0099ac5e8 Figure out whats causing sigsegv 2023-08-22 20:00:58 -05:00
Filip Tibell
577f8d7928 Remove usage of unstable mlua feature 2023-08-22 20:00:58 -05:00
Filip Tibell
dc6903cfae Rename scheduler struct member 2023-08-22 20:00:58 -05:00
Filip Tibell
57677278c4 Fix pcall test, improve scheduler panic message 2023-08-22 20:00:58 -05:00
Filip Tibell
5905b2d6cf Add back support for init files in require 2023-08-22 20:00:58 -05:00
Filip Tibell
3cd7a8945c Fix wait_for_thread and remove debugging for it 2023-08-22 20:00:58 -05:00
Filip Tibell
98bb475afe Use real thread ids instead of randomized ones 2023-08-22 20:00:58 -05:00
Filip Tibell
7e7cfd7cd0 Add some different debugging 2023-08-22 20:00:58 -05:00
Filip Tibell
a8db74d40d Remove debugging 2023-08-22 20:00:58 -05:00
Filip Tibell
3ab15e63e8 Fix new lua threads not breaking scheduler out of futures resumption 2023-08-22 20:00:58 -05:00
Filip Tibell
ee21921601 Add some debugging for require 2023-08-22 20:00:58 -05:00
Filip Tibell
4eb7d5ab8b Support require without extension for path requires 2023-08-22 20:00:58 -05:00
Filip Tibell
38994b941c Store reference to lua in require context 2023-08-22 20:00:58 -05:00
Filip Tibell
9182427a0a Fix async require cache, unify relative and cwd-relative require functions 2023-08-22 20:00:58 -05:00
Filip Tibell
d6c31f67ba Implement functionality necessary for relative path requires 2023-08-22 20:00:58 -05:00
Filip Tibell
a91e24eb01 Make it easier to emit formatted lua errors 2023-08-22 20:00:58 -05:00
Filip Tibell
c484ae73d6 Add back net builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
d40a7b6b4f Add back roblox builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
8a2c5f65bb Add back process builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
67e1d6c7fc Add back fs builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
780f155377 Add back serde builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
d6dbe5c861 Add back luau builtin 2023-08-22 20:00:58 -05:00
Filip Tibell
73361d5a52 Add back stdio builtin and pretty error formatting 2023-08-22 20:00:58 -05:00
Filip Tibell
e4cf40789c Dont try to resume dead threads in the scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
0757d6f293 Initial implementation of builtin libraries, task library 2023-08-22 20:00:58 -05:00
Filip Tibell
7a63987cbe Bring back version global 2023-08-22 20:00:58 -05:00
Filip Tibell
24b6498774 Rename version global test 2023-08-22 20:00:58 -05:00
Filip Tibell
2762a43dbb Add back _G table 2023-08-22 20:00:58 -05:00
Filip Tibell
b69f824b57 Pretty-print lua errors 2023-08-22 20:00:58 -05:00
Filip Tibell
4acc730d38 Ensure thread safety of scheduler state 2023-08-22 20:00:58 -05:00
Filip Tibell
b1847bf84c Add documentation for scheduler state 2023-08-22 20:00:58 -05:00
Filip Tibell
2960f960de More robust scheduler error resumption mechanism 2023-08-22 20:00:58 -05:00
Filip Tibell
dcb989fd92 Implement basic abs path require, propagate async errors back to lua threads 2023-08-22 20:00:58 -05:00
Filip Tibell
bcef44e286 Implement bulk of new require behavior 2023-08-22 20:00:58 -05:00
Filip Tibell
7d73601a58 Initial scaffolding to get custom globals and require working 2023-08-22 20:00:58 -05:00
Filip Tibell
7fe43a969f Use static lifetime bound instead of spamming actual static lifetime 2023-08-22 20:00:58 -05:00
Filip Tibell
0dbf466817 Add back lua lifetime to scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
b4bbc0630a Add table builder util 2023-08-22 20:00:58 -05:00
Filip Tibell
1f72033a6a Use static lua for now, to make lifetimes work 2023-08-22 20:00:58 -05:00
Filip Tibell
e1fa89cf60 Some lifetime and async arg improvements 2023-08-22 20:00:58 -05:00
Filip Tibell
62e6130223 Relax scheduler method args since lifetimes are now correct 2023-08-22 20:00:58 -05:00
Filip Tibell
dc80b1c28f Scheduler now manages entire Lua struct, elide lifetimes where possible 2023-08-22 20:00:58 -05:00
Filip Tibell
1b7287a742 Methods take owned threads 2023-08-22 20:00:58 -05:00
Filip Tibell
ab386e000d Add lifetimes because they are fun 2023-08-22 20:00:58 -05:00
Filip Tibell
6416ef5fb7 More work on scheduler async stuff 2023-08-22 20:00:58 -05:00
Filip Tibell
7c8af9730f Some work on async functions for new scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
0a5305b947 Add api for scheduling plain futures in scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
eafc42531f Implement futures resumption 2023-08-22 20:00:58 -05:00
Filip Tibell
d1a2dc2fa6 Use atomics in scheduler state instead of refcell 2023-08-22 20:00:58 -05:00
Filip Tibell
4fa76aa27f Implement thread return value broadcasting in scheduler 2023-08-22 20:00:58 -05:00
Filip Tibell
6757e1a1a8 Initial barebones scheduler implementation and interface 2023-08-22 20:00:58 -05:00
Filip Tibell
c80e504283 Clean slate 2023-08-22 20:00:58 -05:00
Filip Tibell
d5400f370f
Remove static lua lifetimes where possible 2023-08-16 11:17:43 -05:00
Filip Tibell
60026b1c85
Prompt state for REPL does not need PartialEq 2023-08-16 10:58:03 -05:00
Filip Tibell
2b855156bf
Make clippy happy for new REPL, minor changes
- Move some code blocks to be able to remove string cloning
- Use const strings for user-facing REPL messages
- Fix running input code twice when interrupted
- Add notes for future extensions and considerations
2023-08-16 10:56:25 -05:00
Filip Tibell
d8f6703c70
Get rid of static lifetime in lua struct creation module 2023-08-16 10:17:03 -05:00
bff6dffe90
Implement a REPL (#83) 2023-08-16 10:05:53 -05:00