File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,4 +26,5 @@ rustflags = [
2626 " -C" , " link-arg=--export=__tls_size" ,
2727 " -C" , " link-arg=--export=__tls_align" ,
2828 " -C" , " link-arg=--export=__tls_base" ,
29+ " -C" , " link-arg=--export=__heap_base" ,
2930]
Original file line number Diff line number Diff line change 7272 env :
7373 TARGET : ${{ matrix.target }}
7474 CONFIG : ${{ matrix.config }}
75+
76+ wasm32 :
77+ runs-on : ubuntu-latest
78+ name : wasm32
79+
80+ steps :
81+ - uses : actions/checkout@v5
82+
83+ - name : Setup Rust nightly toolchain
84+ uses : dtolnay/rust-toolchain@nightly
85+ with :
86+ targets : wasm32-unknown-unknown
87+ components : rust-src
88+
89+ - name : Install wasm tools
90+ run : |
91+ curl -sSL https://github.com/WebAssembly/binaryen/releases/download/version_130/binaryen-version_130-x86_64-linux.tar.gz | tar xz
92+ echo "$PWD/binaryen-version_130/bin" >> $GITHUB_PATH
93+ cargo install wasm-bindgen-cli --version 0.2.123
94+
95+ - name : Build wasm32
96+ run : make wasm
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ bindgen = "0.71.1"
2929
3030[dependencies ]
3131libc = " 0.2.175"
32- web-time = " 1"
3332
3433[target .'cfg(target_arch = "wasm32")' .dependencies ]
34+ web-time = " 1"
3535wasm-bindgen = " 0.2"
3636js-sys = " 0.3"
Original file line number Diff line number Diff line change 11use std:: time:: Duration ;
2+ #[ cfg( not( target_arch = "wasm32" ) ) ]
3+ use std:: time:: Instant ;
4+ #[ cfg( target_arch = "wasm32" ) ]
25use web_time:: Instant ;
36
47use crate :: thread:: ThreadData ;
You can’t perform that action at this time.
0 commit comments