You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case Twitter goes away or is inaccessible for some folks :)
Thermite copies the dylib to lib/gem_name.native_extension, which doesn't give me room to execute additional Ruby when require "gem_name" happens. This is my lib/gem_name for reference.
require"helix_runtime"require"rails_fast_attributes/native"require"rails_fast_attributes/version"require"active_model"require"active_model/attribute"require"active_model/attribute_set"require"active_model/attribute/user_provided_default"require"active_record"require"active_record/relation"require"active_record/relation/query_attribute"moduleRailsFastAttributesORIGINAL_ATTRIBUTE=ActiveModel::AttributeclassAttributeUNINITIALIZED_ORIGINAL_VALUE=Object.newdefself.inherited(*)raise"ActiveModel::Attribute cannot be subclassed when using rails_fast_attributes"enddefself.null(name)ORIGINAL_ATTRIBUTE.null(name)endmoduleUserProvidedDefaultdefself.new(name,value,ty,original_attr=nil)Attribute.user_provided_default(name,value,ty,original_attr)endendendclassAttributeSetBuilder=RailsFastAttributes::BuilderYAMLEncoder=ActiveModel::AttributeSet::YAMLEncoderendendActiveModel.send(:remove_const,:Attribute)ActiveModel::Attribute=RailsFastAttributes::AttributeActiveModel.send(:remove_const,:AttributeSet)ActiveModel::AttributeSet=RailsFastAttributes::AttributeSet
I've created a PR for a custom Ruby extension directory in #49. I'm still uncertain whether I want to allow for a custom library name. Currently the name originates from either lib.name or package.name in Cargo.toml (and then is processed as necessary).
Mentioned on The Bikeshed (like #42) and expanded upon via Twitter.
The text was updated successfully, but these errors were encountered: