mirror of
				https://github.com/bytecodealliance/wasm-micro-runtime.git
				synced 2025-10-29 20:31:17 +00:00 
			
		
		
		
	 ab96e01f5e
			
		
	
	
		ab96e01f5e
		
			
		
	
	
	
	
		
			
			## Context Currently, WAMR supports compiling iwasm with flag `WAMR_BUILD_WASI_NN`. However, there are scenarios where the user might prefer having it as a shared library. ## Proposed Changes Decouple wasi-nn context management by internally managing the context given a module instance reference.
		
			
				
	
	
	
		
			352 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			352 B
		
	
	
	
	
	
	
	
wasi-nn as shared library
Example on how to create libwasi-nn (external library) instead of embedding wasi-nn inside iwasm
From folder core/iwasm/libraries/wasi-nn/test, build the test and run
../external/build/iwasm \
    --dir=. \
    --env="TARGET=cpu" \
    --native-lib=../external/build/libwasi-nn.so \
    test_tensorflow.wasm