Commit graph

249 commits

Author SHA1 Message Date
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
Filip Tibell
74a41c1bf1
Clean up LuneError type for consumers 2023-08-14 16:32:06 -05:00
David C
72adb2172f
Pass arguments to coroutine in coroutine.resume (#86) 2023-08-14 15:52:53 -05:00
David C
c86190def1
Implement variadic versions of CFrame methods (#85) 2023-08-14 15:43:01 -05:00
Filip Tibell
0ab32ffffd
Add is_incomplete_input for LuneError struct 2023-08-14 10:41:55 -05:00
Filip Tibell
375f1b9334
Make luau compile options more strict to avoid panics 2023-08-11 19:17:48 -05:00
Filip Tibell
768aadc225
Move new luau builtin options struct to where others are, reduce usage of unwrap 2023-08-10 15:13:18 -05:00
AsynchronousMatrix
0a8773dc04
Implement new luau built-in library. (#82) 2023-08-10 14:38:25 -05:00
Filip Tibell
78c23507c9
Fix clippy complaining about default trait 2023-08-09 16:32:17 -05:00
Filip Tibell
2407800aca
Export roblox module in lib 2023-08-09 16:31:32 -05:00
Filip Tibell
ee3d0ba502
Use published versions of rbx-dom libraries 2023-08-09 16:28:12 -05:00
Filip Tibell
fea97972a2
Enable jit 2023-08-05 17:53:32 -05:00
Filip Tibell
55a2338a3e
Use global lua compiler instead of recreating on load 2023-08-05 17:51:56 -05:00
Filip Tibell
483713e635
Use mlua trait for mapping into lua errors 2023-08-05 17:12:25 -05:00
Filip Tibell
b4c3cc77ac
Use custom serialization options in serde builtin 2023-08-05 12:24:19 -05:00
Filip Tibell
9ff142e6e2
Fix require on files with multiple extensions 2023-08-04 16:58:18 -05:00
Filip Tibell
82e5844dad
Fix remaining deadlock cases for instances 2023-08-04 14:34:58 -05:00
Filip Tibell
0869b16ba6
Use plain mutex for global dom instead of rwlock 2023-08-04 14:05:44 -05:00
Filip Tibell
31e625aa71
Separate userdata impl for Instance out into new module for maintainability 2023-08-04 13:58:54 -05:00
Filip Tibell
57f730e788
Remove old docs, move typedefs dir 2023-07-22 14:44:28 +02:00
Filip Tibell
8853aad620
Implement reflection database accessible from lua in roblox builtin 2023-07-21 12:10:56 +02:00
Filip Tibell
b0f23a406b
Implement copying api for fs builtin 2023-07-20 19:29:21 +02:00
Filip Tibell
bca3de9454
Implement metadata api for fs builtin 2023-07-20 12:25:36 +02:00
Filip Tibell
2f464f846a
Update dependencies 2023-07-20 11:07:44 +02:00
Filip Tibell
689994552f
Goodbye monorepo, hello monolith 2023-07-20 09:47:00 +02:00
Filip Tibell
aec7f820ca
Migrate to using cargo workspaces 2023-02-05 19:13:58 -05:00
Filip Tibell
a8b57653f3
Fix typedefs download breaking after switching to reqwest 2023-02-03 22:21:40 -05:00
Filip Tibell
22ca94c674
Version 0.2.1 2023-02-03 19:30:15 -05:00
Filip Tibell
aefd57d2ba
Implement HTTP server, update Luau version 2023-02-03 19:27:56 -05:00
Filip Tibell
0ce03e7987
Switch to reqwest for a proper async http client 2023-02-03 14:40:06 -05:00
Filip Tibell
a448c9d2c6
Migrate back to tokio to prepare for using hyper 2023-02-03 14:15:20 -05:00
Filip Tibell
091c73038f
Fix require-d test modules not returning anything 2023-01-29 18:59:51 -05:00
Filip Tibell
589c52f769
Fix process exit behavior 2023-01-28 11:16:13 -05:00
Filip Tibell
08360a861f
Implement new process spawn options & cwd constant 2023-01-27 23:46:07 -05:00
Filip Tibell
e9d3fb21f0
Add missing param and return docs to definitions 2023-01-26 19:56:50 -05:00
Filip Tibell
0657e05cc0
Implement docs file generation & docs in the luau type definitions file 2023-01-26 19:36:06 -05:00
Filip Tibell
92781a521c
Implement list subcommand 2023-01-25 14:42:10 -05:00
Filip Tibell
fb1dc1ade2
Remove debug print 2023-01-24 20:31:13 -05:00
Filip Tibell
915dbf7bd9
Fix scripts that terminate instantly hanging forever 2023-01-24 20:30:47 -05:00
Filip Tibell
d3046194bc
Potential fix for process.spawn yield issue 2023-01-24 15:36:09 -05:00
Filip Tibell
7eff6e4555
Improve file paths in error stack traces 2023-01-24 15:27:38 -05:00
Filip Tibell
4f26b02de8
Improve tests for downloading definition files 2023-01-24 14:05:19 -05:00
Filip Tibell
5c6fdb4a6e
Make CLI tests less flaky 2023-01-24 13:48:37 -05:00
Filip Tibell
3c0e270279
Share more code in task lib test files 2023-01-24 12:52:41 -05:00
Filip Tibell
4609092ec4
Fix task.defer timing 2023-01-24 12:51:12 -05:00
Filip Tibell
113f290c59
Implement argument passing for task lib 2023-01-24 12:24:57 -05:00
Filip Tibell
371892fc7d
Properly remove task-spawned threads from registry after use 2023-01-24 12:10:43 -05:00
Filip Tibell
cb9aa1fc1b
Fix cli type definition download commands 2023-01-24 11:57:02 -05:00
Filip Tibell
709c307374
Add tests to prevent regressions in downloading type definitions 2023-01-24 11:53:06 -05:00
Filip Tibell
751adc04c3
Remove usage of block_on inside of async function 2023-01-24 11:31:27 -05:00
Filip Tibell
0d0bb3f178
Implement relative path requires, proper exit codes 2023-01-24 02:05:54 -05:00
Filip Tibell
bfe852f034
Uncomment task lib argument stuff to prepare for implementation 2023-01-23 20:59:57 -05:00
Filip Tibell
8020d93144
Add missing minimum task wait/delay 2023-01-23 19:59:35 -05:00
Filip Tibell
1011db6372
Silence task.wait error in canceled tasks 2023-01-23 19:54:16 -05:00
Filip Tibell
fcf59455db
Improve task.cancel unit test 2023-01-23 19:21:53 -05:00
Filip Tibell
af8eb08433
Update unit tests & typedefs 2023-01-23 19:13:18 -05:00
Filip Tibell
d4ad835fd8
Lune library internal util improvements, type definition improvements 2023-01-23 18:52:31 -05:00
Filip Tibell
2eb12c9aed
Fix task.spawn not running instantly 2023-01-23 17:50:11 -05:00
Filip Tibell
8fca650f46
Fix coroutine.resume 2023-01-23 17:39:16 -05:00
Filip Tibell
b1e7b2dd77
Use static coroutine close function instead of always fetching global 2023-01-23 17:34:43 -05:00
Filip Tibell
dc8206d9fd
Remove another old TODO 2023-01-23 16:20:07 -05:00
Filip Tibell
f549b98925
Remove old TODO 2023-01-23 16:19:40 -05:00
Filip Tibell
eea1e65c07
Clean up boilerplate in task lib implementation 2023-01-23 16:18:20 -05:00
Filip Tibell
f2c9213e3e
Fix task cancel test being flaky due to task spawn scheduling 2023-01-23 14:09:10 -05:00
Filip Tibell
547d8f25f3
Fix task lib sending too many messages 2023-01-23 13:54:34 -05:00
Filip Tibell
fd8a41759c
Improve process error code handling 2023-01-23 13:51:32 -05:00
Filip Tibell
c2ee188ad5
Fix process.spawn yielding issue 2023-01-23 13:18:48 -05:00
Filip Tibell
5839a7b021
Minor runner improvements 2023-01-23 02:47:06 -05:00
Filip Tibell
19829d7cf4
Re-implement task library, take two 2023-01-23 02:38:32 -05:00
Filip Tibell
54846648fd
Re-implement task library 2023-01-22 23:00:09 -05:00
Filip Tibell
746990938c
Version 0.0.5 2023-01-22 21:46:30 -05:00
Filip Tibell
d531cf3813
Use mlua prelude instead of manual imports 2023-01-22 21:31:55 -05:00
Filip Tibell
09a7619995
Clean up err returns 2023-01-22 21:21:11 -05:00
Filip Tibell
06339a2699
Migrate away from tokio & reqwest, use smol & ureq 2023-01-22 21:14:13 -05:00
Filip Tibell
e5e96dfd54
Use table builder wherever possible instead of manual table creation 2023-01-22 20:18:09 -05:00
Filip Tibell
4ed69994a2
Improve test output 2023-01-22 19:25:36 -05:00
Filip Tibell
276200225b
Ensure threads get returned from task lib in unit tests 2023-01-22 17:06:35 -05:00
Filip Tibell
f22ef577cf
More work on task lib 2023-01-22 17:05:01 -05:00
Filip Tibell
02fd4e8733
Cleanup 2023-01-22 16:36:34 -05:00
Filip Tibell
706368a462
Implement functional but blocking task lib in rust 2023-01-22 16:26:45 -05:00
Filip Tibell
6b14bc3dc0
Pass ownership to global constructors to avoid lifetime issues 2023-01-22 15:23:56 -05:00
Filip Tibell
6d432171e5
Refactor task wait test 2023-01-22 14:44:23 -05:00
Filip Tibell
af0c6d882e
Make wait async again 2023-01-22 14:39:57 -05:00
Filip Tibell
f8a2eb79d4
Implement task library & test suite, mostly 2023-01-21 20:11:17 -05:00
Filip Tibell
8ab5855ccc
Add missing task.cancel API 2023-01-21 17:23:39 -05:00
Filip Tibell
3689eb17d2
More output formatting improvements 2023-01-21 17:02:49 -05:00
Filip Tibell
7814282d3d
Prepare for task scheduler, improve error formatting 2023-01-21 16:40:57 -05:00
Filip Tibell
7aa35d8130
Simplify implementation of console global 2023-01-21 15:55:16 -05:00
Filip Tibell
f9627fc2ae
Use table builder helper for creating globals 2023-01-21 15:48:56 -05:00
Filip Tibell
e6faa3f6be
Use plain tables instead of userdata for globals 2023-01-21 15:30:22 -05:00
Filip Tibell
d5b3d3f94b
Implement test suite & prototypes for task global 2023-01-21 15:07:18 -05:00
Filip Tibell
8e8fb6c54f
Implement task.wait global 2023-01-21 13:33:33 -05:00
Filip Tibell
2e5f70dea8
Add note about test not working 2023-01-21 02:07:17 -05:00
Filip Tibell
63989af21f
Implement missing test case 2023-01-21 02:05:16 -05:00
Filip Tibell
8e58a8ed10
Implement test suite for fs 2023-01-21 02:01:46 -05:00
Filip Tibell
761580ad84
Implement test suite for console 2023-01-21 01:37:31 -05:00
Filip Tibell
b64990490d
Implement test suite for net 2023-01-21 01:10:19 -05:00
Filip Tibell
9cef9e01e5
Move tests to lib 2023-01-21 00:03:16 -05:00
Filip Tibell
94393419c2
Start work on proper tests suite 2023-01-20 23:40:31 -05:00
Filip Tibell
25b1dcb472
Improve output formatting 2023-01-20 22:21:31 -05:00
Filip Tibell
c90f40cf30
Split into lune lib & lune cli for easier external usage 2023-01-20 22:01:02 -05:00
Filip Tibell
86cd8ebe33
Reorganize & declutter source files 2023-01-20 21:15:58 -05:00
Filip Tibell
af3d022f5d
Go back to matching on bool since it was more obvious 2023-01-20 21:09:08 -05:00
Filip Tibell
3c3a798fbb
Use pedantic clippy, fix lints 2023-01-20 21:05:51 -05:00
Filip Tibell
bce6958c46
Refactor process args & env, improve errors 2023-01-20 15:21:20 -05:00
Filip Tibell
a9e3676d31
Fix formatting nitpick 2023-01-19 22:14:52 -05:00
Filip Tibell
aa1804d738
Implement console global 2023-01-19 22:10:34 -05:00
Filip Tibell
3ccb31d918
Add networking functions & move json apis 2023-01-19 17:56:12 -05:00
Filip Tibell
926a82e8e6
Implement downloading of type definition files in CLI 2023-01-19 13:18:15 -05:00
Filip Tibell
b6a784add8
Add cli args for downloading selene & luau type definitions 2023-01-19 00:36:44 -05:00
Filip Tibell
67235f436a
Add support for script args 2023-01-19 00:23:06 -05:00
Filip Tibell
7e57fed8d8
Use lune folder for scripts
Also improve cli logic for finding wanted script
2023-01-18 21:35:57 -05:00
Filip Tibell
4f9d2f44e1
Fix clippy lints 2023-01-18 21:11:47 -05:00
Filip Tibell
8078425b2d
Initial commit 2023-01-18 20:47:14 -05:00