jerch / inwasm Goto Github PK
View Code? Open in Web Editor NEWInline WebAssembly for Typescript
Inline WebAssembly for Typescript
Currently recompilation will be skipped, if the definition did not change and -f
(force) was not set. There are several issues attached to this cache logic:
The first point is a tricky one - we basically end up in make
realms and would have to track a tree of outside source files, hmm.
There is more attached to placing source files outside - if a code change happens outside without any change in the TS file, inwasm will silently skip that wasm build due to being already injected. Furthermore we already lost the definition association due to the inline writing.
Ideas to overcome both issues:
noCache
setting at definition - This way ppl can just use make in a custom runner with its fancy tracking mechs.The path configurations need some tweaking:
inwasm
is called from project root and builds get simply written to ./inwasm-builds
. Thats not good:
inwasm
was not called from project root --> needs to find out the real project root (builds in project root should stay the default)The problems above arise from more complicated projects with subprojects like in xtermjs - currently inwasm
is only used there in addons, which form their own projects with a package.json. Ideally we can just install inwasm
on the main project and delegate the builds output to the sub projects. The SDKs on the other hand should only be loaded once globally. This raises the question, whether we should implement a "parent-project" mode (descending logic to sub projects) or keep inwasm
sub-project-local (ascending logic to parent project), or both.
Also see xtermjs/xterm.js#4646.
left to do before going beta:
inwasm
from packageinwasm
Repro:
trackChanges
with a certain source fileinwasm -w
The current tracking is enough to stop the sdks from being loaded in CI under linux and macos, but not under windows. The reason is prolly the different line terminator, which leads to other hash values than the tracked ones.
Normalizing between CRNLs and NLs is really weird, so how about a cmdline flag to indicate in isolated CI runs, that the existing prebuilt binary should be used, disregarding all other hash based change tracking? This makes the skip logic pretty straight forward, and can also be used later on by any repo checkout, that never deals with wasm source code at all.
Currently the watch mode operates only on initially existing files.
Reshape trackChanges
into trackModified
and add another setting trackContent
for real file content hashing.
The latter is needed to avoid CI sdk pulling from a fresh repo checkout containing build targets (as needed in xterm.js serialize addon).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.