File tree 7 files changed +18
-22
lines changed
7 files changed +18
-22
lines changed Original file line number Diff line number Diff line change 20
20
}
21
21
},
22
22
"args" : [
23
- " --socket=5007 "
23
+
24
24
],
25
25
"cwd" : " ${workspaceFolder}"
26
26
},
Original file line number Diff line number Diff line change 2
2
3
3
cargo build --release
4
4
5
- if [ ! -d " dist" ]; then
6
- mkdir dist
5
+ if [ -d " dist" ]; then
6
+ rm -rf dist
7
7
fi
8
8
9
- cp target/release/lua-language-server.exe dist/
9
+ mkdir dist
10
+
11
+ cp target/release/lua-language-server dist/
10
12
11
13
cp -r resources dist/
Original file line number Diff line number Diff line change 1
1
cargo build -- release
2
2
3
- if (-Not (Test-Path - Path " dist" )) {
4
- New-Item - ItemType Directory - Path " dist"
3
+ $distPath = " dist"
4
+
5
+ if (Test-Path - Path $distPath ) {
6
+ Remove-Item - Path $distPath - Recurse - Force
5
7
}
6
8
7
- Copy-Item - Path " target/release/lua-language-server.exe" - Destination " dist/"
9
+ New-Item - ItemType Directory - Path $distPath
10
+
11
+ Copy-Item - Path " target/release/lua-language-server.exe" - Destination $distPath
8
12
9
- Copy-Item - Path " resources" - Destination " dist/ " - Recurse
13
+ Copy-Item - Path " resources" - Destination $distPath - Recurse
Original file line number Diff line number Diff line change @@ -7,17 +7,8 @@ local thread = require 'bee.thread'
7
7
local taskpad = thread.channel('taskpad')
8
8
print("hello world2")
9
9
local counter = 0
10
- while true do
11
- print("hello world")
12
- taskpad:push(counter)
13
- counter = counter + 1
14
- thread.sleep(100)
15
- end
10
+ taskpad:push("hello world", "hello world2", counter)
16
11
]] )
17
- -- thread.sleep(100)
18
- print (" hello world" )
19
- -- coroutine.yield()
20
- print (" thread 1" , d , " hello world" )
21
12
while true do
22
13
print (d :bpop ())
23
14
end
Original file line number Diff line number Diff line change @@ -113,8 +113,7 @@ impl UserData for LuaChannel {
113
113
let data = receiver. lock ( ) . unwrap ( ) . recv ( ) . await ;
114
114
if let Some ( data) = data {
115
115
let lua_seri_unpack = lua. globals ( ) . get :: < LuaFunction > ( "lua_seri_unpack" ) ?;
116
- let mut returns = lua_seri_unpack. call :: < mlua:: MultiValue > ( data) . unwrap ( ) ;
117
- returns. insert ( 0 , mlua:: Value :: Boolean ( true ) ) ;
116
+ let returns = lua_seri_unpack. call :: < mlua:: MultiValue > ( data) . unwrap ( ) ;
118
117
return Ok ( returns) ;
119
118
}
120
119
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ unsafe extern "C-unwind" fn lua_seri_pack(lua_state: *mut lua_State) -> i32 {
14
14
return 0 ;
15
15
}
16
16
17
- let buffer_id = seri_pack ( lua_state, 1 , std:: ptr:: null_mut ( ) ) ;
17
+ let buffer_id = seri_pack ( lua_state, 0 , std:: ptr:: null_mut ( ) ) ;
18
18
ffi:: lua_pushinteger ( lua_state, buffer_id as i64 ) ;
19
19
1
20
20
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ async fn main() -> LuaResult<()> {
23
23
}
24
24
25
25
build_args ( & lua) ;
26
- let main = lua. load ( path:: Path :: new ( "resources/testmain .lua" ) ) ;
26
+ let main = lua. load ( path:: Path :: new ( "resources/main .lua" ) ) ;
27
27
main. call_async ( ( ) ) . await ?;
28
28
Ok ( ( ) )
29
29
}
You can’t perform that action at this time.
0 commit comments