๐๐ฆ๐
"Code execution as a service"
๐ฒ๐ฐ
EVAL ๐งฑ๐Dead simple, hermetic deployments ๐ฑ
Apps are hard to package ๐ฆ
especially for the web ๐
Build on WebAssembly targets with a
native compiler toolchain ๐
rustup add target wasm32-unknown-emscripten
cargo build --release --target wasm32-unknown-emscripten
Drop a single binary in FROM scratch Docker container and run a full Rails app
๐๐ณ
Statically linked dependencies enable
single binary app distributions ๐ป
Statically linked libc enables
single binary app distributions ๐ฅ
x86_64-unknown-linux-musl
๐ฆ โก๏ธ ๐
ENV['DRY_RUN'] = '0'
ary = Array.new(1024, 'Artichoke Ruby')
fixture = File.read(
'artichoke-frontend/ruby/fixtures/learnxinyminutes.txt'
)
/function/.match(fixture)
ENV AccessENVHashMap ๐ENVBuild on WebAssembly targets that
do not have a system environ ๐ง
ENVRun untrusted code by
restricting system access โ
IOIO$stdout and $stderr ๐งคIO#popen ๐ชKernel#open("|date") ๐
IOBuild on WebAssembly targets that
do not have file descriptors ๐ง
IO pipesRun untrusted code by disabling
subprocess capabilities โ
Kernel#requireFile AccessHashMap ๐๐RegexpRegexp๐๐จ ๐๐
Benchmarks run on AWS c5.2xlarge ๐ฅ ๐ฅ
String#scanString pattern over 6.8MB of Unicode text ๐
raise unless $fixture.scan('http://').length == 3539
raise unless $fixture.scan('https://').length == 1865
raise unless $fixture.scan('่กจ่พพๅผ').length == 120
raise unless $fixture.scan("\r\n").empty?
String#scanString#scanString#scanRegexp pattern over 6.8MB of Unicode text ๐
raise unless $fixture.scan(%r{https?://}).length == 3539+1865
raise unless $fixture.scan(/่กจ่พพๅผ/).length == 120
raise unless $fixture.scan(/\r\n/).empty?
String#scanString#scana = []
a[1_000_000_000_000_000] = 'quadrillion'
a.concat((0..1000).to_a)
100.times do |i|
a.unshift(i)
end
b = a.reverse
b[123_456_789, 500_000] = [Object.new, /Array/, 100.0]
puts a.length # => 1000000000001102
puts b.length # => 999999999501105
NoMemoryError)
Hash with small vec backend ๐ณRange and Range-based Array ๐ฆFile with in-memory and OS backends ๐งฉ