![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
assemblyscript-loader
Advanced tools
AssemblyScript's loader component to run and work with compiled WebAssembly modules, as a stand-alone module.
$> npm install assemblyscript-loader
import load from "assemblyscript-loader"; // JS: var load = require("assemblyscript-loader").load;
load("path/to/myModule.wasm", {
imports: {
...
}
}).then(module => {
...
// i.e. call module.exports.main()
});
Alternatively, when LoadOptions#exports
is specified, the respective object is pre-initialized
with the (always present) ready
promise that is resolved when loading is complete:
// myModule.js (CommonJS)
require("assemblyscript-loader").load("path/to/myModule.wasm", { exports: module.exports });
// otherModule.js (CommonJS)
var myModule = require("./myModule.js");
myModule.ready.then(() => {
...
});
load(file: string | Uint8Array | ArrayBuffer
, options: LoadOptions
): Promise<Module>
Loads a WebAssembly module either from a file or a buffer and returns a promise for the loaded Module
.
LoadOptions
Options to set up the environment created by load
.
WebAssembly.Memory
{ [key: string]: any }
{ [key: string]: any }
Module
Common module interface as returned by load
.
Imports
Exports
Memory
LogType
, message: string
): void
Imports
An object of imported functions.
Exports
An object of exported functions (plus the ready
promise).
LogType
An enum of log types:
Key | Value |
---|---|
LOG | 0 |
INFO | 1 |
WARN | 2 |
ERROR | 3 |
Memory extends WebAssembly.Memory
The WebAssembly Memory
instance populated with additional accessors for more convenient memory access.
NumberAccessor
NumberAccessor
NumberAccessor
NumberAccessor
NumberAccessor
NumberAccessor
LongAccessor
LongAccessor
NumberAccessor
NumberAccessor
ArrayAccessor
StringAccessor
NumberAccessor
Number memory accessor.
number
): number
number
, value: number
): void
LongAccessor
Long memory accessor. See also: long.js
number
): Long
number
, value: Long
): void
ArrayAccessor
Array memory accessor.
number
): { length: number, base: number }
number
, elementByteSize: number
): { ptr: number, base: number }
StringAccessor
String memory accessor.
number
): string
string
): number
initializeMemory(memoryInstance: WebAssembly.Memory
, malloc: Function
, memset: Function
): Memory
Just populates a WebAssembly Memory instance with the AssemblyScript-typical accessors.
xfetch(file: string
): Promise<Response>
Underlying fetch
implementation that also works under node.js.
Note that the create
methods of array and string accessors require an exported or imported
implementation of malloc
, memset
, free
etc. to be present. Also remember that memory is
unmanaged here and that free
must be called manually to clean up memory, just like in C. Once
WebAssembly exposes the garbage collector natively, there will be other options as well.
The long.js dependency can be safely excluded if working with
long/ulong values isn't needed. In this case, the implementation will still accept and produce
Long-like objects having a low
and a high
property representing the respective low and high
32-bits.
Clone the GitHub repository and install the development dependencies:
$> git clone https://github.com/AssemblyScript/loader.git
$> cd loader
$> npm install
Afterwards, to build the distribution files to dist/, run:
$> npm run build
FAQs
AssemblyScript's loader component as a stand-alone module.
The npm package assemblyscript-loader receives a total of 18 weekly downloads. As such, assemblyscript-loader popularity was classified as not popular.
We found that assemblyscript-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.