# See also: https://github.com/ffi/ffi/blob/fbe2cf851f426cc55b3b76eca7b10e37aa220b47/lib/ffi/platform.rb --- lib/heroku/jsplugin.rb 2022-02-12 19:37:40 +++ lib/heroku/jsplugin.rb 2024-02-18 21:43:31 @@ -140,19 +140,26 @@ def self.arch case RbConfig::CONFIG['host_cpu'] - when /x86_64/ + when /amd64|x86_64/ "amd64" + when /i?86|x86/ + "386" + when /arm64|aarch64/ + "aarch64" when /arm/ "arm" + when /ppc64|powerpc64/ + "powerpc64" + when /ppc|powerpc/ + "powerpc" else - "386" + RbConfig::CONFIG['host_cpu'] end end def self.os case RbConfig::CONFIG['host_os'] when /darwin|mac os/ - raise "#{arch} is not supported" unless arch == "amd64" "darwin" when /linux/ "linux"