Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fourceInstantiateWasm #16

Merged
merged 5 commits into from Aug 20, 2022
Merged

feat: fourceInstantiateWasm #16

merged 5 commits into from Aug 20, 2022

Conversation

ayame113
Copy link
Owner

Calling this function has no effect whether it is called or not.
Calling this function will force the loading of the wasm file used internally.
For performance sensitive servers, etc., call this function first to tell it to load wasm.
There is no need to call this function where performance is not important. In that case, the wasm file will be automatically loaded in about 3 seconds when you transpile for the first time.

import { serve } from "https://deno.land/std@0.151.0/http/mod.ts";
import { serveDirWithTs, fourceInstantiateWasm } from "https://deno.land/x/ts_serve@$VERSION/mod.ts";

fourceInstantiateWasm();
serve((request) => serveDirWithTs(request));

close #13

@codecov
Copy link

codecov bot commented Aug 20, 2022

Codecov Report

Merging #16 (ae67b9a) into main (afaf9e3) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #16   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         4    +2     
  Lines          165       176   +11     
  Branches        23        25    +2     
=========================================
+ Hits           165       176   +11     
Impacted Files Coverage Δ
mod.ts 100.00% <100.00%> (ø)
src/file_server.ts 100.00% <100.00%> (ø)
src/oak.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ayame113 ayame113 merged commit 9b7d62b into main Aug 20, 2022
@ayame113 ayame113 deleted the fourceloadwasm branch August 20, 2022 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't lazy load wasm
1 participant